geonetwork-ui 2.11.0-dev.5f9922c2e → 2.11.0-dev.6804f3b43
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.
- package/fesm2022/geonetwork-ui.mjs +1293 -1283
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +116 -80
- package/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +90 -31
- package/src/libs/common/domain/src/lib/model/search/aggregation.model.ts +2 -0
- package/src/libs/common/domain/src/lib/model/search/filter.model.ts +12 -2
- package/src/libs/feature/map/src/index.ts +0 -2
- package/src/libs/feature/map/src/lib/feature-map.module.ts +1 -8
- package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +8 -3
- package/src/libs/feature/search/src/index.ts +2 -0
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.html +3 -0
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +21 -4
- package/src/libs/feature/{map/src/lib → search/src/lib/geocoding}/geocoding.service.ts +16 -7
- package/src/libs/feature/search/src/lib/location-search/location-search.component.html +8 -0
- package/src/libs/feature/search/src/lib/location-search/location-search.component.ts +40 -0
- package/src/libs/feature/search/src/lib/search-filters-summary-item/search-filters-summary-item.component.ts +2 -0
- package/src/libs/feature/search/src/lib/state/reducer.ts +1 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +56 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +67 -9
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +10 -1
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +8 -0
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +7 -4
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +12 -9
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.model.ts +2 -2
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.html +5 -11
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.ts +34 -4
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +1 -0
- package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +2 -0
- package/src/libs/util/app-config/src/lib/app-config.ts +22 -0
- package/src/libs/util/app-config/src/lib/fixtures.ts +33 -1
- package/src/libs/util/app-config/src/lib/model.ts +14 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +19 -10
- package/src/libs/util/shared/src/lib/utils/geojson.ts +16 -0
- package/translations/de.json +10 -3
- package/translations/en.json +11 -4
- package/translations/es.json +10 -3
- package/translations/fr.json +15 -8
- package/translations/it.json +10 -3
- package/translations/nl.json +10 -3
- package/translations/pt.json +10 -3
- package/translations/sk.json +10 -3
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.css +0 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.html +0 -41
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +0 -112
- package/src/libs/feature/map/src/lib/style/index.ts +0 -2
- package/src/libs/feature/map/src/lib/style/map-style.fixtures.ts +0 -47
- package/src/libs/feature/map/src/lib/style/map-style.service.ts +0 -108
|
@@ -6,7 +6,7 @@ import GeoJSON from 'ol/format/GeoJSON.js';
|
|
|
6
6
|
import { parse as parse$1 } from 'ol/xml.js';
|
|
7
7
|
import { format } from 'date-fns/format';
|
|
8
8
|
import { Namespace, Literal, lit, parse as parse$2, sym, BlankNode, graph } from 'rdflib';
|
|
9
|
-
import { lastValueFrom, fromEvent, startWith, map as map$2, shareReplay, filter, pairwise, of, switchMap, Subject, forkJoin, combineLatest, from, exhaustMap, throwError, takeLast, firstValueFrom, merge, BehaviorSubject, timer, ReplaySubject, Subscription, first, distinctUntilChanged as distinctUntilChanged$1, animationFrameScheduler, debounceTime as debounceTime$1, Observable, buffer, tap as tap$2, combineLatestWith, take as take$1, catchError as catchError$1,
|
|
9
|
+
import { lastValueFrom, fromEvent, startWith, map as map$2, shareReplay, filter, pairwise, of, switchMap, Subject, forkJoin, combineLatest, from, exhaustMap, throwError, takeLast, firstValueFrom, merge, BehaviorSubject, timer, ReplaySubject, Subscription, first, distinctUntilChanged as distinctUntilChanged$1, animationFrameScheduler, debounceTime as debounceTime$1, Observable, buffer, tap as tap$2, combineLatestWith, take as take$1, catchError as catchError$1, EMPTY, mergeMap as mergeMap$1, withLatestFrom as withLatestFrom$1, takeUntil } from 'rxjs';
|
|
10
10
|
import * as i0 from '@angular/core';
|
|
11
11
|
import { InjectionToken, inject, Injectable, NgModule, Injector, provideAppInitializer, makeEnvironmentProviders, ElementRef, afterNextRender, booleanAttribute, Input, Directive, HostListener, Renderer2, DestroyRef, EventEmitter, Output, ViewChild, ChangeDetectionStrategy, Component, ViewEncapsulation, ChangeDetectorRef, HostBinding, ViewContainerRef, TemplateRef, ViewChildren, ContentChild, input, output, signal, viewChild, computed, ContentChildren, NgZone, ComponentFactoryResolver, viewChildren } from '@angular/core';
|
|
12
12
|
import { HttpClient, HttpHeaders, HttpParams, HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, HttpEventType } from '@angular/common/http';
|
|
@@ -26,7 +26,6 @@ import { getLength } from 'ol/sphere.js';
|
|
|
26
26
|
import { LineString } from 'ol/geom.js';
|
|
27
27
|
import * as i1 from '@ngrx/store';
|
|
28
28
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, Store, select, StoreModule } from '@ngrx/store';
|
|
29
|
-
import { queryDataGouvFr, queryGeonames, queryGeoadmin } from '@geospatial-sdk/geocoding';
|
|
30
29
|
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
31
30
|
import { FeaturesClickEventType, FeaturesHoverEventType, MapClickEventType, MapExtentChangeEventType, SourceLoadErrorType, computeMapContextDiff, createViewFromLayer } from '@geospatial-sdk/core';
|
|
32
31
|
import { createMapFromContext, applyContextDiffToMap, listen } from '@geospatial-sdk/openlayers';
|
|
@@ -37,11 +36,8 @@ import { createLegendFromLayer } from '@geospatial-sdk/legend';
|
|
|
37
36
|
import { mouseOnly, noModifierKeys, primaryAction, platformModifierKeyOnly } from 'ol/events/condition.js';
|
|
38
37
|
import { defaults, DragPan, MouseWheelZoom } from 'ol/interaction.js';
|
|
39
38
|
import { extend } from 'ol/extent.js';
|
|
40
|
-
import * as TOML from '@ltd/j-toml';
|
|
41
|
-
import { Style, Stroke, Fill, Circle } from 'ol/style.js';
|
|
42
|
-
import CircleStyle from 'ol/style/Circle.js';
|
|
43
39
|
import EmblaCarousel from 'embla-carousel';
|
|
44
|
-
import { iconoirNavArrowLeft, iconoirNavArrowRight, iconoirLongArrowDownLeft, iconoirSearch, iconoirCalendar, iconoirArrowUp, iconoirLink, iconoirFramePlusIn, iconoirCloudUpload, iconoirTrash, iconoirSquareDashed,
|
|
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';
|
|
45
41
|
import { MatButtonModule } from '@angular/material/button';
|
|
46
42
|
import * as i1$7 from '@angular/cdk/overlay';
|
|
47
43
|
import { ScrollStrategyOptions, OverlayModule, CdkConnectedOverlay, ScrollDispatcher, Overlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
@@ -74,6 +70,7 @@ import { MatTabsModule } from '@angular/material/tabs';
|
|
|
74
70
|
import * as i2$2 from '@ngrx/effects';
|
|
75
71
|
import { Actions, createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
76
72
|
import { valid as valid$1 } from 'geojson-validation';
|
|
73
|
+
import { queryGeoplateforme, queryGeonames, queryGeoadmin } from '@geospatial-sdk/geocoding';
|
|
77
74
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
78
75
|
import { parse as parse$3 } from 'marked';
|
|
79
76
|
import * as i2$3 from '@angular/cdk/scrolling';
|
|
@@ -101,6 +98,7 @@ import { TextFieldModule } from '@angular/cdk/text-field';
|
|
|
101
98
|
import * as i2$5 from '@ngrx/router-store';
|
|
102
99
|
import { getRouterSelectors, routerReducer, StoreRouterConnectingModule, FullRouterStateSerializer } from '@ngrx/router-store';
|
|
103
100
|
import { navigation } from '@ngrx/router-store/data-persistence';
|
|
101
|
+
import * as TOML from '@ltd/j-toml';
|
|
104
102
|
|
|
105
103
|
class MetadataMapperContext {
|
|
106
104
|
}
|
|
@@ -19596,6 +19594,19 @@ function isBoundingBox(value) {
|
|
|
19596
19594
|
value.length === 4 &&
|
|
19597
19595
|
value.every((item) => typeof item === 'number'));
|
|
19598
19596
|
}
|
|
19597
|
+
/**
|
|
19598
|
+
* Checks that a bounding box's coordinates stay within the valid
|
|
19599
|
+
* longitude (-180/180) and latitude (-90/90) ranges.
|
|
19600
|
+
*/
|
|
19601
|
+
function isBoundingBoxWithinWorldExtent(bbox) {
|
|
19602
|
+
const [minX, minY, maxX, maxY] = bbox;
|
|
19603
|
+
return (minX >= -180 &&
|
|
19604
|
+
maxX <= 180 &&
|
|
19605
|
+
minY >= -90 &&
|
|
19606
|
+
maxY <= 90 &&
|
|
19607
|
+
minX <= maxX &&
|
|
19608
|
+
minY <= maxY);
|
|
19609
|
+
}
|
|
19599
19610
|
function getGeometryBoundingBox(geometry) {
|
|
19600
19611
|
// use the bounding box if specified in the GeoJSON object
|
|
19601
19612
|
if (geometry.bbox) {
|
|
@@ -20264,7 +20275,7 @@ function getLinkLabel(link) {
|
|
|
20264
20275
|
const label = link.description || ('name' in link ? link.name : '');
|
|
20265
20276
|
return format ? `${label} (${format})` : label;
|
|
20266
20277
|
}
|
|
20267
|
-
async function getLayers(url, serviceProtocol) {
|
|
20278
|
+
async function getLayers(url, serviceProtocol, deep = false) {
|
|
20268
20279
|
switch (serviceProtocol) {
|
|
20269
20280
|
case 'ogcFeatures': {
|
|
20270
20281
|
const layers = await new OgcApiEndpoint(url).allCollections;
|
|
@@ -20272,7 +20283,10 @@ async function getLayers(url, serviceProtocol) {
|
|
|
20272
20283
|
}
|
|
20273
20284
|
case 'wfs': {
|
|
20274
20285
|
const endpointWfs = await new WfsEndpoint(url).isReady();
|
|
20275
|
-
const featureTypes =
|
|
20286
|
+
const featureTypes = endpointWfs.getFeatureTypes();
|
|
20287
|
+
if (!deep) {
|
|
20288
|
+
return featureTypes;
|
|
20289
|
+
}
|
|
20276
20290
|
const layers = (await Promise.allSettled(featureTypes.map((collection) => {
|
|
20277
20291
|
return endpointWfs.getFeatureTypeFull(collection.name);
|
|
20278
20292
|
})))
|
|
@@ -20282,12 +20296,14 @@ async function getLayers(url, serviceProtocol) {
|
|
|
20282
20296
|
}
|
|
20283
20297
|
case 'wms': {
|
|
20284
20298
|
const endpointWms = await new WmsEndpoint(url).isReady();
|
|
20285
|
-
const
|
|
20299
|
+
const layersSummary = endpointWms
|
|
20286
20300
|
.getLayers()
|
|
20287
20301
|
.flatMap(wmsLayerFlatten)
|
|
20288
|
-
.filter((l) => l.name)
|
|
20289
|
-
|
|
20290
|
-
|
|
20302
|
+
.filter((l) => l.name);
|
|
20303
|
+
if (!deep) {
|
|
20304
|
+
return layersSummary;
|
|
20305
|
+
}
|
|
20306
|
+
const layers = layersSummary.map((collection) => endpointWms.getLayerByName(collection.name));
|
|
20291
20307
|
return layers;
|
|
20292
20308
|
}
|
|
20293
20309
|
case 'wmts': {
|
|
@@ -20434,7 +20450,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
20434
20450
|
}] } });
|
|
20435
20451
|
|
|
20436
20452
|
var name = "geonetwork-ui";
|
|
20437
|
-
var version = "2.11.0-dev.
|
|
20453
|
+
var version = "2.11.0-dev.6804f3b43";
|
|
20438
20454
|
var engines = {
|
|
20439
20455
|
node: ">=24"
|
|
20440
20456
|
};
|
|
@@ -20455,6 +20471,7 @@ var peerDependencies = {
|
|
|
20455
20471
|
"@angular/core": "19.x || 20.x || 21.x",
|
|
20456
20472
|
"@angular/forms": "19.x || 20.x || 21.x",
|
|
20457
20473
|
"@angular/material": "19.x || 20.x || 21.x",
|
|
20474
|
+
"@angular/material-date-fns-adapter": "19.x || 20.x",
|
|
20458
20475
|
"@angular/platform-browser": "19.x || 20.x || 21.x",
|
|
20459
20476
|
"@angular/platform-browser-dynamic": "19.x || 20.x || 21.x",
|
|
20460
20477
|
"@angular/router": "19.x || 20.x || 21.x",
|
|
@@ -20671,6 +20688,7 @@ class ElasticsearchService {
|
|
|
20671
20688
|
// runtime fields are computed using a Painless script
|
|
20672
20689
|
// see: https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-mapping-fields.html
|
|
20673
20690
|
this.runtimeFields = {};
|
|
20691
|
+
this.fieldAliases = {};
|
|
20674
20692
|
}
|
|
20675
20693
|
// we're using getters in case the defined languages change over time
|
|
20676
20694
|
get metadataLang() {
|
|
@@ -20696,8 +20714,8 @@ class ElasticsearchService {
|
|
|
20696
20714
|
if (!payload.runtime_mappings)
|
|
20697
20715
|
payload.runtime_mappings = {};
|
|
20698
20716
|
payload.runtime_mappings[fieldName] = {
|
|
20699
|
-
type:
|
|
20700
|
-
script: this.runtimeFields[fieldName],
|
|
20717
|
+
type: this.runtimeFields[fieldName].type,
|
|
20718
|
+
script: this.runtimeFields[fieldName].script,
|
|
20701
20719
|
};
|
|
20702
20720
|
};
|
|
20703
20721
|
const lookForField = (node) => {
|
|
@@ -20717,6 +20735,12 @@ class ElasticsearchService {
|
|
|
20717
20735
|
(node[runtimeField] === 'asc' || node[runtimeField] === 'desc')) {
|
|
20718
20736
|
addMapping(runtimeField);
|
|
20719
20737
|
}
|
|
20738
|
+
if (runtimeField in node &&
|
|
20739
|
+
typeof node[runtimeField] === 'object' &&
|
|
20740
|
+
node[runtimeField] !== null &&
|
|
20741
|
+
('gte' in node[runtimeField] || 'lte' in node[runtimeField])) {
|
|
20742
|
+
addMapping(runtimeField);
|
|
20743
|
+
}
|
|
20720
20744
|
if ('query' in node &&
|
|
20721
20745
|
typeof node.query === 'string' &&
|
|
20722
20746
|
node.query.indexOf(runtimeField + ':') > -1) {
|
|
@@ -20733,8 +20757,11 @@ class ElasticsearchService {
|
|
|
20733
20757
|
lookForField(payload.query);
|
|
20734
20758
|
return payload;
|
|
20735
20759
|
}
|
|
20736
|
-
registerRuntimeField(fieldName, expression) {
|
|
20737
|
-
this.runtimeFields[fieldName] = expression;
|
|
20760
|
+
registerRuntimeField(fieldName, expression, type = 'keyword') {
|
|
20761
|
+
this.runtimeFields[fieldName] = { script: expression, type };
|
|
20762
|
+
}
|
|
20763
|
+
registerFieldAlias(fieldIdentifier, esFieldName) {
|
|
20764
|
+
this.fieldAliases[fieldIdentifier] = esFieldName;
|
|
20738
20765
|
}
|
|
20739
20766
|
getMetadataByIdsPayload(uuids) {
|
|
20740
20767
|
return {
|
|
@@ -20857,6 +20884,55 @@ class ElasticsearchService {
|
|
|
20857
20884
|
}
|
|
20858
20885
|
return Object.values(filters).find(isBoundingBox);
|
|
20859
20886
|
}
|
|
20887
|
+
// builds a query matching records whose dates intersect the filter range
|
|
20888
|
+
buildDateRangeQuery(searchField, dateRange) {
|
|
20889
|
+
// fields ending with 'DateRange' maps as ES range type
|
|
20890
|
+
if (searchField.endsWith('DateRange')) {
|
|
20891
|
+
return {
|
|
20892
|
+
range: {
|
|
20893
|
+
[searchField]: {
|
|
20894
|
+
...(dateRange.start && { gte: formatDate(dateRange.start) }),
|
|
20895
|
+
...(dateRange.end && { lte: formatDate(dateRange.end) }),
|
|
20896
|
+
format: 'yyyy-MM-dd',
|
|
20897
|
+
relation: 'intersects',
|
|
20898
|
+
},
|
|
20899
|
+
},
|
|
20900
|
+
};
|
|
20901
|
+
}
|
|
20902
|
+
const minField = `${searchField}Min`;
|
|
20903
|
+
const maxField = `${searchField}Max`;
|
|
20904
|
+
if (minField in this.runtimeFields && maxField in this.runtimeFields) {
|
|
20905
|
+
// min/max runtime fields form an interval per record; match if it intersects the filter range
|
|
20906
|
+
const filter = [
|
|
20907
|
+
dateRange.start && {
|
|
20908
|
+
range: {
|
|
20909
|
+
[maxField]: {
|
|
20910
|
+
gte: formatDate(dateRange.start),
|
|
20911
|
+
format: 'yyyy-MM-dd',
|
|
20912
|
+
},
|
|
20913
|
+
},
|
|
20914
|
+
},
|
|
20915
|
+
dateRange.end && {
|
|
20916
|
+
range: {
|
|
20917
|
+
[minField]: {
|
|
20918
|
+
lte: formatDate(dateRange.end),
|
|
20919
|
+
format: 'yyyy-MM-dd',
|
|
20920
|
+
},
|
|
20921
|
+
},
|
|
20922
|
+
},
|
|
20923
|
+
].filter(Boolean);
|
|
20924
|
+
return { bool: { filter } };
|
|
20925
|
+
}
|
|
20926
|
+
return {
|
|
20927
|
+
range: {
|
|
20928
|
+
[searchField]: {
|
|
20929
|
+
...(dateRange.start && { gte: formatDate(dateRange.start) }),
|
|
20930
|
+
...(dateRange.end && { lte: formatDate(dateRange.end) }),
|
|
20931
|
+
format: 'yyyy-MM-dd',
|
|
20932
|
+
},
|
|
20933
|
+
},
|
|
20934
|
+
};
|
|
20935
|
+
}
|
|
20860
20936
|
filtersToQuery(filters, spatialFilterExtent = this.findSpatialFilterExtent(filters)) {
|
|
20861
20937
|
const addQuote = (key) => (/^\/.+\/$/.test(key) ? key : `"${key}"`);
|
|
20862
20938
|
const makeQuery = (filter) => {
|
|
@@ -20881,39 +20957,19 @@ class ElasticsearchService {
|
|
|
20881
20957
|
.filter((fieldname) => !Array.isArray(filters[fieldname]))
|
|
20882
20958
|
.filter((fieldname) => filters[fieldname] &&
|
|
20883
20959
|
JSON.stringify(filters[fieldname]) !== '{}')
|
|
20884
|
-
.map((fieldname) => `${fieldname}:(${makeQuery(filters[fieldname])})`)
|
|
20960
|
+
.map((fieldname) => `${this.fieldAliases[fieldname] ?? fieldname}:(${makeQuery(filters[fieldname])})`)
|
|
20885
20961
|
.join(' AND ');
|
|
20886
20962
|
if (filters['gn-ui-crossFieldFilter']) {
|
|
20887
20963
|
queryString = `${queryString} AND (${filters['gn-ui-crossFieldFilter']})`;
|
|
20888
20964
|
}
|
|
20889
|
-
const
|
|
20890
|
-
.filter(([, value]) => isDateRange(value))
|
|
20891
|
-
.map(([searchField, dateRange]) => {
|
|
20892
|
-
return {
|
|
20893
|
-
searchField,
|
|
20894
|
-
dateRange,
|
|
20895
|
-
};
|
|
20896
|
-
})[0];
|
|
20965
|
+
const queryRanges = Object.entries(filters).filter(([, value]) => isDateRange(value));
|
|
20897
20966
|
const queryParts = [
|
|
20898
20967
|
queryString && {
|
|
20899
20968
|
query_string: {
|
|
20900
20969
|
query: queryString,
|
|
20901
20970
|
},
|
|
20902
20971
|
},
|
|
20903
|
-
|
|
20904
|
-
queryRange.dateRange && {
|
|
20905
|
-
range: {
|
|
20906
|
-
[queryRange.searchField]: {
|
|
20907
|
-
...(queryRange.dateRange.start && {
|
|
20908
|
-
gte: formatDate(queryRange.dateRange.start),
|
|
20909
|
-
}),
|
|
20910
|
-
...(queryRange.dateRange.end && {
|
|
20911
|
-
lte: formatDate(queryRange.dateRange.end),
|
|
20912
|
-
}),
|
|
20913
|
-
format: 'yyyy-MM-dd',
|
|
20914
|
-
},
|
|
20915
|
-
},
|
|
20916
|
-
},
|
|
20972
|
+
...queryRanges.map(([searchField, dateRange]) => this.buildDateRangeQuery(searchField, dateRange)),
|
|
20917
20973
|
spatialFilterExtent && {
|
|
20918
20974
|
geo_shape: {
|
|
20919
20975
|
geom: {
|
|
@@ -21199,6 +21255,12 @@ class ElasticsearchService {
|
|
|
21199
21255
|
order: {
|
|
21200
21256
|
[`_${aggregation.sort[1]}`]: aggregation.sort[0],
|
|
21201
21257
|
},
|
|
21258
|
+
...(aggregation.includeValues && {
|
|
21259
|
+
include: aggregation.includeValues,
|
|
21260
|
+
}),
|
|
21261
|
+
...(aggregation.excludeValues && {
|
|
21262
|
+
exclude: aggregation.excludeValues,
|
|
21263
|
+
}),
|
|
21202
21264
|
},
|
|
21203
21265
|
};
|
|
21204
21266
|
case 'histogram':
|
|
@@ -22587,48 +22649,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
22587
22649
|
type: Injectable
|
|
22588
22650
|
}] });
|
|
22589
22651
|
|
|
22590
|
-
const GEOCODING_PROVIDER = new InjectionToken('geocoding-provider');
|
|
22591
|
-
class GeocodingService {
|
|
22592
|
-
constructor() {
|
|
22593
|
-
this.provider = inject(GEOCODING_PROVIDER);
|
|
22594
|
-
}
|
|
22595
|
-
query(text) {
|
|
22596
|
-
let queryObservable;
|
|
22597
|
-
switch (this.provider[0]) {
|
|
22598
|
-
case 'geoadmin':
|
|
22599
|
-
queryObservable = from(queryGeoadmin(text, this.provider[1]));
|
|
22600
|
-
break;
|
|
22601
|
-
case 'geonames':
|
|
22602
|
-
queryObservable = from(queryGeonames(text, this.provider[1]));
|
|
22603
|
-
break;
|
|
22604
|
-
case 'data-gouv-fr':
|
|
22605
|
-
queryObservable = from(queryDataGouvFr(text, this.provider[1]));
|
|
22606
|
-
break;
|
|
22607
|
-
default:
|
|
22608
|
-
return throwError(() => new Error(`Unsupported geocoding provider: ${this.provider[0]}`));
|
|
22609
|
-
}
|
|
22610
|
-
return queryObservable.pipe(catchError((error) => throwError(error)));
|
|
22611
|
-
}
|
|
22612
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
22613
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingService, providedIn: 'root' }); }
|
|
22614
|
-
}
|
|
22615
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingService, decorators: [{
|
|
22616
|
-
type: Injectable,
|
|
22617
|
-
args: [{
|
|
22618
|
-
providedIn: 'root',
|
|
22619
|
-
}]
|
|
22620
|
-
}] });
|
|
22621
|
-
|
|
22622
22652
|
class FeatureMapModule {
|
|
22623
22653
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
22624
22654
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: FeatureMapModule, imports: [i1.StoreFeatureModule] }); }
|
|
22625
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureMapModule, providers: [
|
|
22626
|
-
MapFacade,
|
|
22627
|
-
{
|
|
22628
|
-
provide: GEOCODING_PROVIDER,
|
|
22629
|
-
useValue: ['geonames', { maxRows: 5 }],
|
|
22630
|
-
},
|
|
22631
|
-
], imports: [StoreModule.forFeature(MAP_FEATURE_KEY, mapReducer)] }); }
|
|
22655
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureMapModule, providers: [MapFacade], imports: [StoreModule.forFeature(MAP_FEATURE_KEY, mapReducer)] }); }
|
|
22632
22656
|
}
|
|
22633
22657
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureMapModule, decorators: [{
|
|
22634
22658
|
type: NgModule,
|
|
@@ -22636,13 +22660,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
22636
22660
|
imports: [
|
|
22637
22661
|
StoreModule.forFeature(MAP_FEATURE_KEY, mapReducer),
|
|
22638
22662
|
],
|
|
22639
|
-
providers: [
|
|
22640
|
-
MapFacade,
|
|
22641
|
-
{
|
|
22642
|
-
provide: GEOCODING_PROVIDER,
|
|
22643
|
-
useValue: ['geonames', { maxRows: 5 }],
|
|
22644
|
-
},
|
|
22645
|
-
],
|
|
22663
|
+
providers: [MapFacade],
|
|
22646
22664
|
}]
|
|
22647
22665
|
}] });
|
|
22648
22666
|
|
|
@@ -22661,6 +22679,8 @@ const VECTOR_STYLE_DEFAULT = new InjectionToken('vectorStyleDefault', {
|
|
|
22661
22679
|
const DEFAULT_BASEMAP_LAYER = {
|
|
22662
22680
|
type: 'maplibre-style',
|
|
22663
22681
|
styleUrl: `https://basemaps.cartocdn.com/gl/positron-gl-style/style.json`,
|
|
22682
|
+
clickable: false,
|
|
22683
|
+
hoverable: false,
|
|
22664
22684
|
};
|
|
22665
22685
|
const DEFAULT_VIEW = {
|
|
22666
22686
|
center: [0, 15],
|
|
@@ -23083,1114 +23103,406 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
23083
23103
|
}]
|
|
23084
23104
|
}] });
|
|
23085
23105
|
|
|
23086
|
-
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
|
|
23090
|
-
|
|
23106
|
+
class AnchorLinkDirective {
|
|
23107
|
+
constructor() {
|
|
23108
|
+
this.changeDetector = inject(ChangeDetectorRef);
|
|
23109
|
+
this.disabled = false;
|
|
23110
|
+
this.observer = new MutationObserver(() => {
|
|
23111
|
+
this.refreshDisabledState();
|
|
23112
|
+
});
|
|
23113
|
+
this.inView = false;
|
|
23114
|
+
this.initialized = false;
|
|
23091
23115
|
}
|
|
23092
|
-
|
|
23093
|
-
|
|
23094
|
-
|
|
23095
|
-
|
|
23096
|
-
|
|
23116
|
+
get elementClass() {
|
|
23117
|
+
if (this.disabled) {
|
|
23118
|
+
return this.disabledClass;
|
|
23119
|
+
}
|
|
23120
|
+
if (this.inView) {
|
|
23121
|
+
return `${this.inViewClass} ${this.enabledClass}`;
|
|
23122
|
+
}
|
|
23123
|
+
else {
|
|
23124
|
+
return `${this.outOfViewClass} ${this.enabledClass}`;
|
|
23125
|
+
}
|
|
23097
23126
|
}
|
|
23098
|
-
|
|
23099
|
-
|
|
23127
|
+
ngOnInit() {
|
|
23128
|
+
this.observer.observe(document.body, {
|
|
23129
|
+
childList: true,
|
|
23130
|
+
subtree: true,
|
|
23131
|
+
});
|
|
23132
|
+
this.refreshDisabledState();
|
|
23100
23133
|
}
|
|
23101
|
-
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23108
|
-
|
|
23109
|
-
};
|
|
23110
|
-
};
|
|
23111
|
-
/**
|
|
23112
|
-
* Only keeps recognized keys, flatten nested values (to allow having "." in keys),
|
|
23113
|
-
* pushes warnings and errors to the given arrays; returns null in case of error
|
|
23114
|
-
*/
|
|
23115
|
-
function parseConfigSection(fullConfigObj, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors) {
|
|
23116
|
-
if (typeof fullConfigObj[sectionName] !== 'object') {
|
|
23117
|
-
if (mandatoryKeys.length === 0)
|
|
23118
|
-
return null;
|
|
23119
|
-
outErrors.push(`The [${sectionName}] mandatory section is missing.`);
|
|
23120
|
-
return null;
|
|
23134
|
+
ngAfterViewChecked() {
|
|
23135
|
+
if (!this.initialized && !this.disabled) {
|
|
23136
|
+
const target = document.getElementById(this.targetId);
|
|
23137
|
+
if (target) {
|
|
23138
|
+
this.initializeIntersectionObserver(target);
|
|
23139
|
+
this.initialized = true;
|
|
23140
|
+
}
|
|
23141
|
+
}
|
|
23121
23142
|
}
|
|
23122
|
-
|
|
23123
|
-
|
|
23124
|
-
|
|
23125
|
-
|
|
23126
|
-
|
|
23127
|
-
|
|
23143
|
+
initializeIntersectionObserver(target) {
|
|
23144
|
+
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
23145
|
+
entries.forEach((entry) => {
|
|
23146
|
+
this.inView = entry.isIntersecting;
|
|
23147
|
+
this.changeDetector.detectChanges();
|
|
23148
|
+
});
|
|
23149
|
+
}, {
|
|
23150
|
+
root: null,
|
|
23151
|
+
rootMargin: '-30% 0% -60% 0%',
|
|
23152
|
+
});
|
|
23153
|
+
this.intersectionObserver.observe(target);
|
|
23128
23154
|
}
|
|
23129
|
-
|
|
23130
|
-
|
|
23131
|
-
|
|
23155
|
+
ngOnDestroy() {
|
|
23156
|
+
this.observer.disconnect();
|
|
23157
|
+
if (this.intersectionObserver) {
|
|
23158
|
+
this.intersectionObserver.disconnect();
|
|
23159
|
+
}
|
|
23132
23160
|
}
|
|
23133
|
-
|
|
23161
|
+
refreshDisabledState() {
|
|
23162
|
+
const targetNotPresent = !document.getElementById(this.targetId);
|
|
23163
|
+
if (targetNotPresent !== this.disabled) {
|
|
23164
|
+
this.disabled = targetNotPresent;
|
|
23165
|
+
this.changeDetector.detectChanges();
|
|
23166
|
+
}
|
|
23167
|
+
}
|
|
23168
|
+
scrollToTarget() {
|
|
23169
|
+
const target = document.getElementById(this.targetId);
|
|
23170
|
+
if (!target)
|
|
23171
|
+
return;
|
|
23172
|
+
target.scrollIntoView({
|
|
23173
|
+
behavior: 'smooth',
|
|
23174
|
+
block: 'start',
|
|
23175
|
+
});
|
|
23176
|
+
}
|
|
23177
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnchorLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23178
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.19", type: AnchorLinkDirective, isStandalone: true, selector: "[gnUiAnchorLink]", inputs: { targetId: ["gnUiAnchorLink", "targetId"], disabledClass: ["gnUiAnchorLinkDisabledClass", "disabledClass"], enabledClass: ["gnUiAnchorLinkEnabledClass", "enabledClass"], inViewClass: ["gnUiAnchorLinkInViewClass", "inViewClass"], outOfViewClass: ["gnUiAnchorLinkOutOfViewClass", "outOfViewClass"] }, host: { listeners: { "click": "scrollToTarget()" }, properties: { "class": "this.elementClass" } }, ngImport: i0 }); }
|
|
23134
23179
|
}
|
|
23135
|
-
|
|
23136
|
-
|
|
23137
|
-
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23141
|
-
|
|
23142
|
-
|
|
23180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnchorLinkDirective, decorators: [{
|
|
23181
|
+
type: Directive,
|
|
23182
|
+
args: [{
|
|
23183
|
+
selector: '[gnUiAnchorLink]',
|
|
23184
|
+
standalone: true,
|
|
23185
|
+
}]
|
|
23186
|
+
}], propDecorators: { targetId: [{
|
|
23187
|
+
type: Input,
|
|
23188
|
+
args: ['gnUiAnchorLink']
|
|
23189
|
+
}], disabledClass: [{
|
|
23190
|
+
type: Input,
|
|
23191
|
+
args: ['gnUiAnchorLinkDisabledClass']
|
|
23192
|
+
}], enabledClass: [{
|
|
23193
|
+
type: Input,
|
|
23194
|
+
args: ['gnUiAnchorLinkEnabledClass']
|
|
23195
|
+
}], inViewClass: [{
|
|
23196
|
+
type: Input,
|
|
23197
|
+
args: ['gnUiAnchorLinkInViewClass']
|
|
23198
|
+
}], outOfViewClass: [{
|
|
23199
|
+
type: Input,
|
|
23200
|
+
args: ['gnUiAnchorLinkOutOfViewClass']
|
|
23201
|
+
}], elementClass: [{
|
|
23202
|
+
type: HostBinding,
|
|
23203
|
+
args: ['class']
|
|
23204
|
+
}], scrollToTarget: [{
|
|
23205
|
+
type: HostListener,
|
|
23206
|
+
args: ['click']
|
|
23207
|
+
}] } });
|
|
23208
|
+
|
|
23209
|
+
class PaginationDotsComponent {
|
|
23210
|
+
constructor() {
|
|
23211
|
+
this.containerClass = '';
|
|
23143
23212
|
}
|
|
23144
|
-
|
|
23213
|
+
// 1-based
|
|
23214
|
+
get steps() {
|
|
23215
|
+
return Array.from({ length: this.listComponent.pagesCount }, (_, i) => i + 1);
|
|
23216
|
+
}
|
|
23217
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PaginationDotsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23218
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: PaginationDotsComponent, isStandalone: true, selector: "gn-ui-pagination-dots", inputs: { listComponent: "listComponent", containerClass: "containerClass" }, ngImport: i0, template: "@if (listComponent.pagesCount > 1) {\n <div\n class=\"overflow-hidden flex flex-row justify-center gap-[14px] p-1\"\n [ngClass]=\"containerClass\"\n >\n @for (step of steps; track step) {\n <button\n type=\"button\"\n class=\"pagination-dot\"\n (click)=\"listComponent.goToPage(step)\"\n [ngClass]=\"\n listComponent.currentPage === step ? 'bg-primary' : 'bg-gray-400'\n \"\n ></button>\n }\n </div>\n}\n", styles: [".pagination-dot{width:6px;height:6px;border-radius:6px;position:relative;flex-shrink:0}.pagination-dot:after{content:\"\";position:absolute;left:-7px;top:-7px;width:20px;height:20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], viewProviders: [
|
|
23219
|
+
provideIcons({
|
|
23220
|
+
iconoirNavArrowRight,
|
|
23221
|
+
iconoirNavArrowLeft,
|
|
23222
|
+
}),
|
|
23223
|
+
] }); }
|
|
23145
23224
|
}
|
|
23146
|
-
|
|
23147
|
-
|
|
23148
|
-
|
|
23149
|
-
|
|
23150
|
-
|
|
23151
|
-
|
|
23152
|
-
|
|
23153
|
-
|
|
23154
|
-
|
|
23225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PaginationDotsComponent, decorators: [{
|
|
23226
|
+
type: Component,
|
|
23227
|
+
args: [{ selector: 'gn-ui-pagination-dots', standalone: true, imports: [CommonModule], viewProviders: [
|
|
23228
|
+
provideIcons({
|
|
23229
|
+
iconoirNavArrowRight,
|
|
23230
|
+
iconoirNavArrowLeft,
|
|
23231
|
+
}),
|
|
23232
|
+
], template: "@if (listComponent.pagesCount > 1) {\n <div\n class=\"overflow-hidden flex flex-row justify-center gap-[14px] p-1\"\n [ngClass]=\"containerClass\"\n >\n @for (step of steps; track step) {\n <button\n type=\"button\"\n class=\"pagination-dot\"\n (click)=\"listComponent.goToPage(step)\"\n [ngClass]=\"\n listComponent.currentPage === step ? 'bg-primary' : 'bg-gray-400'\n \"\n ></button>\n }\n </div>\n}\n", styles: [".pagination-dot{width:6px;height:6px;border-radius:6px;position:relative;flex-shrink:0}.pagination-dot:after{content:\"\";position:absolute;left:-7px;top:-7px;width:20px;height:20px}\n"] }]
|
|
23233
|
+
}], propDecorators: { listComponent: [{
|
|
23234
|
+
type: Input
|
|
23235
|
+
}], containerClass: [{
|
|
23236
|
+
type: Input
|
|
23237
|
+
}] } });
|
|
23238
|
+
|
|
23239
|
+
class CarouselComponent {
|
|
23240
|
+
constructor() {
|
|
23241
|
+
this.changeDetector = inject(ChangeDetectorRef);
|
|
23242
|
+
this.containerClass = '';
|
|
23243
|
+
this.stepsContainerClass = 'w-full bottom-0 top-auto';
|
|
23244
|
+
this.currentStepChange = new EventEmitter();
|
|
23245
|
+
this.steps = [];
|
|
23246
|
+
this.currentStep = 0;
|
|
23247
|
+
this.refreshSteps = () => {
|
|
23248
|
+
this.steps = this.emblaApi.scrollSnapList();
|
|
23249
|
+
this.currentStep = this.emblaApi.selectedScrollSnap();
|
|
23250
|
+
this.currentStepChange.emit(this.currentStep);
|
|
23251
|
+
this.changeDetector.detectChanges();
|
|
23252
|
+
};
|
|
23155
23253
|
}
|
|
23156
|
-
|
|
23157
|
-
|
|
23158
|
-
return
|
|
23254
|
+
// Paginable API
|
|
23255
|
+
get isFirstPage() {
|
|
23256
|
+
return this.currentStep === 0;
|
|
23159
23257
|
}
|
|
23160
|
-
|
|
23161
|
-
|
|
23162
|
-
return null;
|
|
23258
|
+
get isLastPage() {
|
|
23259
|
+
return this.currentStep === this.steps.length - 1;
|
|
23163
23260
|
}
|
|
23164
|
-
|
|
23165
|
-
|
|
23166
|
-
function checkMetadataLanguage(parsedConfigSection, outWarnings) {
|
|
23167
|
-
const lang2 = toLang2(parsedConfigSection.metadata_language.toLowerCase());
|
|
23168
|
-
if (lang2?.length !== 2) {
|
|
23169
|
-
outWarnings.push(`In the [global] section: metadata_language = "${parsedConfigSection.metadata_language}" is not a recognized ISO 639 language code`);
|
|
23261
|
+
get currentPage() {
|
|
23262
|
+
return this.currentStep + 1; // this is 1-based
|
|
23170
23263
|
}
|
|
23171
|
-
|
|
23172
|
-
|
|
23173
|
-
function checkNewRecordDefaultLanguage(parsedConfigSection, outWarnings) {
|
|
23174
|
-
const lang2 = toLang2(parsedConfigSection.new_record_default_language.toLowerCase());
|
|
23175
|
-
if (!(lang2 in LANG_2_TO_3_MAPPER)) {
|
|
23176
|
-
outWarnings.push(`In the [editing] section: new_record_default_language = "${parsedConfigSection.new_record_default_language}" is not a recognized ISO 639 language code`);
|
|
23177
|
-
return {
|
|
23178
|
-
...parsedConfigSection,
|
|
23179
|
-
new_record_default_language: undefined,
|
|
23180
|
-
};
|
|
23264
|
+
get pagesCount() {
|
|
23265
|
+
return this.steps.length;
|
|
23181
23266
|
}
|
|
23182
|
-
|
|
23183
|
-
|
|
23184
|
-
new_record_default_language: lang2,
|
|
23185
|
-
};
|
|
23186
|
-
}
|
|
23187
|
-
function checkNewRecordStandard(parsedConfigSection, outWarnings) {
|
|
23188
|
-
const standard = parsedConfigSection.new_record_standard;
|
|
23189
|
-
const normalizedStandard = typeof standard === 'string' ? standard.trim().toLowerCase() : null;
|
|
23190
|
-
if (normalizedStandard === 'iso19139' ||
|
|
23191
|
-
normalizedStandard === 'iso19115-3') {
|
|
23192
|
-
return {
|
|
23193
|
-
...parsedConfigSection,
|
|
23194
|
-
new_record_standard: normalizedStandard,
|
|
23195
|
-
};
|
|
23267
|
+
goToPage(stepIndex) {
|
|
23268
|
+
this.emblaApi.scrollTo(stepIndex - 1); // this is 0-based
|
|
23196
23269
|
}
|
|
23197
|
-
|
|
23198
|
-
|
|
23199
|
-
|
|
23200
|
-
|
|
23201
|
-
}
|
|
23270
|
+
goToPrevPage() {
|
|
23271
|
+
if (this.isFirstPage)
|
|
23272
|
+
return;
|
|
23273
|
+
this.emblaApi.scrollPrev();
|
|
23274
|
+
}
|
|
23275
|
+
goToNextPage() {
|
|
23276
|
+
if (this.isLastPage)
|
|
23277
|
+
return;
|
|
23278
|
+
this.emblaApi.scrollNext();
|
|
23279
|
+
}
|
|
23280
|
+
ngAfterViewInit() {
|
|
23281
|
+
this.emblaApi = EmblaCarousel(this.carouselOverflowContainer.nativeElement, {
|
|
23282
|
+
duration: 15,
|
|
23283
|
+
});
|
|
23284
|
+
this.emblaApi
|
|
23285
|
+
.on('init', this.refreshSteps)
|
|
23286
|
+
.on('reInit', this.refreshSteps)
|
|
23287
|
+
.on('select', this.refreshSteps);
|
|
23288
|
+
}
|
|
23289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23290
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: CarouselComponent, isStandalone: true, selector: "gn-ui-carousel", inputs: { containerClass: "containerClass", stepsContainerClass: "stepsContainerClass" }, outputs: { currentStepChange: "currentStepChange" }, viewQueries: [{ propertyName: "carouselOverflowContainer", first: true, predicate: ["carouselOverflowContainer"], descendants: true }], ngImport: i0, template: "<div #carouselOverflowContainer class=\"w-full block\">\n <div class=\"carousel-container flex\" [ngClass]=\"containerClass\">\n <ng-content></ng-content>\n </div>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + stepsContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host{position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PaginationDotsComponent, selector: "gn-ui-pagination-dots", inputs: ["listComponent", "containerClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23202
23291
|
}
|
|
23292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
23293
|
+
type: Component,
|
|
23294
|
+
args: [{ selector: 'gn-ui-carousel', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, PaginationDotsComponent], template: "<div #carouselOverflowContainer class=\"w-full block\">\n <div class=\"carousel-container flex\" [ngClass]=\"containerClass\">\n <ng-content></ng-content>\n </div>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + stepsContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host{position:relative}\n"] }]
|
|
23295
|
+
}], propDecorators: { carouselOverflowContainer: [{
|
|
23296
|
+
type: ViewChild,
|
|
23297
|
+
args: ['carouselOverflowContainer']
|
|
23298
|
+
}], containerClass: [{
|
|
23299
|
+
type: Input
|
|
23300
|
+
}], stepsContainerClass: [{
|
|
23301
|
+
type: Input
|
|
23302
|
+
}], currentStepChange: [{
|
|
23303
|
+
type: Output
|
|
23304
|
+
}] } });
|
|
23203
23305
|
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
|
|
23207
|
-
|
|
23208
|
-
|
|
23209
|
-
|
|
23210
|
-
|
|
23211
|
-
|
|
23212
|
-
|
|
23213
|
-
|
|
23214
|
-
|
|
23215
|
-
|
|
23306
|
+
class ProgressBarComponent {
|
|
23307
|
+
constructor() {
|
|
23308
|
+
this.value = 0;
|
|
23309
|
+
this.type = 'default';
|
|
23310
|
+
}
|
|
23311
|
+
get progress() {
|
|
23312
|
+
return this.value > 0 ? (this.value < 100 ? this.value : 100) : 0;
|
|
23313
|
+
}
|
|
23314
|
+
get color() {
|
|
23315
|
+
switch (this.type) {
|
|
23316
|
+
case 'default':
|
|
23317
|
+
return {
|
|
23318
|
+
outerBar: 'bg-gray-200',
|
|
23319
|
+
innerBar: 'bg-gray-100',
|
|
23320
|
+
text: 'text-gray-900',
|
|
23321
|
+
};
|
|
23322
|
+
case 'primary':
|
|
23323
|
+
return {
|
|
23324
|
+
outerBar: 'bg-primary',
|
|
23325
|
+
innerBar: 'bg-primary-lighter',
|
|
23326
|
+
text: 'text-white',
|
|
23327
|
+
};
|
|
23328
|
+
case 'secondary':
|
|
23329
|
+
return {
|
|
23330
|
+
outerBar: 'bg-secondary',
|
|
23331
|
+
innerBar: 'bg-secondary-lighter',
|
|
23332
|
+
text: 'text-white',
|
|
23333
|
+
};
|
|
23334
|
+
case 'light':
|
|
23335
|
+
return {
|
|
23336
|
+
outerBar: 'bg-primary-white',
|
|
23337
|
+
innerBar: 'bg-primary',
|
|
23338
|
+
text: 'text-main',
|
|
23339
|
+
};
|
|
23340
|
+
}
|
|
23216
23341
|
}
|
|
23342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23343
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ProgressBarComponent, isStandalone: true, selector: "gn-ui-progress-bar", inputs: { value: "value", type: "type" }, ngImport: i0, template: "@switch (type) {\n <!-- Light Theme -->\n @case ('light') {\n <div class=\"flex items-center relative\">\n <div\n class=\"flex-shrink-0 {{ color.text }} font-medium mr-2\n text-opacity-100 !text-slate-800\"\n data-cy=\"progressPercentage\"\n >\n {{ progress }}%\n </div>\n <div class=\"flex-grow h-[4px] w-[52px] {{ color.outerBar }} rounded-full\">\n <div\n [style.width.%]=\"progress\"\n class=\"{{ color.innerBar }} transition-width duration-500\n ease-in-out rounded-full shadow-sm w-[52px] h-[4px]\"\n ></div>\n </div>\n </div>\n }\n <!-- Default / Primary / Secondary Themes -->\n @default {\n <div class=\"flex h-full {{ color.outerBar }} rounded-t-lg rounded-b-lg\">\n <div\n [style.width.%]=\"progress\"\n class=\"flex {{ color.innerBar }} my-1 mx-1 transition-width\n duration-500 ease-in-out rounded-t-md rounded-b-md shadow-xl\"\n >\n <div\n class=\"flex items-center pl-2 py-1 {{ color.text }} font-bold text-4\"\n >\n {{ progress }}%\n </div>\n </div>\n </div>\n }\n}\n", styles: [".font-bold{font-weight:var(--progress-bar-font-weight, \"bold\")}\n"] }); }
|
|
23217
23344
|
}
|
|
23345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
23346
|
+
type: Component,
|
|
23347
|
+
args: [{ selector: 'gn-ui-progress-bar', standalone: true, imports: [], template: "@switch (type) {\n <!-- Light Theme -->\n @case ('light') {\n <div class=\"flex items-center relative\">\n <div\n class=\"flex-shrink-0 {{ color.text }} font-medium mr-2\n text-opacity-100 !text-slate-800\"\n data-cy=\"progressPercentage\"\n >\n {{ progress }}%\n </div>\n <div class=\"flex-grow h-[4px] w-[52px] {{ color.outerBar }} rounded-full\">\n <div\n [style.width.%]=\"progress\"\n class=\"{{ color.innerBar }} transition-width duration-500\n ease-in-out rounded-full shadow-sm w-[52px] h-[4px]\"\n ></div>\n </div>\n </div>\n }\n <!-- Default / Primary / Secondary Themes -->\n @default {\n <div class=\"flex h-full {{ color.outerBar }} rounded-t-lg rounded-b-lg\">\n <div\n [style.width.%]=\"progress\"\n class=\"flex {{ color.innerBar }} my-1 mx-1 transition-width\n duration-500 ease-in-out rounded-t-md rounded-b-md shadow-xl\"\n >\n <div\n class=\"flex items-center pl-2 py-1 {{ color.text }} font-bold text-4\"\n >\n {{ progress }}%\n </div>\n </div>\n </div>\n }\n}\n", styles: [".font-bold{font-weight:var(--progress-bar-font-weight, \"bold\")}\n"] }]
|
|
23348
|
+
}], propDecorators: { value: [{
|
|
23349
|
+
type: Input
|
|
23350
|
+
}], type: [{
|
|
23351
|
+
type: Input
|
|
23352
|
+
}] } });
|
|
23218
23353
|
|
|
23219
|
-
|
|
23220
|
-
|
|
23221
|
-
|
|
23222
|
-
|
|
23223
|
-
|
|
23224
|
-
|
|
23225
|
-
|
|
23226
|
-
|
|
23227
|
-
|
|
23228
|
-
}
|
|
23229
|
-
|
|
23230
|
-
|
|
23231
|
-
|
|
23232
|
-
|
|
23233
|
-
|
|
23234
|
-
}
|
|
23235
|
-
|
|
23236
|
-
|
|
23237
|
-
|
|
23238
|
-
}
|
|
23239
|
-
|
|
23240
|
-
|
|
23241
|
-
|
|
23242
|
-
|
|
23243
|
-
|
|
23244
|
-
function getOptionalEditorConfig() {
|
|
23245
|
-
return editorConfig;
|
|
23246
|
-
}
|
|
23247
|
-
let metadataQualityConfig = null;
|
|
23248
|
-
function getMetadataQualityConfig() {
|
|
23249
|
-
return (metadataQualityConfig ||
|
|
23250
|
-
{
|
|
23251
|
-
ENABLED: false,
|
|
23354
|
+
class PopoverComponent {
|
|
23355
|
+
constructor() {
|
|
23356
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
23357
|
+
this.renderer = inject(Renderer2);
|
|
23358
|
+
}
|
|
23359
|
+
getContent() {
|
|
23360
|
+
if (this.content instanceof TemplateRef) {
|
|
23361
|
+
if (this.view) {
|
|
23362
|
+
this.view.destroy();
|
|
23363
|
+
}
|
|
23364
|
+
this.view = this.viewContainerRef.createEmbeddedView(this.content);
|
|
23365
|
+
this.view.detectChanges();
|
|
23366
|
+
const wrapper = this.renderer.createElement('div'); // Create a wrapper div
|
|
23367
|
+
this.view.rootNodes.forEach((node) => {
|
|
23368
|
+
this.renderer.appendChild(wrapper, node); // Append each root node to the wrapper
|
|
23369
|
+
});
|
|
23370
|
+
return wrapper;
|
|
23371
|
+
}
|
|
23372
|
+
return this.content;
|
|
23373
|
+
}
|
|
23374
|
+
ngAfterViewInit() {
|
|
23375
|
+
this.tippyInstance = tippy(this.popoverContent.nativeElement, {
|
|
23376
|
+
content: this.getContent(),
|
|
23377
|
+
allowHTML: true,
|
|
23378
|
+
theme: this.theme,
|
|
23252
23379
|
});
|
|
23253
|
-
}
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
|
|
23257
|
-
|
|
23258
|
-
|
|
23259
|
-
}
|
|
23260
|
-
let appConfigLoaded = false;
|
|
23261
|
-
function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
23262
|
-
console.log(`[geonetwork-ui] Loading application configuration from ${configUrl}`);
|
|
23263
|
-
return fetch(configUrl)
|
|
23264
|
-
.then((resp) => {
|
|
23265
|
-
if (!resp.ok)
|
|
23266
|
-
throw new Error('Configuration file could not be loaded');
|
|
23267
|
-
return resp.text();
|
|
23268
|
-
})
|
|
23269
|
-
.then((conf) => {
|
|
23270
|
-
let parsed;
|
|
23271
|
-
try {
|
|
23272
|
-
parsed = TOML.parse(conf, { joiner: '\n', bigint: false });
|
|
23380
|
+
}
|
|
23381
|
+
ngOnChanges(changes) {
|
|
23382
|
+
if (changes['theme']) {
|
|
23383
|
+
this.theme = changes['theme'].currentValue;
|
|
23384
|
+
if (this.tippyInstance) {
|
|
23385
|
+
this.tippyInstance.setProps({ theme: this.theme });
|
|
23386
|
+
}
|
|
23273
23387
|
}
|
|
23274
|
-
|
|
23275
|
-
|
|
23388
|
+
if (changes['content']) {
|
|
23389
|
+
this.content = changes['content'].currentValue;
|
|
23390
|
+
if (this.tippyInstance) {
|
|
23391
|
+
this.tippyInstance.setContent(this.getContent());
|
|
23392
|
+
}
|
|
23276
23393
|
}
|
|
23277
|
-
|
|
23278
|
-
|
|
23279
|
-
|
|
23280
|
-
|
|
23281
|
-
'edit_url_template',
|
|
23282
|
-
'proxy_path',
|
|
23283
|
-
'metadata_language',
|
|
23284
|
-
'login_url',
|
|
23285
|
-
'logout_url',
|
|
23286
|
-
'settings_url',
|
|
23287
|
-
'web_component_embedder_url',
|
|
23288
|
-
'languages',
|
|
23289
|
-
'contact_email',
|
|
23290
|
-
'reuse_form_url',
|
|
23291
|
-
], warnings, errors);
|
|
23292
|
-
if (parsedGlobalSection?.metadata_language) {
|
|
23293
|
-
parsedGlobalSection = checkMetadataLanguage(parsedGlobalSection, warnings);
|
|
23294
|
-
}
|
|
23295
|
-
globalConfig =
|
|
23296
|
-
parsedGlobalSection === null
|
|
23297
|
-
? null
|
|
23298
|
-
: {
|
|
23299
|
-
GN4_API_URL: parsedGlobalSection.geonetwork4_api_url,
|
|
23300
|
-
DATAHUB_URL: parsedGlobalSection.datahub_url,
|
|
23301
|
-
EDIT_URL_TEMPLATE: parsedGlobalSection.edit_url_template,
|
|
23302
|
-
PROXY_PATH: parsedGlobalSection.proxy_path,
|
|
23303
|
-
METADATA_LANGUAGE: parsedGlobalSection.metadata_language
|
|
23304
|
-
? parsedGlobalSection.metadata_language.toLowerCase()
|
|
23305
|
-
: undefined,
|
|
23306
|
-
LOGIN_URL: parsedGlobalSection.login_url,
|
|
23307
|
-
LOGOUT_URL: parsedGlobalSection.logout_url,
|
|
23308
|
-
SETTINGS_URL: parsedGlobalSection.settings_url,
|
|
23309
|
-
WEB_COMPONENT_EMBEDDER_URL: parsedGlobalSection.web_component_embedder_url,
|
|
23310
|
-
LANGUAGES: parsedGlobalSection.languages,
|
|
23311
|
-
CONTACT_EMAIL: parsedGlobalSection.contact_email,
|
|
23312
|
-
REUSE_FORM_URL: parsedGlobalSection.reuse_form_url,
|
|
23313
|
-
};
|
|
23314
|
-
const parsedLayersSections = parseMultiConfigSection(parsed, 'map_layer', ['type'], ['name', 'url', 'data', 'styleUrl', 'accessToken'], warnings, errors);
|
|
23315
|
-
const parsedMapSection = parseConfigSection(parsed, 'map', [], [
|
|
23316
|
-
'max_zoom',
|
|
23317
|
-
'do_not_tile_wms',
|
|
23318
|
-
'max_extent',
|
|
23319
|
-
'max_feature_count',
|
|
23320
|
-
'baselayer',
|
|
23321
|
-
'do_not_use_default_basemap',
|
|
23322
|
-
'external_viewer_url_template',
|
|
23323
|
-
'external_viewer_open_new_tab',
|
|
23324
|
-
], warnings, errors);
|
|
23325
|
-
mapConfig =
|
|
23326
|
-
parsedMapSection === null || parsedLayersSections === null
|
|
23327
|
-
? null
|
|
23328
|
-
: {
|
|
23329
|
-
MAX_ZOOM: parsedMapSection.max_zoom,
|
|
23330
|
-
DO_NOT_TILE_WMS: parsedMapSection.do_not_tile_wms,
|
|
23331
|
-
MAX_EXTENT: parsedMapSection.max_extent,
|
|
23332
|
-
MAX_FEATURE_COUNT: parsedMapSection.max_feature_count,
|
|
23333
|
-
EXTERNAL_VIEWER_URL_TEMPLATE: parsedMapSection.external_viewer_url_template,
|
|
23334
|
-
EXTERNAL_VIEWER_OPEN_NEW_TAB: parsedMapSection.external_viewer_open_new_tab,
|
|
23335
|
-
DO_NOT_USE_DEFAULT_BASEMAP: !!parsedMapSection.do_not_use_default_basemap,
|
|
23336
|
-
MAP_LAYERS: parsedLayersSections.map((map_layer) => ({
|
|
23337
|
-
TYPE: map_layer.type,
|
|
23338
|
-
URL: map_layer.url,
|
|
23339
|
-
NAME: map_layer.name,
|
|
23340
|
-
DATA: map_layer.data,
|
|
23341
|
-
STYLE_URL: map_layer.styleUrl,
|
|
23342
|
-
ACCESS_TOKEN: map_layer.accessToken,
|
|
23343
|
-
})),
|
|
23344
|
-
};
|
|
23345
|
-
const parsedThemeSection = parseConfigSection(parsed, 'theme', ['primary_color', 'secondary_color', 'main_color', 'background_color'], [
|
|
23346
|
-
'header_foreground_color',
|
|
23347
|
-
'main_font',
|
|
23348
|
-
'title_font',
|
|
23349
|
-
'fonts_stylesheet_url',
|
|
23350
|
-
'thumbnail_placeholder',
|
|
23351
|
-
'header_background',
|
|
23352
|
-
'favicon',
|
|
23353
|
-
], warnings, errors);
|
|
23354
|
-
themeConfig =
|
|
23355
|
-
parsedThemeSection === null
|
|
23356
|
-
? null
|
|
23357
|
-
: {
|
|
23358
|
-
PRIMARY_COLOR: parsedThemeSection.primary_color,
|
|
23359
|
-
SECONDARY_COLOR: parsedThemeSection.secondary_color,
|
|
23360
|
-
MAIN_COLOR: parsedThemeSection.main_color,
|
|
23361
|
-
BACKGROUND_COLOR: parsedThemeSection.background_color,
|
|
23362
|
-
HEADER_FOREGROUND_COLOR: parsedThemeSection.header_foreground_color,
|
|
23363
|
-
THUMBNAIL_PLACEHOLDER: parsedThemeSection.thumbnail_placeholder,
|
|
23364
|
-
HEADER_BACKGROUND: parsedThemeSection.header_background,
|
|
23365
|
-
TITLE_FONT: parsedThemeSection.title_font,
|
|
23366
|
-
MAIN_FONT: parsedThemeSection.main_font,
|
|
23367
|
-
FONTS_STYLESHEET_URL: parsedThemeSection.fonts_stylesheet_url,
|
|
23368
|
-
FAVICON: parsedThemeSection.favicon,
|
|
23369
|
-
};
|
|
23370
|
-
const parsedSearchSection = parseConfigSection(parsed, 'search', [], [
|
|
23371
|
-
'record_kind_quick_filter',
|
|
23372
|
-
'filter_geometry_data',
|
|
23373
|
-
'filter_geometry_url',
|
|
23374
|
-
'do_not_use_default_search_preset',
|
|
23375
|
-
'search_preset',
|
|
23376
|
-
'advanced_filters',
|
|
23377
|
-
'limit',
|
|
23378
|
-
'spatial_extent_max_file_size',
|
|
23379
|
-
], warnings, errors);
|
|
23380
|
-
const parsedSearchParams = parseMultiConfigSection(parsed, 'search_preset', ['name'], ['sort', 'filters'], warnings, errors);
|
|
23381
|
-
searchConfig =
|
|
23382
|
-
parsedSearchSection === null
|
|
23383
|
-
? null
|
|
23384
|
-
: {
|
|
23385
|
-
RECORD_KIND_QUICK_FILTER: parsedSearchSection.record_kind_quick_filter,
|
|
23386
|
-
FILTER_GEOMETRY_DATA: parsedSearchSection.filter_geometry_data,
|
|
23387
|
-
FILTER_GEOMETRY_URL: parsedSearchSection.filter_geometry_url,
|
|
23388
|
-
DO_NOT_USE_DEFAULT_SEARCH_PRESET: !!parsedSearchSection.do_not_use_default_search_preset,
|
|
23389
|
-
SEARCH_PRESET: parsedSearchParams.map((param) => ({
|
|
23390
|
-
sort: param.sort,
|
|
23391
|
-
name: param.name,
|
|
23392
|
-
filters: param.filters,
|
|
23393
|
-
})),
|
|
23394
|
-
ADVANCED_FILTERS: parsedSearchSection.advanced_filters,
|
|
23395
|
-
LIMIT: parsedSearchSection.limit,
|
|
23396
|
-
SPATIAL_EXTENT_MAX_FILE_SIZE: parsedSearchSection.spatial_extent_max_file_size,
|
|
23397
|
-
};
|
|
23398
|
-
const parsedMetadataQualitySection = parseConfigSection(parsed, 'metadata-quality', [], ['enabled'], warnings, errors);
|
|
23399
|
-
metadataQualityConfig =
|
|
23400
|
-
parsedMetadataQualitySection === null
|
|
23401
|
-
? null
|
|
23402
|
-
: {
|
|
23403
|
-
ENABLED: parsedMetadataQualitySection.enabled,
|
|
23404
|
-
SORTABLE: parsedMetadataQualitySection.sortable,
|
|
23405
|
-
};
|
|
23406
|
-
let parsedEditingSection = parseConfigSection(parsed, 'editing', [], ['new_record_default_language', 'new_record_standard'], warnings, errors);
|
|
23407
|
-
if (parsedEditingSection !== null &&
|
|
23408
|
-
parsedEditingSection.new_record_default_language !== undefined) {
|
|
23409
|
-
parsedEditingSection = checkNewRecordDefaultLanguage(parsedEditingSection, warnings);
|
|
23410
|
-
}
|
|
23411
|
-
if (parsedEditingSection !== null &&
|
|
23412
|
-
parsedEditingSection.new_record_standard !== undefined) {
|
|
23413
|
-
parsedEditingSection = checkNewRecordStandard(parsedEditingSection, warnings);
|
|
23414
|
-
}
|
|
23415
|
-
editorConfig =
|
|
23416
|
-
parsedEditingSection === null
|
|
23417
|
-
? null
|
|
23418
|
-
: {
|
|
23419
|
-
NEW_RECORD_DEFAULT_LANGUAGE: parsedEditingSection.new_record_default_language,
|
|
23420
|
-
NEW_RECORD_STANDARD: parsedEditingSection.new_record_standard,
|
|
23421
|
-
};
|
|
23422
|
-
customTranslations = parseTranslationsConfigSection(parsed, 'translations');
|
|
23423
|
-
if (errors.length) {
|
|
23424
|
-
throw new Error(`One or more mandatory settings were missing from the configuration file.
|
|
23425
|
-
${errors.join('\n')}`);
|
|
23394
|
+
}
|
|
23395
|
+
ngOnDestroy() {
|
|
23396
|
+
if (this.tippyInstance) {
|
|
23397
|
+
this.tippyInstance.destroy();
|
|
23426
23398
|
}
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
${warnings.join('\n')}`);
|
|
23399
|
+
if (this.view) {
|
|
23400
|
+
this.view.destroy();
|
|
23430
23401
|
}
|
|
23431
|
-
|
|
23432
|
-
});
|
|
23433
|
-
}
|
|
23434
|
-
function isConfigLoaded() {
|
|
23435
|
-
return appConfigLoaded;
|
|
23436
|
-
}
|
|
23437
|
-
function _reset() {
|
|
23438
|
-
globalConfig = null;
|
|
23439
|
-
themeConfig = null;
|
|
23440
|
-
editorConfig = null;
|
|
23441
|
-
customTranslations = null;
|
|
23402
|
+
}
|
|
23403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23404
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: PopoverComponent, isStandalone: true, selector: "gn-ui-popover", inputs: { content: "content", theme: "theme" }, viewQueries: [{ propertyName: "popoverContent", first: true, predicate: ["popoverContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span #popoverContent>\n <ng-content></ng-content>\n</span>\n", styles: [""] }); }
|
|
23442
23405
|
}
|
|
23443
|
-
|
|
23444
|
-
|
|
23445
|
-
|
|
23446
|
-
|
|
23447
|
-
|
|
23448
|
-
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
},
|
|
23455
|
-
},
|
|
23456
|
-
{
|
|
23457
|
-
provide: TranslateLoader,
|
|
23458
|
-
useClass: FileWithOverridesTranslateLoader,
|
|
23459
|
-
deps: [HttpClient, TRANSLATE_HTTP_LOADER_CONFIG],
|
|
23460
|
-
},
|
|
23461
|
-
],
|
|
23462
|
-
};
|
|
23463
|
-
|
|
23464
|
-
const okAppConfigFixture = () => `
|
|
23465
|
-
[global]
|
|
23466
|
-
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
23467
|
-
proxy_path = "/proxy/?url="
|
|
23468
|
-
metadata_language = "fre"
|
|
23469
|
-
login_url = "/cas/login?service="
|
|
23470
|
-
logout_url = "/geonetwork/signout"
|
|
23471
|
-
settings_url = "/geonetwork/settings"
|
|
23472
|
-
web_component_embedder_url = "/datahub/wc-embedder.html"
|
|
23473
|
-
|
|
23474
|
-
[map]
|
|
23475
|
-
max_zoom = 10
|
|
23476
|
-
max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
|
|
23477
|
-
do_not_use_default_basemap = false
|
|
23478
|
-
external_viewer_url_template = 'https://example.com/myviewer?'
|
|
23479
|
-
external_viewer_open_new_tab = true
|
|
23480
|
-
[[map_layer]]
|
|
23481
|
-
type = "wms"
|
|
23482
|
-
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
23483
|
-
name = "masque_hdf_ign_carto_latin1"
|
|
23484
|
-
[[map_layer]]
|
|
23485
|
-
type = "wfs"
|
|
23486
|
-
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
23487
|
-
name = "masque_hdf_ign_carto_latin1"
|
|
23488
|
-
|
|
23489
|
-
[theme]
|
|
23490
|
-
primary_color = "#093564"
|
|
23491
|
-
secondary_color = "#c2e9dc"
|
|
23492
|
-
main_color = "#212029" # All-purpose text color
|
|
23493
|
-
background_color = "#fdfbff"
|
|
23494
|
-
thumbnail_placeholder = 'assets/img/placeholder.svg'
|
|
23495
|
-
header_background = 'teal'
|
|
23496
|
-
header_foreground_color = "#872e2e"
|
|
23497
|
-
main_font = 'sans-serif'
|
|
23498
|
-
title_font = 'serif'
|
|
23499
|
-
fonts_stylesheet_url = "https://fonts.googleapis.com/css2?family=Open+Sans"
|
|
23500
|
-
|
|
23501
|
-
[search]
|
|
23502
|
-
record_kind_quick_filter = false
|
|
23503
|
-
filter_geometry_url = 'https://my.domain.org/geom.json'
|
|
23504
|
-
do_not_use_default_search_preset = false
|
|
23505
|
-
advanced_filters = ['publicationYear', 'documentStandard', 'inspireKeyword', 'topic', 'license']
|
|
23506
|
-
|
|
23507
|
-
[[search_preset]]
|
|
23508
|
-
sort = "-createDate"
|
|
23509
|
-
name = 'filterByOrgs'
|
|
23510
|
-
filters.q = 'Carto'
|
|
23511
|
-
filters.organisation = ['Org1', 'Org2']
|
|
23512
|
-
filters.format = ['ESRI Shapefile']
|
|
23513
|
-
filters.topic = ['boundaries']
|
|
23514
|
-
filters.publicationYear = ['2023', '2022']
|
|
23515
|
-
filters.spatial = ['yes']
|
|
23516
|
-
|
|
23517
|
-
[translations.en]
|
|
23518
|
-
"my.first.key" = 'First label.'
|
|
23519
|
-
"my.second.key" = """
|
|
23520
|
-
Second label,
|
|
23521
|
-
on two lines."""
|
|
23522
|
-
|
|
23523
|
-
[translations.de]
|
|
23524
|
-
my.first.key = 'Erste Etikett.'
|
|
23525
|
-
|
|
23526
|
-
[translations.fr]
|
|
23527
|
-
my.sample.text = "Un bon exemple de texte."
|
|
23528
|
-
"my.quoted.text" = 'du texte entre guillements.'
|
|
23529
|
-
`;
|
|
23530
|
-
const appConfigWithTranslationFixture = () => okAppConfigFixture();
|
|
23531
|
-
const minimalAppConfigFixture = () => `
|
|
23532
|
-
[global]
|
|
23533
|
-
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
23534
|
-
proxy_path = "/proxy/?url="
|
|
23406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
23407
|
+
type: Component,
|
|
23408
|
+
args: [{ selector: 'gn-ui-popover', standalone: true, imports: [], template: "<span #popoverContent>\n <ng-content></ng-content>\n</span>\n" }]
|
|
23409
|
+
}], propDecorators: { popoverContent: [{
|
|
23410
|
+
type: ViewChild,
|
|
23411
|
+
args: ['popoverContent', { static: false }]
|
|
23412
|
+
}], content: [{
|
|
23413
|
+
type: Input
|
|
23414
|
+
}], theme: [{
|
|
23415
|
+
type: Input
|
|
23416
|
+
}] } });
|
|
23535
23417
|
|
|
23536
|
-
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
main_color = "#212029" # All-purpose text color
|
|
23540
|
-
background_color = "#fdfbff"
|
|
23541
|
-
`;
|
|
23542
|
-
const mapConfigFixture = () => ({
|
|
23543
|
-
MAX_ZOOM: 10,
|
|
23544
|
-
MAX_EXTENT: [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855],
|
|
23545
|
-
DO_NOT_USE_DEFAULT_BASEMAP: false,
|
|
23546
|
-
DO_NOT_TILE_WMS: false,
|
|
23547
|
-
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}"}]}]',
|
|
23548
|
-
EXTERNAL_VIEWER_OPEN_NEW_TAB: true,
|
|
23549
|
-
MAP_LAYERS: [
|
|
23550
|
-
{
|
|
23551
|
-
TYPE: 'xyz',
|
|
23552
|
-
URL: 'https://some-basemap-server',
|
|
23553
|
-
},
|
|
23554
|
-
{
|
|
23555
|
-
TYPE: 'wms',
|
|
23556
|
-
URL: 'https://some-wms-server',
|
|
23557
|
-
NAME: 'some_layername',
|
|
23558
|
-
},
|
|
23559
|
-
{
|
|
23560
|
-
TYPE: 'wfs',
|
|
23561
|
-
URL: 'https://some-wfs-server',
|
|
23562
|
-
NAME: 'some_layername',
|
|
23563
|
-
},
|
|
23564
|
-
],
|
|
23565
|
-
});
|
|
23566
|
-
const malformedConfigFixture = () => `
|
|
23567
|
-
{
|
|
23568
|
-
"I thought": "we were still doing json"
|
|
23418
|
+
class LoadingMaskComponent {
|
|
23419
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LoadingMaskComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23420
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: LoadingMaskComponent, isStandalone: true, selector: "gn-ui-loading-mask", inputs: { message: "message" }, ngImport: i0, template: "<div class=\"h-full flex flex-col justify-center items-center relative backdrop\">\n <div class=\"absolute background bg-white inset-0\"></div>\n <mat-spinner [diameter]=\"28\" class=\"relative\"></mat-spinner>\n <span class=\"text-sm text-gray-700 mt-3 relative\">{{ message }}</span>\n</div>\n", styles: ["::ng-deep .mat-spinner circle{stroke:var(--color-gray-700);opacity:.5}.backdrop{background-color:#fff6}@supports (-webkit-backdrop-filter: blur()) or (backdrop-filter: blur()){.backdrop{background-color:transparent;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.background{opacity:.7}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23569
23421
|
}
|
|
23570
|
-
|
|
23571
|
-
|
|
23572
|
-
[
|
|
23573
|
-
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
main_font = 'sans-serif'
|
|
23577
|
-
`;
|
|
23578
|
-
const wrongLanguageCodeConfigFixture = () => `
|
|
23579
|
-
[global]
|
|
23580
|
-
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
23581
|
-
proxy_path = "/proxy/?url="
|
|
23582
|
-
metadata_language = "abc"
|
|
23583
|
-
|
|
23584
|
-
[map]
|
|
23585
|
-
|
|
23586
|
-
[theme]
|
|
23587
|
-
primary_color = "#093564"
|
|
23588
|
-
secondary_color = "#c2e9dc"
|
|
23589
|
-
main_color = "#212029" # All-purpose text color
|
|
23590
|
-
background_color = "#fdfbff"
|
|
23591
|
-
`;
|
|
23592
|
-
const unrecognizedKeysConfigFixture = () => `
|
|
23593
|
-
[global]
|
|
23594
|
-
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
23595
|
-
proxy_path = "/proxy/?url="
|
|
23596
|
-
metadata_language = "fre"
|
|
23597
|
-
another_path = '/whatever'
|
|
23598
|
-
|
|
23599
|
-
[map]
|
|
23600
|
-
max_zoom = 10
|
|
23601
|
-
max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
|
|
23602
|
-
do_not_use_default_basemap = false
|
|
23603
|
-
external_viewer_url_template = 'https://example.com/myviewer?'
|
|
23604
|
-
external_viewer_open_new_tab = true
|
|
23605
|
-
another_zoom = 15
|
|
23606
|
-
[[map_layer]]
|
|
23607
|
-
type = "wms"
|
|
23608
|
-
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
23609
|
-
name = "masque_hdf_ign_carto_latin1"
|
|
23610
|
-
[[map_layer]]
|
|
23611
|
-
type = "wfs"
|
|
23612
|
-
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
23613
|
-
name = "masque_hdf_ign_carto_latin1"
|
|
23614
|
-
another_layer = "wrong layer definition"
|
|
23615
|
-
|
|
23616
|
-
[theme]
|
|
23617
|
-
primary_color = "#093564"
|
|
23618
|
-
secondary_color = "#c2e9dc"
|
|
23619
|
-
main_color = "#212029" # All-purpose text color
|
|
23620
|
-
background_color = "#fdfbff"
|
|
23621
|
-
thumbnail_placeholder = 'assets/img/placeholder.svg'
|
|
23622
|
-
header_background = 'teal'
|
|
23623
|
-
header_foreground_color = "#872e2e"
|
|
23624
|
-
main_font = 'sans-serif'
|
|
23625
|
-
title_font = 'serif'
|
|
23626
|
-
another_color = 'red'
|
|
23627
|
-
`;
|
|
23422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LoadingMaskComponent, decorators: [{
|
|
23423
|
+
type: Component,
|
|
23424
|
+
args: [{ selector: 'gn-ui-loading-mask', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatProgressSpinnerModule], standalone: true, template: "<div class=\"h-full flex flex-col justify-center items-center relative backdrop\">\n <div class=\"absolute background bg-white inset-0\"></div>\n <mat-spinner [diameter]=\"28\" class=\"relative\"></mat-spinner>\n <span class=\"text-sm text-gray-700 mt-3 relative\">{{ message }}</span>\n</div>\n", styles: ["::ng-deep .mat-spinner circle{stroke:var(--color-gray-700);opacity:.5}.backdrop{background-color:#fff6}@supports (-webkit-backdrop-filter: blur()) or (backdrop-filter: blur()){.backdrop{background-color:transparent;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.background{opacity:.7}\n"] }]
|
|
23425
|
+
}], propDecorators: { message: [{
|
|
23426
|
+
type: Input
|
|
23427
|
+
}] } });
|
|
23628
23428
|
|
|
23629
|
-
|
|
23630
|
-
|
|
23631
|
-
|
|
23632
|
-
return {
|
|
23633
|
-
type: 'wms',
|
|
23634
|
-
url: config.URL,
|
|
23635
|
-
name: config.NAME,
|
|
23636
|
-
};
|
|
23637
|
-
case 'wfs':
|
|
23638
|
-
return {
|
|
23639
|
-
type: 'wfs',
|
|
23640
|
-
url: config.URL,
|
|
23641
|
-
featureType: config.NAME,
|
|
23642
|
-
};
|
|
23643
|
-
case 'xyz':
|
|
23644
|
-
return {
|
|
23645
|
-
type: config.TYPE,
|
|
23646
|
-
url: config.URL,
|
|
23647
|
-
};
|
|
23648
|
-
case 'geojson':
|
|
23649
|
-
return {
|
|
23650
|
-
type: config.TYPE,
|
|
23651
|
-
...(config.DATA ? { data: config.DATA } : { url: config.URL }),
|
|
23652
|
-
};
|
|
23653
|
-
case 'maplibre-style':
|
|
23654
|
-
return {
|
|
23655
|
-
type: config.TYPE,
|
|
23656
|
-
styleUrl: config.STYLE_URL,
|
|
23657
|
-
accessToken: config.ACCESS_TOKEN,
|
|
23658
|
-
};
|
|
23659
|
-
}
|
|
23429
|
+
class ColorScaleComponent {
|
|
23430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ColorScaleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23431
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: ColorScaleComponent, isStandalone: true, selector: "gn-ui-color-scale", ngImport: i0, template: "<div class=\"flex flex-row items-center\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">primary</div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-black\"\n title=\"primary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darkest\"\n title=\"primary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darker\"\n title=\"primary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary border-2 border-primary-darkest\"\n title=\"primary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lighter\"\n title=\"primary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lightest\"\n title=\"primary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-white\"\n title=\"primary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">\n secondary\n </div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-black\"\n title=\"secondary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darkest\"\n title=\"secondary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darker\"\n title=\"secondary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary border-2 border-secondary-darkest\"\n title=\"secondary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lighter\"\n title=\"secondary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lightest\"\n title=\"secondary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-white\"\n title=\"secondary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">main</div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-main\" title=\"main\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-900\" title=\"gray-900\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-800\" title=\"gray-800\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-700\" title=\"gray-700\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-600\" title=\"gray-600\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-500\" title=\"gray-500\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-400\" title=\"gray-400\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-300\" title=\"gray-300\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-200\" title=\"gray-200\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-100\" title=\"gray-100\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-50\" title=\"gray-50\"></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-background\"\n title=\"background\"\n ></div>\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32\">background</div>\n</div>\n", styles: [""] }); }
|
|
23660
23432
|
}
|
|
23433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ColorScaleComponent, decorators: [{
|
|
23434
|
+
type: Component,
|
|
23435
|
+
args: [{ selector: 'gn-ui-color-scale', standalone: true, template: "<div class=\"flex flex-row items-center\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">primary</div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-black\"\n title=\"primary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darkest\"\n title=\"primary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darker\"\n title=\"primary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary border-2 border-primary-darkest\"\n title=\"primary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lighter\"\n title=\"primary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lightest\"\n title=\"primary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-white\"\n title=\"primary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">\n secondary\n </div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-black\"\n title=\"secondary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darkest\"\n title=\"secondary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darker\"\n title=\"secondary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary border-2 border-secondary-darkest\"\n title=\"secondary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lighter\"\n title=\"secondary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lightest\"\n title=\"secondary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-white\"\n title=\"secondary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">main</div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-main\" title=\"main\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-900\" title=\"gray-900\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-800\" title=\"gray-800\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-700\" title=\"gray-700\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-600\" title=\"gray-600\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-500\" title=\"gray-500\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-400\" title=\"gray-400\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-300\" title=\"gray-300\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-200\" title=\"gray-200\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-100\" title=\"gray-100\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-50\" title=\"gray-50\"></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-background\"\n title=\"background\"\n ></div>\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32\">background</div>\n</div>\n" }]
|
|
23436
|
+
}] });
|
|
23661
23437
|
|
|
23662
|
-
class
|
|
23438
|
+
class PopupAlertComponent {
|
|
23663
23439
|
constructor() {
|
|
23664
|
-
this.
|
|
23665
|
-
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
color: isConfigLoaded() ? getThemeConfig().SECONDARY_COLOR : 'red',
|
|
23670
|
-
isFocused: true,
|
|
23671
|
-
})),
|
|
23672
|
-
};
|
|
23440
|
+
this.changeDetector = inject(ChangeDetectorRef);
|
|
23441
|
+
this.type = 'info';
|
|
23442
|
+
this.position = 'top';
|
|
23443
|
+
this.expanded = false;
|
|
23444
|
+
this.timeout = null;
|
|
23673
23445
|
}
|
|
23674
|
-
|
|
23675
|
-
const
|
|
23676
|
-
|
|
23677
|
-
return {
|
|
23678
|
-
polygon: new Style({
|
|
23679
|
-
fill: new Fill({
|
|
23680
|
-
color: this.computeTransparentFillColor(color),
|
|
23681
|
-
}),
|
|
23682
|
-
stroke: new Stroke({
|
|
23683
|
-
color: 'white',
|
|
23684
|
-
width: 2,
|
|
23685
|
-
}),
|
|
23686
|
-
zIndex,
|
|
23687
|
-
}),
|
|
23688
|
-
point: new Style({
|
|
23689
|
-
image: new CircleStyle({
|
|
23690
|
-
fill: new Fill({
|
|
23691
|
-
color,
|
|
23692
|
-
}),
|
|
23693
|
-
stroke: new Stroke({
|
|
23694
|
-
color: 'white',
|
|
23695
|
-
width: isFocused ? 3 : 2,
|
|
23696
|
-
}),
|
|
23697
|
-
radius: isFocused ? 8 : 7,
|
|
23698
|
-
}),
|
|
23699
|
-
zIndex,
|
|
23700
|
-
}),
|
|
23701
|
-
line: [
|
|
23702
|
-
new Style({
|
|
23703
|
-
stroke: new Stroke({
|
|
23704
|
-
color: 'white',
|
|
23705
|
-
width: isFocused ? 8 : 6,
|
|
23706
|
-
}),
|
|
23707
|
-
zIndex,
|
|
23708
|
-
}),
|
|
23709
|
-
new Style({
|
|
23710
|
-
stroke: new Stroke({
|
|
23711
|
-
color,
|
|
23712
|
-
width: isFocused ? 3 : 2,
|
|
23713
|
-
}),
|
|
23714
|
-
zIndex,
|
|
23715
|
-
}),
|
|
23716
|
-
],
|
|
23717
|
-
};
|
|
23446
|
+
get showDuration() {
|
|
23447
|
+
const chars = this.content.nativeElement.innerHTML.length;
|
|
23448
|
+
return Math.max(3000, chars * 20);
|
|
23718
23449
|
}
|
|
23719
|
-
|
|
23720
|
-
|
|
23721
|
-
|
|
23722
|
-
|
|
23723
|
-
|
|
23724
|
-
|
|
23725
|
-
|
|
23726
|
-
return styleByGeometryType.line;
|
|
23727
|
-
case 'Point':
|
|
23728
|
-
case 'MultiPoint':
|
|
23729
|
-
return styleByGeometryType.point;
|
|
23730
|
-
case 'Circle':
|
|
23731
|
-
case 'Polygon':
|
|
23732
|
-
case 'MultiPolygon':
|
|
23733
|
-
return styleByGeometryType.polygon;
|
|
23734
|
-
default:
|
|
23735
|
-
return styleByGeometryType.point;
|
|
23736
|
-
}
|
|
23737
|
-
};
|
|
23450
|
+
ngOnInit() {
|
|
23451
|
+
this.expandAndClose();
|
|
23452
|
+
}
|
|
23453
|
+
expand() {
|
|
23454
|
+
this.expanded = true;
|
|
23455
|
+
this.changeDetector.detectChanges();
|
|
23456
|
+
clearTimeout(this.timeout);
|
|
23738
23457
|
}
|
|
23739
|
-
|
|
23740
|
-
|
|
23458
|
+
expandAndClose() {
|
|
23459
|
+
this.expanded = true;
|
|
23460
|
+
this.changeDetector.detectChanges();
|
|
23461
|
+
clearTimeout(this.timeout);
|
|
23462
|
+
this.timeout = setTimeout(() => {
|
|
23463
|
+
this.expanded = false;
|
|
23464
|
+
this.changeDetector.detectChanges();
|
|
23465
|
+
}, this.showDuration);
|
|
23741
23466
|
}
|
|
23742
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type:
|
|
23743
|
-
static { this.ɵ
|
|
23467
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopupAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23468
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: PopupAlertComponent, isStandalone: true, selector: "gn-ui-popup-alert", inputs: { icon: "icon", type: "type", position: "position" }, providers: [
|
|
23469
|
+
provideIcons({ matErrorOutlineOutline }),
|
|
23470
|
+
provideNgIconsConfig({
|
|
23471
|
+
size: '1.5em',
|
|
23472
|
+
}),
|
|
23473
|
+
], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<div class=\"h-full relative container\">\n <div\n class=\"pointer-events-auto absolute text-white flex flex-row p-2 rounded message\"\n role=\"alert\"\n [ngClass]=\"{\n 'position-bottom': position === 'bottom',\n 'position-top': position === 'top',\n expanded: this.expanded,\n 'bg-red-500': type === 'danger',\n 'bg-yellow-500': type === 'warning',\n 'bg-blue-500': type === 'info',\n }\"\n (mouseenter)=\"expand()\"\n (mouseleave)=\"expandAndClose()\"\n >\n <ng-icon class=\"mr-2 shrink-0 select-none\" [name]=\"icon\"></ng-icon>\n <div class=\"grow\" #content [ngClass]=\"{ invisible: !expanded }\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{pointer-events:none}.container{filter:drop-shadow(0px 4px 3px rgba(0,0,0,.2))}.message{transition:clip-path .3s cubic-bezier(.25,.46,.45,.94)}.message.expanded{clip-path:circle(100%)}.position-top{clip-path:circle(19px at 20px 20px);align-items:start;top:0;left:0}.position-bottom{clip-path:circle(19px at 20px calc(100% - 20px));align-items:end;bottom:0;left:0}.container ::ng-deep a{text-decoration:underline;font-weight:700}.container ::ng-deep a:hover{opacity:.85}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23744
23474
|
}
|
|
23745
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type:
|
|
23746
|
-
type:
|
|
23747
|
-
args: [{
|
|
23748
|
-
|
|
23749
|
-
|
|
23750
|
-
|
|
23475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopupAlertComponent, decorators: [{
|
|
23476
|
+
type: Component,
|
|
23477
|
+
args: [{ selector: 'gn-ui-popup-alert', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, NgIconComponent], providers: [
|
|
23478
|
+
provideIcons({ matErrorOutlineOutline }),
|
|
23479
|
+
provideNgIconsConfig({
|
|
23480
|
+
size: '1.5em',
|
|
23481
|
+
}),
|
|
23482
|
+
], template: "<div class=\"h-full relative container\">\n <div\n class=\"pointer-events-auto absolute text-white flex flex-row p-2 rounded message\"\n role=\"alert\"\n [ngClass]=\"{\n 'position-bottom': position === 'bottom',\n 'position-top': position === 'top',\n expanded: this.expanded,\n 'bg-red-500': type === 'danger',\n 'bg-yellow-500': type === 'warning',\n 'bg-blue-500': type === 'info',\n }\"\n (mouseenter)=\"expand()\"\n (mouseleave)=\"expandAndClose()\"\n >\n <ng-icon class=\"mr-2 shrink-0 select-none\" [name]=\"icon\"></ng-icon>\n <div class=\"grow\" #content [ngClass]=\"{ invisible: !expanded }\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{pointer-events:none}.container{filter:drop-shadow(0px 4px 3px rgba(0,0,0,.2))}.message{transition:clip-path .3s cubic-bezier(.25,.46,.45,.94)}.message.expanded{clip-path:circle(100%)}.position-top{clip-path:circle(19px at 20px 20px);align-items:start;top:0;left:0}.position-bottom{clip-path:circle(19px at 20px calc(100% - 20px));align-items:end;bottom:0;left:0}.container ::ng-deep a{text-decoration:underline;font-weight:700}.container ::ng-deep a:hover{opacity:.85}\n"] }]
|
|
23483
|
+
}], propDecorators: { icon: [{
|
|
23484
|
+
type: Input
|
|
23485
|
+
}], type: [{
|
|
23486
|
+
type: Input
|
|
23487
|
+
}], position: [{
|
|
23488
|
+
type: Input
|
|
23489
|
+
}], content: [{
|
|
23490
|
+
type: ViewChild,
|
|
23491
|
+
args: ['content']
|
|
23492
|
+
}] } });
|
|
23751
23493
|
|
|
23752
|
-
|
|
23753
|
-
|
|
23754
|
-
|
|
23755
|
-
|
|
23756
|
-
|
|
23757
|
-
|
|
23758
|
-
|
|
23759
|
-
})
|
|
23760
|
-
stroke: new Stroke({
|
|
23761
|
-
color: colorStroke,
|
|
23762
|
-
width: 2,
|
|
23763
|
-
}),
|
|
23764
|
-
radius: 5,
|
|
23765
|
-
}),
|
|
23766
|
-
fill: new Fill({
|
|
23767
|
-
color: 'rgba(0,0,255,0.25)',
|
|
23768
|
-
}),
|
|
23769
|
-
stroke: new Stroke({
|
|
23770
|
-
color: colorStroke,
|
|
23771
|
-
width: 2,
|
|
23772
|
-
}),
|
|
23773
|
-
});
|
|
23774
|
-
const defaultMapStyleHlFixture = () => new Style({
|
|
23775
|
-
image: new Circle({
|
|
23776
|
-
fill: new Fill({
|
|
23777
|
-
color: colorSecondary,
|
|
23778
|
-
}),
|
|
23779
|
-
stroke: new Stroke({
|
|
23780
|
-
color: colorStroke,
|
|
23781
|
-
width: 3,
|
|
23782
|
-
}),
|
|
23783
|
-
radius: 6,
|
|
23784
|
-
}),
|
|
23785
|
-
fill: new Fill({
|
|
23786
|
-
color: 'rgba(255,0,0,0.25)',
|
|
23787
|
-
}),
|
|
23788
|
-
stroke: new Stroke({
|
|
23789
|
-
color: colorSecondary,
|
|
23790
|
-
width: 3,
|
|
23791
|
-
}),
|
|
23792
|
-
});
|
|
23494
|
+
class SpinningLoaderComponent {
|
|
23495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinningLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23496
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: SpinningLoaderComponent, isStandalone: true, selector: "gn-ui-spinning-loader", ngImport: i0, template: "<span>\n <svg\n class=\"animate-spin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n class=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n ></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n</span>\n", styles: [""] }); }
|
|
23497
|
+
}
|
|
23498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinningLoaderComponent, decorators: [{
|
|
23499
|
+
type: Component,
|
|
23500
|
+
args: [{ selector: 'gn-ui-spinning-loader', standalone: true, template: "<span>\n <svg\n class=\"animate-spin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n class=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n ></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n</span>\n" }]
|
|
23501
|
+
}] });
|
|
23793
23502
|
|
|
23794
|
-
class
|
|
23503
|
+
class ButtonComponent {
|
|
23795
23504
|
constructor() {
|
|
23796
|
-
this.
|
|
23797
|
-
this.disabled = false;
|
|
23798
|
-
this.observer = new MutationObserver(() => {
|
|
23799
|
-
this.refreshDisabledState();
|
|
23800
|
-
});
|
|
23801
|
-
this.inView = false;
|
|
23802
|
-
this.initialized = false;
|
|
23803
|
-
}
|
|
23804
|
-
get elementClass() {
|
|
23805
|
-
if (this.disabled) {
|
|
23806
|
-
return this.disabledClass;
|
|
23807
|
-
}
|
|
23808
|
-
if (this.inView) {
|
|
23809
|
-
return `${this.inViewClass} ${this.enabledClass}`;
|
|
23810
|
-
}
|
|
23811
|
-
else {
|
|
23812
|
-
return `${this.outOfViewClass} ${this.enabledClass}`;
|
|
23813
|
-
}
|
|
23814
|
-
}
|
|
23815
|
-
ngOnInit() {
|
|
23816
|
-
this.observer.observe(document.body, {
|
|
23817
|
-
childList: true,
|
|
23818
|
-
subtree: true,
|
|
23819
|
-
});
|
|
23820
|
-
this.refreshDisabledState();
|
|
23821
|
-
}
|
|
23822
|
-
ngAfterViewChecked() {
|
|
23823
|
-
if (!this.initialized && !this.disabled) {
|
|
23824
|
-
const target = document.getElementById(this.targetId);
|
|
23825
|
-
if (target) {
|
|
23826
|
-
this.initializeIntersectionObserver(target);
|
|
23827
|
-
this.initialized = true;
|
|
23828
|
-
}
|
|
23829
|
-
}
|
|
23830
|
-
}
|
|
23831
|
-
initializeIntersectionObserver(target) {
|
|
23832
|
-
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
23833
|
-
entries.forEach((entry) => {
|
|
23834
|
-
this.inView = entry.isIntersecting;
|
|
23835
|
-
this.changeDetector.detectChanges();
|
|
23836
|
-
});
|
|
23837
|
-
}, {
|
|
23838
|
-
root: null,
|
|
23839
|
-
rootMargin: '-30% 0% -60% 0%',
|
|
23840
|
-
});
|
|
23841
|
-
this.intersectionObserver.observe(target);
|
|
23842
|
-
}
|
|
23843
|
-
ngOnDestroy() {
|
|
23844
|
-
this.observer.disconnect();
|
|
23845
|
-
if (this.intersectionObserver) {
|
|
23846
|
-
this.intersectionObserver.disconnect();
|
|
23847
|
-
}
|
|
23848
|
-
}
|
|
23849
|
-
refreshDisabledState() {
|
|
23850
|
-
const targetNotPresent = !document.getElementById(this.targetId);
|
|
23851
|
-
if (targetNotPresent !== this.disabled) {
|
|
23852
|
-
this.disabled = targetNotPresent;
|
|
23853
|
-
this.changeDetector.detectChanges();
|
|
23854
|
-
}
|
|
23855
|
-
}
|
|
23856
|
-
scrollToTarget() {
|
|
23857
|
-
const target = document.getElementById(this.targetId);
|
|
23858
|
-
if (!target)
|
|
23859
|
-
return;
|
|
23860
|
-
target.scrollIntoView({
|
|
23861
|
-
behavior: 'smooth',
|
|
23862
|
-
block: 'start',
|
|
23863
|
-
});
|
|
23864
|
-
}
|
|
23865
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnchorLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23866
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.19", type: AnchorLinkDirective, isStandalone: true, selector: "[gnUiAnchorLink]", inputs: { targetId: ["gnUiAnchorLink", "targetId"], disabledClass: ["gnUiAnchorLinkDisabledClass", "disabledClass"], enabledClass: ["gnUiAnchorLinkEnabledClass", "enabledClass"], inViewClass: ["gnUiAnchorLinkInViewClass", "inViewClass"], outOfViewClass: ["gnUiAnchorLinkOutOfViewClass", "outOfViewClass"] }, host: { listeners: { "click": "scrollToTarget()" }, properties: { "class": "this.elementClass" } }, ngImport: i0 }); }
|
|
23867
|
-
}
|
|
23868
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnchorLinkDirective, decorators: [{
|
|
23869
|
-
type: Directive,
|
|
23870
|
-
args: [{
|
|
23871
|
-
selector: '[gnUiAnchorLink]',
|
|
23872
|
-
standalone: true,
|
|
23873
|
-
}]
|
|
23874
|
-
}], propDecorators: { targetId: [{
|
|
23875
|
-
type: Input,
|
|
23876
|
-
args: ['gnUiAnchorLink']
|
|
23877
|
-
}], disabledClass: [{
|
|
23878
|
-
type: Input,
|
|
23879
|
-
args: ['gnUiAnchorLinkDisabledClass']
|
|
23880
|
-
}], enabledClass: [{
|
|
23881
|
-
type: Input,
|
|
23882
|
-
args: ['gnUiAnchorLinkEnabledClass']
|
|
23883
|
-
}], inViewClass: [{
|
|
23884
|
-
type: Input,
|
|
23885
|
-
args: ['gnUiAnchorLinkInViewClass']
|
|
23886
|
-
}], outOfViewClass: [{
|
|
23887
|
-
type: Input,
|
|
23888
|
-
args: ['gnUiAnchorLinkOutOfViewClass']
|
|
23889
|
-
}], elementClass: [{
|
|
23890
|
-
type: HostBinding,
|
|
23891
|
-
args: ['class']
|
|
23892
|
-
}], scrollToTarget: [{
|
|
23893
|
-
type: HostListener,
|
|
23894
|
-
args: ['click']
|
|
23895
|
-
}] } });
|
|
23896
|
-
|
|
23897
|
-
class PaginationDotsComponent {
|
|
23898
|
-
constructor() {
|
|
23899
|
-
this.containerClass = '';
|
|
23900
|
-
}
|
|
23901
|
-
// 1-based
|
|
23902
|
-
get steps() {
|
|
23903
|
-
return Array.from({ length: this.listComponent.pagesCount }, (_, i) => i + 1);
|
|
23904
|
-
}
|
|
23905
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PaginationDotsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23906
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: PaginationDotsComponent, isStandalone: true, selector: "gn-ui-pagination-dots", inputs: { listComponent: "listComponent", containerClass: "containerClass" }, ngImport: i0, template: "@if (listComponent.pagesCount > 1) {\n <div\n class=\"overflow-hidden flex flex-row justify-center gap-[14px] p-1\"\n [ngClass]=\"containerClass\"\n >\n @for (step of steps; track step) {\n <button\n type=\"button\"\n class=\"pagination-dot\"\n (click)=\"listComponent.goToPage(step)\"\n [ngClass]=\"\n listComponent.currentPage === step ? 'bg-primary' : 'bg-gray-400'\n \"\n ></button>\n }\n </div>\n}\n", styles: [".pagination-dot{width:6px;height:6px;border-radius:6px;position:relative;flex-shrink:0}.pagination-dot:after{content:\"\";position:absolute;left:-7px;top:-7px;width:20px;height:20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], viewProviders: [
|
|
23907
|
-
provideIcons({
|
|
23908
|
-
iconoirNavArrowRight,
|
|
23909
|
-
iconoirNavArrowLeft,
|
|
23910
|
-
}),
|
|
23911
|
-
] }); }
|
|
23912
|
-
}
|
|
23913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PaginationDotsComponent, decorators: [{
|
|
23914
|
-
type: Component,
|
|
23915
|
-
args: [{ selector: 'gn-ui-pagination-dots', standalone: true, imports: [CommonModule], viewProviders: [
|
|
23916
|
-
provideIcons({
|
|
23917
|
-
iconoirNavArrowRight,
|
|
23918
|
-
iconoirNavArrowLeft,
|
|
23919
|
-
}),
|
|
23920
|
-
], template: "@if (listComponent.pagesCount > 1) {\n <div\n class=\"overflow-hidden flex flex-row justify-center gap-[14px] p-1\"\n [ngClass]=\"containerClass\"\n >\n @for (step of steps; track step) {\n <button\n type=\"button\"\n class=\"pagination-dot\"\n (click)=\"listComponent.goToPage(step)\"\n [ngClass]=\"\n listComponent.currentPage === step ? 'bg-primary' : 'bg-gray-400'\n \"\n ></button>\n }\n </div>\n}\n", styles: [".pagination-dot{width:6px;height:6px;border-radius:6px;position:relative;flex-shrink:0}.pagination-dot:after{content:\"\";position:absolute;left:-7px;top:-7px;width:20px;height:20px}\n"] }]
|
|
23921
|
-
}], propDecorators: { listComponent: [{
|
|
23922
|
-
type: Input
|
|
23923
|
-
}], containerClass: [{
|
|
23924
|
-
type: Input
|
|
23925
|
-
}] } });
|
|
23926
|
-
|
|
23927
|
-
class CarouselComponent {
|
|
23928
|
-
constructor() {
|
|
23929
|
-
this.changeDetector = inject(ChangeDetectorRef);
|
|
23930
|
-
this.containerClass = '';
|
|
23931
|
-
this.stepsContainerClass = 'w-full bottom-0 top-auto';
|
|
23932
|
-
this.currentStepChange = new EventEmitter();
|
|
23933
|
-
this.steps = [];
|
|
23934
|
-
this.currentStep = 0;
|
|
23935
|
-
this.refreshSteps = () => {
|
|
23936
|
-
this.steps = this.emblaApi.scrollSnapList();
|
|
23937
|
-
this.currentStep = this.emblaApi.selectedScrollSnap();
|
|
23938
|
-
this.currentStepChange.emit(this.currentStep);
|
|
23939
|
-
this.changeDetector.detectChanges();
|
|
23940
|
-
};
|
|
23941
|
-
}
|
|
23942
|
-
// Paginable API
|
|
23943
|
-
get isFirstPage() {
|
|
23944
|
-
return this.currentStep === 0;
|
|
23945
|
-
}
|
|
23946
|
-
get isLastPage() {
|
|
23947
|
-
return this.currentStep === this.steps.length - 1;
|
|
23948
|
-
}
|
|
23949
|
-
get currentPage() {
|
|
23950
|
-
return this.currentStep + 1; // this is 1-based
|
|
23951
|
-
}
|
|
23952
|
-
get pagesCount() {
|
|
23953
|
-
return this.steps.length;
|
|
23954
|
-
}
|
|
23955
|
-
goToPage(stepIndex) {
|
|
23956
|
-
this.emblaApi.scrollTo(stepIndex - 1); // this is 0-based
|
|
23957
|
-
}
|
|
23958
|
-
goToPrevPage() {
|
|
23959
|
-
if (this.isFirstPage)
|
|
23960
|
-
return;
|
|
23961
|
-
this.emblaApi.scrollPrev();
|
|
23962
|
-
}
|
|
23963
|
-
goToNextPage() {
|
|
23964
|
-
if (this.isLastPage)
|
|
23965
|
-
return;
|
|
23966
|
-
this.emblaApi.scrollNext();
|
|
23967
|
-
}
|
|
23968
|
-
ngAfterViewInit() {
|
|
23969
|
-
this.emblaApi = EmblaCarousel(this.carouselOverflowContainer.nativeElement, {
|
|
23970
|
-
duration: 15,
|
|
23971
|
-
});
|
|
23972
|
-
this.emblaApi
|
|
23973
|
-
.on('init', this.refreshSteps)
|
|
23974
|
-
.on('reInit', this.refreshSteps)
|
|
23975
|
-
.on('select', this.refreshSteps);
|
|
23976
|
-
}
|
|
23977
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23978
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: CarouselComponent, isStandalone: true, selector: "gn-ui-carousel", inputs: { containerClass: "containerClass", stepsContainerClass: "stepsContainerClass" }, outputs: { currentStepChange: "currentStepChange" }, viewQueries: [{ propertyName: "carouselOverflowContainer", first: true, predicate: ["carouselOverflowContainer"], descendants: true }], ngImport: i0, template: "<div #carouselOverflowContainer class=\"w-full block\">\n <div class=\"carousel-container flex\" [ngClass]=\"containerClass\">\n <ng-content></ng-content>\n </div>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + stepsContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host{position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PaginationDotsComponent, selector: "gn-ui-pagination-dots", inputs: ["listComponent", "containerClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23979
|
-
}
|
|
23980
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
23981
|
-
type: Component,
|
|
23982
|
-
args: [{ selector: 'gn-ui-carousel', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, PaginationDotsComponent], template: "<div #carouselOverflowContainer class=\"w-full block\">\n <div class=\"carousel-container flex\" [ngClass]=\"containerClass\">\n <ng-content></ng-content>\n </div>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + stepsContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host{position:relative}\n"] }]
|
|
23983
|
-
}], propDecorators: { carouselOverflowContainer: [{
|
|
23984
|
-
type: ViewChild,
|
|
23985
|
-
args: ['carouselOverflowContainer']
|
|
23986
|
-
}], containerClass: [{
|
|
23987
|
-
type: Input
|
|
23988
|
-
}], stepsContainerClass: [{
|
|
23989
|
-
type: Input
|
|
23990
|
-
}], currentStepChange: [{
|
|
23991
|
-
type: Output
|
|
23992
|
-
}] } });
|
|
23993
|
-
|
|
23994
|
-
class ProgressBarComponent {
|
|
23995
|
-
constructor() {
|
|
23996
|
-
this.value = 0;
|
|
23997
|
-
this.type = 'default';
|
|
23998
|
-
}
|
|
23999
|
-
get progress() {
|
|
24000
|
-
return this.value > 0 ? (this.value < 100 ? this.value : 100) : 0;
|
|
24001
|
-
}
|
|
24002
|
-
get color() {
|
|
24003
|
-
switch (this.type) {
|
|
24004
|
-
case 'default':
|
|
24005
|
-
return {
|
|
24006
|
-
outerBar: 'bg-gray-200',
|
|
24007
|
-
innerBar: 'bg-gray-100',
|
|
24008
|
-
text: 'text-gray-900',
|
|
24009
|
-
};
|
|
24010
|
-
case 'primary':
|
|
24011
|
-
return {
|
|
24012
|
-
outerBar: 'bg-primary',
|
|
24013
|
-
innerBar: 'bg-primary-lighter',
|
|
24014
|
-
text: 'text-white',
|
|
24015
|
-
};
|
|
24016
|
-
case 'secondary':
|
|
24017
|
-
return {
|
|
24018
|
-
outerBar: 'bg-secondary',
|
|
24019
|
-
innerBar: 'bg-secondary-lighter',
|
|
24020
|
-
text: 'text-white',
|
|
24021
|
-
};
|
|
24022
|
-
case 'light':
|
|
24023
|
-
return {
|
|
24024
|
-
outerBar: 'bg-primary-white',
|
|
24025
|
-
innerBar: 'bg-primary',
|
|
24026
|
-
text: 'text-main',
|
|
24027
|
-
};
|
|
24028
|
-
}
|
|
24029
|
-
}
|
|
24030
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24031
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ProgressBarComponent, isStandalone: true, selector: "gn-ui-progress-bar", inputs: { value: "value", type: "type" }, ngImport: i0, template: "@switch (type) {\n <!-- Light Theme -->\n @case ('light') {\n <div class=\"flex items-center relative\">\n <div\n class=\"flex-shrink-0 {{ color.text }} font-medium mr-2\n text-opacity-100 !text-slate-800\"\n data-cy=\"progressPercentage\"\n >\n {{ progress }}%\n </div>\n <div class=\"flex-grow h-[4px] w-[52px] {{ color.outerBar }} rounded-full\">\n <div\n [style.width.%]=\"progress\"\n class=\"{{ color.innerBar }} transition-width duration-500\n ease-in-out rounded-full shadow-sm w-[52px] h-[4px]\"\n ></div>\n </div>\n </div>\n }\n <!-- Default / Primary / Secondary Themes -->\n @default {\n <div class=\"flex h-full {{ color.outerBar }} rounded-t-lg rounded-b-lg\">\n <div\n [style.width.%]=\"progress\"\n class=\"flex {{ color.innerBar }} my-1 mx-1 transition-width\n duration-500 ease-in-out rounded-t-md rounded-b-md shadow-xl\"\n >\n <div\n class=\"flex items-center pl-2 py-1 {{ color.text }} font-bold text-4\"\n >\n {{ progress }}%\n </div>\n </div>\n </div>\n }\n}\n", styles: [".font-bold{font-weight:var(--progress-bar-font-weight, \"bold\")}\n"] }); }
|
|
24032
|
-
}
|
|
24033
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
24034
|
-
type: Component,
|
|
24035
|
-
args: [{ selector: 'gn-ui-progress-bar', standalone: true, imports: [], template: "@switch (type) {\n <!-- Light Theme -->\n @case ('light') {\n <div class=\"flex items-center relative\">\n <div\n class=\"flex-shrink-0 {{ color.text }} font-medium mr-2\n text-opacity-100 !text-slate-800\"\n data-cy=\"progressPercentage\"\n >\n {{ progress }}%\n </div>\n <div class=\"flex-grow h-[4px] w-[52px] {{ color.outerBar }} rounded-full\">\n <div\n [style.width.%]=\"progress\"\n class=\"{{ color.innerBar }} transition-width duration-500\n ease-in-out rounded-full shadow-sm w-[52px] h-[4px]\"\n ></div>\n </div>\n </div>\n }\n <!-- Default / Primary / Secondary Themes -->\n @default {\n <div class=\"flex h-full {{ color.outerBar }} rounded-t-lg rounded-b-lg\">\n <div\n [style.width.%]=\"progress\"\n class=\"flex {{ color.innerBar }} my-1 mx-1 transition-width\n duration-500 ease-in-out rounded-t-md rounded-b-md shadow-xl\"\n >\n <div\n class=\"flex items-center pl-2 py-1 {{ color.text }} font-bold text-4\"\n >\n {{ progress }}%\n </div>\n </div>\n </div>\n }\n}\n", styles: [".font-bold{font-weight:var(--progress-bar-font-weight, \"bold\")}\n"] }]
|
|
24036
|
-
}], propDecorators: { value: [{
|
|
24037
|
-
type: Input
|
|
24038
|
-
}], type: [{
|
|
24039
|
-
type: Input
|
|
24040
|
-
}] } });
|
|
24041
|
-
|
|
24042
|
-
class PopoverComponent {
|
|
24043
|
-
constructor() {
|
|
24044
|
-
this.viewContainerRef = inject(ViewContainerRef);
|
|
24045
|
-
this.renderer = inject(Renderer2);
|
|
24046
|
-
}
|
|
24047
|
-
getContent() {
|
|
24048
|
-
if (this.content instanceof TemplateRef) {
|
|
24049
|
-
if (this.view) {
|
|
24050
|
-
this.view.destroy();
|
|
24051
|
-
}
|
|
24052
|
-
this.view = this.viewContainerRef.createEmbeddedView(this.content);
|
|
24053
|
-
this.view.detectChanges();
|
|
24054
|
-
const wrapper = this.renderer.createElement('div'); // Create a wrapper div
|
|
24055
|
-
this.view.rootNodes.forEach((node) => {
|
|
24056
|
-
this.renderer.appendChild(wrapper, node); // Append each root node to the wrapper
|
|
24057
|
-
});
|
|
24058
|
-
return wrapper;
|
|
24059
|
-
}
|
|
24060
|
-
return this.content;
|
|
24061
|
-
}
|
|
24062
|
-
ngAfterViewInit() {
|
|
24063
|
-
this.tippyInstance = tippy(this.popoverContent.nativeElement, {
|
|
24064
|
-
content: this.getContent(),
|
|
24065
|
-
allowHTML: true,
|
|
24066
|
-
theme: this.theme,
|
|
24067
|
-
});
|
|
24068
|
-
}
|
|
24069
|
-
ngOnChanges(changes) {
|
|
24070
|
-
if (changes['theme']) {
|
|
24071
|
-
this.theme = changes['theme'].currentValue;
|
|
24072
|
-
if (this.tippyInstance) {
|
|
24073
|
-
this.tippyInstance.setProps({ theme: this.theme });
|
|
24074
|
-
}
|
|
24075
|
-
}
|
|
24076
|
-
if (changes['content']) {
|
|
24077
|
-
this.content = changes['content'].currentValue;
|
|
24078
|
-
if (this.tippyInstance) {
|
|
24079
|
-
this.tippyInstance.setContent(this.getContent());
|
|
24080
|
-
}
|
|
24081
|
-
}
|
|
24082
|
-
}
|
|
24083
|
-
ngOnDestroy() {
|
|
24084
|
-
if (this.tippyInstance) {
|
|
24085
|
-
this.tippyInstance.destroy();
|
|
24086
|
-
}
|
|
24087
|
-
if (this.view) {
|
|
24088
|
-
this.view.destroy();
|
|
24089
|
-
}
|
|
24090
|
-
}
|
|
24091
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24092
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: PopoverComponent, isStandalone: true, selector: "gn-ui-popover", inputs: { content: "content", theme: "theme" }, viewQueries: [{ propertyName: "popoverContent", first: true, predicate: ["popoverContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span #popoverContent>\n <ng-content></ng-content>\n</span>\n", styles: [""] }); }
|
|
24093
|
-
}
|
|
24094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
24095
|
-
type: Component,
|
|
24096
|
-
args: [{ selector: 'gn-ui-popover', standalone: true, imports: [], template: "<span #popoverContent>\n <ng-content></ng-content>\n</span>\n" }]
|
|
24097
|
-
}], propDecorators: { popoverContent: [{
|
|
24098
|
-
type: ViewChild,
|
|
24099
|
-
args: ['popoverContent', { static: false }]
|
|
24100
|
-
}], content: [{
|
|
24101
|
-
type: Input
|
|
24102
|
-
}], theme: [{
|
|
24103
|
-
type: Input
|
|
24104
|
-
}] } });
|
|
24105
|
-
|
|
24106
|
-
class LoadingMaskComponent {
|
|
24107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LoadingMaskComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: LoadingMaskComponent, isStandalone: true, selector: "gn-ui-loading-mask", inputs: { message: "message" }, ngImport: i0, template: "<div class=\"h-full flex flex-col justify-center items-center relative backdrop\">\n <div class=\"absolute background bg-white inset-0\"></div>\n <mat-spinner [diameter]=\"28\" class=\"relative\"></mat-spinner>\n <span class=\"text-sm text-gray-700 mt-3 relative\">{{ message }}</span>\n</div>\n", styles: ["::ng-deep .mat-spinner circle{stroke:var(--color-gray-700);opacity:.5}.backdrop{background-color:#fff6}@supports (-webkit-backdrop-filter: blur()) or (backdrop-filter: blur()){.backdrop{background-color:transparent;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.background{opacity:.7}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24109
|
-
}
|
|
24110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LoadingMaskComponent, decorators: [{
|
|
24111
|
-
type: Component,
|
|
24112
|
-
args: [{ selector: 'gn-ui-loading-mask', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatProgressSpinnerModule], standalone: true, template: "<div class=\"h-full flex flex-col justify-center items-center relative backdrop\">\n <div class=\"absolute background bg-white inset-0\"></div>\n <mat-spinner [diameter]=\"28\" class=\"relative\"></mat-spinner>\n <span class=\"text-sm text-gray-700 mt-3 relative\">{{ message }}</span>\n</div>\n", styles: ["::ng-deep .mat-spinner circle{stroke:var(--color-gray-700);opacity:.5}.backdrop{background-color:#fff6}@supports (-webkit-backdrop-filter: blur()) or (backdrop-filter: blur()){.backdrop{background-color:transparent;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.background{opacity:.7}\n"] }]
|
|
24113
|
-
}], propDecorators: { message: [{
|
|
24114
|
-
type: Input
|
|
24115
|
-
}] } });
|
|
24116
|
-
|
|
24117
|
-
class ColorScaleComponent {
|
|
24118
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ColorScaleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24119
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: ColorScaleComponent, isStandalone: true, selector: "gn-ui-color-scale", ngImport: i0, template: "<div class=\"flex flex-row items-center\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">primary</div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-black\"\n title=\"primary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darkest\"\n title=\"primary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darker\"\n title=\"primary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary border-2 border-primary-darkest\"\n title=\"primary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lighter\"\n title=\"primary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lightest\"\n title=\"primary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-white\"\n title=\"primary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">\n secondary\n </div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-black\"\n title=\"secondary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darkest\"\n title=\"secondary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darker\"\n title=\"secondary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary border-2 border-secondary-darkest\"\n title=\"secondary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lighter\"\n title=\"secondary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lightest\"\n title=\"secondary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-white\"\n title=\"secondary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">main</div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-main\" title=\"main\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-900\" title=\"gray-900\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-800\" title=\"gray-800\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-700\" title=\"gray-700\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-600\" title=\"gray-600\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-500\" title=\"gray-500\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-400\" title=\"gray-400\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-300\" title=\"gray-300\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-200\" title=\"gray-200\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-100\" title=\"gray-100\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-50\" title=\"gray-50\"></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-background\"\n title=\"background\"\n ></div>\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32\">background</div>\n</div>\n", styles: [""] }); }
|
|
24120
|
-
}
|
|
24121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ColorScaleComponent, decorators: [{
|
|
24122
|
-
type: Component,
|
|
24123
|
-
args: [{ selector: 'gn-ui-color-scale', standalone: true, template: "<div class=\"flex flex-row items-center\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">primary</div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-black\"\n title=\"primary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darkest\"\n title=\"primary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-darker\"\n title=\"primary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary border-2 border-primary-darkest\"\n title=\"primary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lighter\"\n title=\"primary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-lightest\"\n title=\"primary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-primary-white\"\n title=\"primary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">\n secondary\n </div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-black\"\n title=\"secondary-black\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darkest\"\n title=\"secondary-darkest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-darker\"\n title=\"secondary-darker\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary border-2 border-secondary-darkest\"\n title=\"secondary\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lighter\"\n title=\"secondary-lighter\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-lightest\"\n title=\"secondary-lightest\"\n ></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-secondary-white\"\n title=\"secondary-white\"\n ></div>\n</div>\n<div class=\"flex flex-row\">\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32 text-right\">main</div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-main\" title=\"main\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-900\" title=\"gray-900\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-800\" title=\"gray-800\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-700\" title=\"gray-700\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-600\" title=\"gray-600\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-500\" title=\"gray-500\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-400\" title=\"gray-400\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-300\" title=\"gray-300\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-200\" title=\"gray-200\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-100\" title=\"gray-100\"></div>\n <div class=\"shadow-md rounded w-6 h-6 m-2 bg-gray-50\" title=\"gray-50\"></div>\n <div\n class=\"shadow-md rounded w-6 h-6 m-2 bg-background\"\n title=\"background\"\n ></div>\n <div class=\"text-xs text-gray-700 font-bold m-2 w-32\">background</div>\n</div>\n" }]
|
|
24124
|
-
}] });
|
|
24125
|
-
|
|
24126
|
-
class PopupAlertComponent {
|
|
24127
|
-
constructor() {
|
|
24128
|
-
this.changeDetector = inject(ChangeDetectorRef);
|
|
24129
|
-
this.type = 'info';
|
|
24130
|
-
this.position = 'top';
|
|
24131
|
-
this.expanded = false;
|
|
24132
|
-
this.timeout = null;
|
|
24133
|
-
}
|
|
24134
|
-
get showDuration() {
|
|
24135
|
-
const chars = this.content.nativeElement.innerHTML.length;
|
|
24136
|
-
return Math.max(3000, chars * 20);
|
|
24137
|
-
}
|
|
24138
|
-
ngOnInit() {
|
|
24139
|
-
this.expandAndClose();
|
|
24140
|
-
}
|
|
24141
|
-
expand() {
|
|
24142
|
-
this.expanded = true;
|
|
24143
|
-
this.changeDetector.detectChanges();
|
|
24144
|
-
clearTimeout(this.timeout);
|
|
24145
|
-
}
|
|
24146
|
-
expandAndClose() {
|
|
24147
|
-
this.expanded = true;
|
|
24148
|
-
this.changeDetector.detectChanges();
|
|
24149
|
-
clearTimeout(this.timeout);
|
|
24150
|
-
this.timeout = setTimeout(() => {
|
|
24151
|
-
this.expanded = false;
|
|
24152
|
-
this.changeDetector.detectChanges();
|
|
24153
|
-
}, this.showDuration);
|
|
24154
|
-
}
|
|
24155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopupAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24156
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: PopupAlertComponent, isStandalone: true, selector: "gn-ui-popup-alert", inputs: { icon: "icon", type: "type", position: "position" }, providers: [
|
|
24157
|
-
provideIcons({ matErrorOutlineOutline }),
|
|
24158
|
-
provideNgIconsConfig({
|
|
24159
|
-
size: '1.5em',
|
|
24160
|
-
}),
|
|
24161
|
-
], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<div class=\"h-full relative container\">\n <div\n class=\"pointer-events-auto absolute text-white flex flex-row p-2 rounded message\"\n role=\"alert\"\n [ngClass]=\"{\n 'position-bottom': position === 'bottom',\n 'position-top': position === 'top',\n expanded: this.expanded,\n 'bg-red-500': type === 'danger',\n 'bg-yellow-500': type === 'warning',\n 'bg-blue-500': type === 'info',\n }\"\n (mouseenter)=\"expand()\"\n (mouseleave)=\"expandAndClose()\"\n >\n <ng-icon class=\"mr-2 shrink-0 select-none\" [name]=\"icon\"></ng-icon>\n <div class=\"grow\" #content [ngClass]=\"{ invisible: !expanded }\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{pointer-events:none}.container{filter:drop-shadow(0px 4px 3px rgba(0,0,0,.2))}.message{transition:clip-path .3s cubic-bezier(.25,.46,.45,.94)}.message.expanded{clip-path:circle(100%)}.position-top{clip-path:circle(19px at 20px 20px);align-items:start;top:0;left:0}.position-bottom{clip-path:circle(19px at 20px calc(100% - 20px));align-items:end;bottom:0;left:0}.container ::ng-deep a{text-decoration:underline;font-weight:700}.container ::ng-deep a:hover{opacity:.85}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24162
|
-
}
|
|
24163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PopupAlertComponent, decorators: [{
|
|
24164
|
-
type: Component,
|
|
24165
|
-
args: [{ selector: 'gn-ui-popup-alert', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, NgIconComponent], providers: [
|
|
24166
|
-
provideIcons({ matErrorOutlineOutline }),
|
|
24167
|
-
provideNgIconsConfig({
|
|
24168
|
-
size: '1.5em',
|
|
24169
|
-
}),
|
|
24170
|
-
], template: "<div class=\"h-full relative container\">\n <div\n class=\"pointer-events-auto absolute text-white flex flex-row p-2 rounded message\"\n role=\"alert\"\n [ngClass]=\"{\n 'position-bottom': position === 'bottom',\n 'position-top': position === 'top',\n expanded: this.expanded,\n 'bg-red-500': type === 'danger',\n 'bg-yellow-500': type === 'warning',\n 'bg-blue-500': type === 'info',\n }\"\n (mouseenter)=\"expand()\"\n (mouseleave)=\"expandAndClose()\"\n >\n <ng-icon class=\"mr-2 shrink-0 select-none\" [name]=\"icon\"></ng-icon>\n <div class=\"grow\" #content [ngClass]=\"{ invisible: !expanded }\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{pointer-events:none}.container{filter:drop-shadow(0px 4px 3px rgba(0,0,0,.2))}.message{transition:clip-path .3s cubic-bezier(.25,.46,.45,.94)}.message.expanded{clip-path:circle(100%)}.position-top{clip-path:circle(19px at 20px 20px);align-items:start;top:0;left:0}.position-bottom{clip-path:circle(19px at 20px calc(100% - 20px));align-items:end;bottom:0;left:0}.container ::ng-deep a{text-decoration:underline;font-weight:700}.container ::ng-deep a:hover{opacity:.85}\n"] }]
|
|
24171
|
-
}], propDecorators: { icon: [{
|
|
24172
|
-
type: Input
|
|
24173
|
-
}], type: [{
|
|
24174
|
-
type: Input
|
|
24175
|
-
}], position: [{
|
|
24176
|
-
type: Input
|
|
24177
|
-
}], content: [{
|
|
24178
|
-
type: ViewChild,
|
|
24179
|
-
args: ['content']
|
|
24180
|
-
}] } });
|
|
24181
|
-
|
|
24182
|
-
class SpinningLoaderComponent {
|
|
24183
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinningLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24184
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: SpinningLoaderComponent, isStandalone: true, selector: "gn-ui-spinning-loader", ngImport: i0, template: "<span>\n <svg\n class=\"animate-spin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n class=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n ></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n</span>\n", styles: [""] }); }
|
|
24185
|
-
}
|
|
24186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinningLoaderComponent, decorators: [{
|
|
24187
|
-
type: Component,
|
|
24188
|
-
args: [{ selector: 'gn-ui-spinning-loader', standalone: true, template: "<span>\n <svg\n class=\"animate-spin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n class=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n ></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n</span>\n" }]
|
|
24189
|
-
}] });
|
|
24190
|
-
|
|
24191
|
-
class ButtonComponent {
|
|
24192
|
-
constructor() {
|
|
24193
|
-
this.btnClass = 'gn-ui-btn-default';
|
|
23505
|
+
this.btnClass = 'gn-ui-btn-default';
|
|
24194
23506
|
this.disabled = false;
|
|
24195
23507
|
this.extraClass = '';
|
|
24196
23508
|
this.buttonClick = new EventEmitter();
|
|
@@ -24451,7 +23763,7 @@ class AutocompleteComponent {
|
|
|
24451
23763
|
this.enterBtnPosition = event.target['value'].length * 8 + 80;
|
|
24452
23764
|
}
|
|
24453
23765
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24454
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AutocompleteComponent, isStandalone: true, selector: "gn-ui-autocomplete", inputs: { placeholder: "placeholder", enterButton: "enterButton", action: "action", value: "value", clearOnSelection: "clearOnSelection", preventCompleteOnSelection: "preventCompleteOnSelection", autoFocus: "autoFocus", minCharacterCount: "minCharacterCount", allowSubmit: "allowSubmit", forceTrackPosition: "forceTrackPosition", displayWithFn: "displayWithFn" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted", inputCleared: "inputCleared", isSearchActive: "isSearchActive" }, providers: [
|
|
23766
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AutocompleteComponent, isStandalone: true, selector: "gn-ui-autocomplete", inputs: { placeholder: "placeholder", enterButton: "enterButton", action: "action", value: "value", clearOnSelection: "clearOnSelection", preventCompleteOnSelection: "preventCompleteOnSelection", autoFocus: "autoFocus", minCharacterCount: "minCharacterCount", allowSubmit: "allowSubmit", forceTrackPosition: "forceTrackPosition", displayWithTemplate: "displayWithTemplate", displayWithFn: "displayWithFn" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted", inputCleared: "inputCleared", isSearchActive: "isSearchActive" }, providers: [
|
|
24455
23767
|
provideIcons({
|
|
24456
23768
|
iconoirSearch,
|
|
24457
23769
|
matClose,
|
|
@@ -24460,7 +23772,7 @@ class AutocompleteComponent {
|
|
|
24460
23772
|
provideNgIconsConfig({
|
|
24461
23773
|
size: '1.75rem',
|
|
24462
23774
|
}),
|
|
24463
|
-
], 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 {{ displayWithFnInternal(suggestion) }}\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.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 }); }
|
|
23775
|
+
], 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 }); }
|
|
24464
23776
|
}
|
|
24465
23777
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
24466
23778
|
type: Component,
|
|
@@ -24481,7 +23793,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
24481
23793
|
provideNgIconsConfig({
|
|
24482
23794
|
size: '1.75rem',
|
|
24483
23795
|
}),
|
|
24484
|
-
], 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 {{ displayWithFnInternal(suggestion) }}\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"] }]
|
|
23796
|
+
], 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"] }]
|
|
24485
23797
|
}], propDecorators: { placeholder: [{
|
|
24486
23798
|
type: Input
|
|
24487
23799
|
}], enterButton: [{
|
|
@@ -24519,6 +23831,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
24519
23831
|
}], inputRef: [{
|
|
24520
23832
|
type: ViewChild,
|
|
24521
23833
|
args: ['searchInput']
|
|
23834
|
+
}], displayWithTemplate: [{
|
|
23835
|
+
type: Input
|
|
24522
23836
|
}], displayWithFn: [{
|
|
24523
23837
|
type: Input
|
|
24524
23838
|
}] } });
|
|
@@ -25003,7 +24317,7 @@ class DropdownMultiselectComponent {
|
|
|
25003
24317
|
}
|
|
25004
24318
|
setFocus() {
|
|
25005
24319
|
setTimeout(() => {
|
|
25006
|
-
this.searchFieldInput
|
|
24320
|
+
this.searchFieldInput?.nativeElement.focus();
|
|
25007
24321
|
}, 0);
|
|
25008
24322
|
}
|
|
25009
24323
|
openOverlay() {
|
|
@@ -25109,7 +24423,10 @@ class DropdownMultiselectComponent {
|
|
|
25109
24423
|
matExpandMore,
|
|
25110
24424
|
matExpandLess,
|
|
25111
24425
|
}),
|
|
25112
|
-
|
|
24426
|
+
provideNgIconsConfig({
|
|
24427
|
+
size: '1.5rem',
|
|
24428
|
+
}),
|
|
24429
|
+
], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: ["overlayOrigin"], descendants: true }, { propertyName: "overlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "overlayContainer", first: true, predicate: ["overlayContainer"], descendants: true, read: ElementRef }, { propertyName: "searchFieldInput", first: true, predicate: ["searchFieldInput"], descendants: true }, { propertyName: "checkboxes", predicate: ["checkBox"], descendants: true, read: ElementRef }], ngImport: i0, template: "<gn-ui-button\n type=\"outline\"\n extraClass=\"bg-background w-full !p-[8px] !pl-[16px]\"\n [title]=\"title\"\n [attr.aria-owns]=\"id\"\n (buttonClick)=\"openOverlay()\"\n (keydown)=\"handleTriggerKeydown($event)\"\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 (hasSelectedChoices) {\n <div\n class=\"gn-ui-multiselect-counter shrink-0 rounded-full font-bold text-[12px] w-5 h-5 flex items-center justify-center mr-1 selected-count\"\n >\n {{ selected.length }}\n </div>\n }\n </div>\n <button\n class=\"h-6 w-6 flex items-center justify-center\"\n data-test=\"dropdown-clear\"\n >\n @if (hasSelectedChoices && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"clearSelection($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-300 rounded shadow-lg py-2 w-full overflow-x-hidden overflow-y-auto overlay-container\"\n [style.max-height]=\"overlayMaxHeight\"\n [style.min-width]=\"overlayMinWidth\"\n role=\"listbox\"\n tabindex=\"-1\"\n [attr.id]=\"id\"\n [attr.aria-multiselectable]=\"true\"\n [attr.aria-label]=\"title\"\n (keydown)=\"handleOverlayKeydown($event)\"\n #overlayContainer\n >\n <div\n class=\"border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-1 flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary\"\n >\n @for (selected of selectedChoices; track selected) {\n <button\n type=\"button\"\n [title]=\"selected.label\"\n class=\"max-w-full bg-main text-white rounded pr-[7px] flex gap-1 items-center opacity-70 hover:opacity-100 focus:opacity-100 transition-opacity\"\n (click)=\"select(selected, false)\"\n >\n <div class=\"text-sm truncate leading-[26px] px-2\">\n {{ selected.label }}\n </div>\n <div\n class=\"flex items-center justify-center rounded-full bg-white text-main h-[13px] w-[13px] pt-px -mt-px shrink-0\"\n >\n <ng-icon\n name=\"matClose\"\n class=\"!h-[12px] !w-[11px] text-[12px]\"\n ></ng-icon>\n </div>\n </button>\n }\n\n @if (allowSearch) {\n <div class=\"w-[50%] relative grow shrink\">\n <input\n #searchFieldInput\n class=\"w-full px-2 truncate text-[14px] h-full overlaySearchInput focus:outline-none\"\n [(ngModel)]=\"searchInputValue\"\n [placeholder]=\"'multiselect.filter.placeholder' | translate\"\n />\n @if (!!searchInputValue) {\n <button\n class=\"absolute top-1/2 -translate-y-1/2 right-0 px-[7px] leading-tight clear-search-input mr-2\"\n (click)=\"clearSearchInputValue($event)\"\n >\n <ng-icon class=\"!h-[10px] !w-[12px] text-[12px]\" name=\"matClose\">\n </ng-icon>\n </button>\n }\n </div>\n }\n </div>\n\n @for (choice of filteredChoicesByText; track choice) {\n <label\n [title]=\"choice.label\"\n class=\"flex px-5 py-1 w-full text-gray-900 cursor-pointer hover:text-primary-darkest hover:bg-gray-50 focus-within:text-primary-darkest focus-within:bg-gray-50 transition-colors\"\n >\n <input\n class=\"w-[18px] h-[18px] align-text-top shrink-0\"\n type=\"checkbox\"\n #checkBox\n [checked]=\"isSelected(choice)\"\n (change)=\"select(choice, checkBox.checked)\"\n />\n <span class=\"ml-[8px] text-[14px] truncate\">\n {{ choice.label }}\n </span>\n </label>\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: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25113
24430
|
}
|
|
25114
24431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DropdownMultiselectComponent, decorators: [{
|
|
25115
24432
|
type: Component,
|
|
@@ -25119,7 +24436,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
25119
24436
|
matExpandMore,
|
|
25120
24437
|
matExpandLess,
|
|
25121
24438
|
}),
|
|
25122
|
-
|
|
24439
|
+
provideNgIconsConfig({
|
|
24440
|
+
size: '1.5rem',
|
|
24441
|
+
}),
|
|
24442
|
+
], standalone: true, template: "<gn-ui-button\n type=\"outline\"\n extraClass=\"bg-background w-full !p-[8px] !pl-[16px]\"\n [title]=\"title\"\n [attr.aria-owns]=\"id\"\n (buttonClick)=\"openOverlay()\"\n (keydown)=\"handleTriggerKeydown($event)\"\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 (hasSelectedChoices) {\n <div\n class=\"gn-ui-multiselect-counter shrink-0 rounded-full font-bold text-[12px] w-5 h-5 flex items-center justify-center mr-1 selected-count\"\n >\n {{ selected.length }}\n </div>\n }\n </div>\n <button\n class=\"h-6 w-6 flex items-center justify-center\"\n data-test=\"dropdown-clear\"\n >\n @if (hasSelectedChoices && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"clearSelection($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-300 rounded shadow-lg py-2 w-full overflow-x-hidden overflow-y-auto overlay-container\"\n [style.max-height]=\"overlayMaxHeight\"\n [style.min-width]=\"overlayMinWidth\"\n role=\"listbox\"\n tabindex=\"-1\"\n [attr.id]=\"id\"\n [attr.aria-multiselectable]=\"true\"\n [attr.aria-label]=\"title\"\n (keydown)=\"handleOverlayKeydown($event)\"\n #overlayContainer\n >\n <div\n class=\"border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-1 flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary\"\n >\n @for (selected of selectedChoices; track selected) {\n <button\n type=\"button\"\n [title]=\"selected.label\"\n class=\"max-w-full bg-main text-white rounded pr-[7px] flex gap-1 items-center opacity-70 hover:opacity-100 focus:opacity-100 transition-opacity\"\n (click)=\"select(selected, false)\"\n >\n <div class=\"text-sm truncate leading-[26px] px-2\">\n {{ selected.label }}\n </div>\n <div\n class=\"flex items-center justify-center rounded-full bg-white text-main h-[13px] w-[13px] pt-px -mt-px shrink-0\"\n >\n <ng-icon\n name=\"matClose\"\n class=\"!h-[12px] !w-[11px] text-[12px]\"\n ></ng-icon>\n </div>\n </button>\n }\n\n @if (allowSearch) {\n <div class=\"w-[50%] relative grow shrink\">\n <input\n #searchFieldInput\n class=\"w-full px-2 truncate text-[14px] h-full overlaySearchInput focus:outline-none\"\n [(ngModel)]=\"searchInputValue\"\n [placeholder]=\"'multiselect.filter.placeholder' | translate\"\n />\n @if (!!searchInputValue) {\n <button\n class=\"absolute top-1/2 -translate-y-1/2 right-0 px-[7px] leading-tight clear-search-input mr-2\"\n (click)=\"clearSearchInputValue($event)\"\n >\n <ng-icon class=\"!h-[10px] !w-[12px] text-[12px]\" name=\"matClose\">\n </ng-icon>\n </button>\n }\n </div>\n }\n </div>\n\n @for (choice of filteredChoicesByText; track choice) {\n <label\n [title]=\"choice.label\"\n class=\"flex px-5 py-1 w-full text-gray-900 cursor-pointer hover:text-primary-darkest hover:bg-gray-50 focus-within:text-primary-darkest focus-within:bg-gray-50 transition-colors\"\n >\n <input\n class=\"w-[18px] h-[18px] align-text-top shrink-0\"\n type=\"checkbox\"\n #checkBox\n [checked]=\"isSelected(choice)\"\n (change)=\"select(choice, checkBox.checked)\"\n />\n <span class=\"ml-[8px] text-[14px] truncate\">\n {{ choice.label }}\n </span>\n </label>\n }\n </div>\n</ng-template>\n" }]
|
|
25123
24443
|
}], propDecorators: { title: [{
|
|
25124
24444
|
type: Input
|
|
25125
24445
|
}], choices: [{
|
|
@@ -26034,8 +25354,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
26034
25354
|
marker('search.filters.spatialExtent.import');
|
|
26035
25355
|
marker('search.filters.spatialExtent.helpText');
|
|
26036
25356
|
marker('search.filters.spatialExtent.error.title');
|
|
26037
|
-
marker('search.filters.spatialExtent.
|
|
26038
|
-
marker('search.filters.spatialExtent.
|
|
25357
|
+
marker('search.filters.spatialExtent.error.outOfBounds');
|
|
25358
|
+
const LABEL_FROM_FILE = marker('search.filters.spatialExtent.bboxFromFile');
|
|
25359
|
+
const LABEL_FROM_FILE_DELETE = marker('search.filters.spatialExtent.bboxFromFileDelete');
|
|
25360
|
+
const LABEL_INITIAL = marker('search.filters.spatialExtent.bboxInitial');
|
|
25361
|
+
const LABEL_INITIAL_DELETE = marker('search.filters.spatialExtent.bboxInitialDelete');
|
|
26039
25362
|
class SpatialExtentDropdownComponent {
|
|
26040
25363
|
constructor() {
|
|
26041
25364
|
this.cd = inject(ChangeDetectorRef);
|
|
@@ -26066,9 +25389,23 @@ class SpatialExtentDropdownComponent {
|
|
|
26066
25389
|
this.overlayMinWidth = 'none';
|
|
26067
25390
|
this.errorKey = null;
|
|
26068
25391
|
}
|
|
25392
|
+
set initialBbox(value) {
|
|
25393
|
+
if (!this.bbox && value) {
|
|
25394
|
+
this.bbox = value;
|
|
25395
|
+
}
|
|
25396
|
+
}
|
|
26069
25397
|
get hasSelection() {
|
|
26070
25398
|
return !!this.bbox;
|
|
26071
25399
|
}
|
|
25400
|
+
get selectionLabelKey() {
|
|
25401
|
+
return this.fileName ? LABEL_FROM_FILE : LABEL_INITIAL;
|
|
25402
|
+
}
|
|
25403
|
+
get selectionDeleteLabelKey() {
|
|
25404
|
+
return this.fileName ? LABEL_FROM_FILE_DELETE : LABEL_INITIAL_DELETE;
|
|
25405
|
+
}
|
|
25406
|
+
get selectionLabelParams() {
|
|
25407
|
+
return { fileName: this.fileName };
|
|
25408
|
+
}
|
|
26072
25409
|
openOverlay() {
|
|
26073
25410
|
this.overlayMinWidth =
|
|
26074
25411
|
this.overlayOrigin.elementRef.nativeElement.getBoundingClientRect()
|
|
@@ -26098,6 +25435,10 @@ class SpatialExtentDropdownComponent {
|
|
|
26098
25435
|
return;
|
|
26099
25436
|
}
|
|
26100
25437
|
const bbox = getGeometryBoundingBox(geometry);
|
|
25438
|
+
if (!isBoundingBoxWithinWorldExtent(bbox)) {
|
|
25439
|
+
this.setError(marker('search.filters.spatialExtent.error.outOfBounds'));
|
|
25440
|
+
return;
|
|
25441
|
+
}
|
|
26101
25442
|
this.bbox = bbox;
|
|
26102
25443
|
this.fileName = file.name;
|
|
26103
25444
|
this.bboxChange.emit(bbox);
|
|
@@ -26132,17 +25473,17 @@ class SpatialExtentDropdownComponent {
|
|
|
26132
25473
|
propagateToDocumentOnly(event);
|
|
26133
25474
|
}
|
|
26134
25475
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpatialExtentDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26135
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SpatialExtentDropdownComponent, isStandalone: true, selector: "gn-ui-spatial-extent-dropdown", inputs: { title: "title", maxFileSizeMb: "maxFileSizeMb" }, outputs: { bboxChange: "bboxChange", errorChange: "errorChange" }, providers: [
|
|
25476
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SpatialExtentDropdownComponent, isStandalone: true, selector: "gn-ui-spatial-extent-dropdown", inputs: { title: "title", maxFileSizeMb: "maxFileSizeMb", initialBbox: "initialBbox" }, outputs: { bboxChange: "bboxChange", errorChange: "errorChange" }, providers: [
|
|
26136
25477
|
provideIcons({
|
|
26137
25478
|
iconoirCheckCircle,
|
|
26138
|
-
iconoirImport,
|
|
26139
25479
|
iconoirSquareDashed,
|
|
26140
25480
|
iconoirTrash,
|
|
25481
|
+
iconoirUpload,
|
|
26141
25482
|
matClose,
|
|
26142
25483
|
matExpandLess,
|
|
26143
25484
|
matExpandMore,
|
|
26144
25485
|
}),
|
|
26145
|
-
], 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-[
|
|
25486
|
+
], 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 }); }
|
|
26146
25487
|
}
|
|
26147
25488
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpatialExtentDropdownComponent, decorators: [{
|
|
26148
25489
|
type: Component,
|
|
@@ -26155,18 +25496,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
26155
25496
|
], providers: [
|
|
26156
25497
|
provideIcons({
|
|
26157
25498
|
iconoirCheckCircle,
|
|
26158
|
-
iconoirImport,
|
|
26159
25499
|
iconoirSquareDashed,
|
|
26160
25500
|
iconoirTrash,
|
|
25501
|
+
iconoirUpload,
|
|
26161
25502
|
matClose,
|
|
26162
25503
|
matExpandLess,
|
|
26163
25504
|
matExpandMore,
|
|
26164
25505
|
}),
|
|
26165
|
-
], 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-[
|
|
25506
|
+
], 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" }]
|
|
26166
25507
|
}], propDecorators: { title: [{
|
|
26167
25508
|
type: Input
|
|
26168
25509
|
}], maxFileSizeMb: [{
|
|
26169
25510
|
type: Input
|
|
25511
|
+
}], initialBbox: [{
|
|
25512
|
+
type: Input
|
|
26170
25513
|
}], bboxChange: [{
|
|
26171
25514
|
type: Output
|
|
26172
25515
|
}], errorChange: [{
|
|
@@ -26686,11 +26029,11 @@ class BlockListComponent {
|
|
|
26686
26029
|
this.goToPage(this.currentPage + 1);
|
|
26687
26030
|
}
|
|
26688
26031
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: BlockListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26689
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: BlockListComponent, isStandalone: true, selector: "gn-ui-block-list", inputs: { containerClass: "containerClass", paginationContainerClass: "paginationContainerClass" }, outputs: { listChanges: "listChanges" }, host: { listeners: { "window:resize": "onResize()" } }, queries: [{ propertyName: "blocks", predicate: ["block"], read: ElementRef }], viewQueries: [{ propertyName: "blockContainer", first: true, predicate: ["blockContainer"], descendants: true }], ngImport: i0, template: "<div\n class=\"grid gap-4 w-full sm:grid-cols-2\"\n #blockContainer\n [ngClass]=\"[containerClass, 'size-' + subComponentSize]\"\n>\n <ng-content></ng-content>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + paginationContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host .block-list-container ::ng-deep>*{flex-shrink:0}:host{position:relative}@media screen and (min-width: 769px){.size-L{grid-template-columns:repeat(1,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-M{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-S{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-XS{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PaginationDotsComponent, selector: "gn-ui-pagination-dots", inputs: ["listComponent", "containerClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
26032
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: BlockListComponent, isStandalone: true, selector: "gn-ui-block-list", inputs: { containerClass: "containerClass", paginationContainerClass: "paginationContainerClass" }, outputs: { listChanges: "listChanges" }, host: { listeners: { "window:resize": "onResize()" } }, queries: [{ propertyName: "blocks", predicate: ["block"], read: ElementRef }], viewQueries: [{ propertyName: "blockContainer", first: true, predicate: ["blockContainer"], descendants: true }], ngImport: i0, template: "<div\n class=\"grid gap-4 w-full sm:grid-cols-2\"\n #blockContainer\n [ngClass]=\"[containerClass, 'size-' + subComponentSize]\"\n>\n <ng-content></ng-content>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + paginationContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host .block-list-container ::ng-deep>*{flex-shrink:0}:host{display:block;position:relative}@media screen and (min-width: 769px){.size-L{grid-template-columns:repeat(1,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-M{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-S{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-XS{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PaginationDotsComponent, selector: "gn-ui-pagination-dots", inputs: ["listComponent", "containerClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
26690
26033
|
}
|
|
26691
26034
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: BlockListComponent, decorators: [{
|
|
26692
26035
|
type: Component,
|
|
26693
|
-
args: [{ selector: 'gn-ui-block-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, PaginationDotsComponent], template: "<div\n class=\"grid gap-4 w-full sm:grid-cols-2\"\n #blockContainer\n [ngClass]=\"[containerClass, 'size-' + subComponentSize]\"\n>\n <ng-content></ng-content>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + paginationContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host .block-list-container ::ng-deep>*{flex-shrink:0}:host{position:relative}@media screen and (min-width: 769px){.size-L{grid-template-columns:repeat(1,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-M{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-S{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-XS{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}}\n"] }]
|
|
26036
|
+
args: [{ selector: 'gn-ui-block-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, PaginationDotsComponent], template: "<div\n class=\"grid gap-4 w-full sm:grid-cols-2\"\n #blockContainer\n [ngClass]=\"[containerClass, 'size-' + subComponentSize]\"\n>\n <ng-content></ng-content>\n</div>\n<gn-ui-pagination-dots\n [containerClass]=\"'absolute ' + paginationContainerClass\"\n [listComponent]=\"this\"\n></gn-ui-pagination-dots>\n", styles: [":host .block-list-container ::ng-deep>*{flex-shrink:0}:host{display:block;position:relative}@media screen and (min-width: 769px){.size-L{grid-template-columns:repeat(1,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-M{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-S{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}.size-XS{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,min-content)}}\n"] }]
|
|
26694
26037
|
}], propDecorators: { containerClass: [{
|
|
26695
26038
|
type: Input
|
|
26696
26039
|
}], paginationContainerClass: [{
|
|
@@ -27429,9 +26772,7 @@ const initSearch = () => {
|
|
|
27429
26772
|
},
|
|
27430
26773
|
params: {
|
|
27431
26774
|
filters: {},
|
|
27432
|
-
pageSize:
|
|
27433
|
-
? getOptionalSearchConfig().LIMIT
|
|
27434
|
-
: DEFAULT_PAGE_SIZE,
|
|
26775
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
27435
26776
|
currentPage: 0,
|
|
27436
26777
|
favoritesOnly: false,
|
|
27437
26778
|
useSpatialFilter: true,
|
|
@@ -27880,6 +27221,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
27880
27221
|
}]
|
|
27881
27222
|
}] });
|
|
27882
27223
|
|
|
27224
|
+
const DEFAULT_GEOCODING_PROVIDER = [
|
|
27225
|
+
'geonames',
|
|
27226
|
+
{ maxRows: 5 },
|
|
27227
|
+
];
|
|
27228
|
+
const GEOCODING_PROVIDER = new InjectionToken('geocoding-provider', {
|
|
27229
|
+
providedIn: 'root',
|
|
27230
|
+
factory: () => DEFAULT_GEOCODING_PROVIDER,
|
|
27231
|
+
});
|
|
27232
|
+
class GeocodingService {
|
|
27233
|
+
constructor() {
|
|
27234
|
+
this.provider = inject(GEOCODING_PROVIDER);
|
|
27235
|
+
}
|
|
27236
|
+
query(text) {
|
|
27237
|
+
let queryObservable;
|
|
27238
|
+
switch (this.provider[0]) {
|
|
27239
|
+
case 'geoadmin':
|
|
27240
|
+
queryObservable = from(queryGeoadmin(text, this.provider[1]));
|
|
27241
|
+
break;
|
|
27242
|
+
case 'geonames':
|
|
27243
|
+
queryObservable = from(queryGeonames(text, this.provider[1]));
|
|
27244
|
+
break;
|
|
27245
|
+
case 'geoplateforme':
|
|
27246
|
+
queryObservable = from(queryGeoplateforme(text, this.provider[1]));
|
|
27247
|
+
break;
|
|
27248
|
+
default:
|
|
27249
|
+
return throwError(() => new Error(`Unsupported geocoding provider: ${this.provider[0]}`));
|
|
27250
|
+
}
|
|
27251
|
+
return queryObservable.pipe(catchError((error) => throwError(error)));
|
|
27252
|
+
}
|
|
27253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
27254
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingService, providedIn: 'root' }); }
|
|
27255
|
+
}
|
|
27256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingService, decorators: [{
|
|
27257
|
+
type: Injectable,
|
|
27258
|
+
args: [{
|
|
27259
|
+
providedIn: 'root',
|
|
27260
|
+
}]
|
|
27261
|
+
}] });
|
|
27262
|
+
|
|
27263
|
+
class LocationSearchComponent {
|
|
27264
|
+
constructor() {
|
|
27265
|
+
this.geocodingService = inject(GeocodingService);
|
|
27266
|
+
this.placeholder = '';
|
|
27267
|
+
this.resultSelected = new EventEmitter();
|
|
27268
|
+
this.displayWithFn = (item) => item.label;
|
|
27269
|
+
this.searchAction = (text) => this.geocodingService.query(text);
|
|
27270
|
+
}
|
|
27271
|
+
handleItemSelected(item) {
|
|
27272
|
+
this.resultSelected.emit(item);
|
|
27273
|
+
}
|
|
27274
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LocationSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
27275
|
+
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 }); }
|
|
27276
|
+
}
|
|
27277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LocationSearchComponent, decorators: [{
|
|
27278
|
+
type: Component,
|
|
27279
|
+
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" }]
|
|
27280
|
+
}], propDecorators: { placeholder: [{
|
|
27281
|
+
type: Input
|
|
27282
|
+
}], displayWithTemplate: [{
|
|
27283
|
+
type: Input
|
|
27284
|
+
}], resultSelected: [{
|
|
27285
|
+
type: Output
|
|
27286
|
+
}] } });
|
|
27287
|
+
|
|
27883
27288
|
// expects the replacement key ${uuid}
|
|
27884
27289
|
const RECORD_DATASET_URL_TOKEN = new InjectionToken('record-dataset-url-token');
|
|
27885
27290
|
const RECORD_SERVICE_URL_TOKEN = new InjectionToken('record-service-url-token');
|
|
@@ -28038,6 +27443,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
28038
27443
|
class AbstractSearchField {
|
|
28039
27444
|
}
|
|
28040
27445
|
class SimpleSearchField {
|
|
27446
|
+
get fieldIdentifier() {
|
|
27447
|
+
return this.customIdentifier ?? this.esFieldName;
|
|
27448
|
+
}
|
|
28041
27449
|
constructor(esFieldName, injector, order = 'asc', orderType = 'key') {
|
|
28042
27450
|
this.esFieldName = esFieldName;
|
|
28043
27451
|
this.injector = injector;
|
|
@@ -28046,14 +27454,26 @@ class SimpleSearchField {
|
|
|
28046
27454
|
this.repository = this.injector.get(RecordsRepositoryInterface);
|
|
28047
27455
|
// FIXME: this is required to register runtime fields; abstract this as well
|
|
28048
27456
|
this.esService = this.injector.get(ElasticsearchService);
|
|
27457
|
+
this.includeValues = [];
|
|
27458
|
+
this.excludeValues = [];
|
|
27459
|
+
}
|
|
27460
|
+
setFieldIdentifier(fieldIdentifier) {
|
|
27461
|
+
this.customIdentifier = fieldIdentifier;
|
|
27462
|
+
this.esService.registerFieldAlias(fieldIdentifier, this.esFieldName);
|
|
28049
27463
|
}
|
|
28050
27464
|
getAggregations() {
|
|
28051
27465
|
return {
|
|
28052
|
-
[this.
|
|
27466
|
+
[this.fieldIdentifier]: {
|
|
28053
27467
|
type: 'terms',
|
|
28054
27468
|
field: this.esFieldName,
|
|
28055
27469
|
limit: 1000,
|
|
28056
27470
|
sort: [this.order, this.orderType],
|
|
27471
|
+
...(this.includeValues?.length && {
|
|
27472
|
+
includeValues: this.includeValues,
|
|
27473
|
+
}),
|
|
27474
|
+
...(this.excludeValues?.length && {
|
|
27475
|
+
excludeValues: this.excludeValues,
|
|
27476
|
+
}),
|
|
28057
27477
|
},
|
|
28058
27478
|
};
|
|
28059
27479
|
}
|
|
@@ -28061,7 +27481,7 @@ class SimpleSearchField {
|
|
|
28061
27481
|
return bucket.term.toString();
|
|
28062
27482
|
}
|
|
28063
27483
|
getAvailableValues() {
|
|
28064
|
-
return this.repository.aggregate(this.getAggregations()).pipe(map$1((response) => response[this.
|
|
27484
|
+
return this.repository.aggregate(this.getAggregations()).pipe(map$1((response) => response[this.fieldIdentifier].buckets || []), switchMap((buckets) => {
|
|
28065
27485
|
const bucketPromises = buckets.map(async (bucket) => ({
|
|
28066
27486
|
label: `${await this.getBucketLabel(bucket)} (${bucket.count})`,
|
|
28067
27487
|
value: bucket.term.toString(),
|
|
@@ -28074,7 +27494,7 @@ class SimpleSearchField {
|
|
|
28074
27494
|
// FieldValue[]
|
|
28075
27495
|
if (this.getType() === 'values') {
|
|
28076
27496
|
return of({
|
|
28077
|
-
[this.
|
|
27497
|
+
[this.fieldIdentifier]: values.reduce((acc, val) => {
|
|
28078
27498
|
const value = val.toString();
|
|
28079
27499
|
if (value !== '') {
|
|
28080
27500
|
return { ...acc, [value]: true };
|
|
@@ -28085,11 +27505,11 @@ class SimpleSearchField {
|
|
|
28085
27505
|
}
|
|
28086
27506
|
// DateRange
|
|
28087
27507
|
return of({
|
|
28088
|
-
[this.
|
|
27508
|
+
[this.fieldIdentifier]: values[0] !== '' ? values[0] : {},
|
|
28089
27509
|
});
|
|
28090
27510
|
}
|
|
28091
27511
|
getValuesForFilter(filters) {
|
|
28092
|
-
const filter = filters[this.
|
|
27512
|
+
const filter = filters[this.fieldIdentifier];
|
|
28093
27513
|
if (!filter)
|
|
28094
27514
|
return of([]);
|
|
28095
27515
|
// filter by expression
|
|
@@ -28107,6 +27527,9 @@ class SimpleSearchField {
|
|
|
28107
27527
|
getType() {
|
|
28108
27528
|
return 'values';
|
|
28109
27529
|
}
|
|
27530
|
+
clone() {
|
|
27531
|
+
return Object.create(this);
|
|
27532
|
+
}
|
|
28110
27533
|
}
|
|
28111
27534
|
class TranslatedSearchField extends SimpleSearchField {
|
|
28112
27535
|
constructor(esFieldName, injector, order = 'asc', orderType = 'key') {
|
|
@@ -28348,17 +27771,39 @@ class DateRangeSearchField extends SimpleSearchField {
|
|
|
28348
27771
|
return 'dateRange';
|
|
28349
27772
|
}
|
|
28350
27773
|
}
|
|
27774
|
+
// treats a resource's creation/revision dates as an interval (its min and max), so a record matches
|
|
27775
|
+
// when that interval intersects the filter range, not just when a single date falls inside it
|
|
27776
|
+
class ResourceCreationRevisionDateSearchField extends DateRangeSearchField {
|
|
27777
|
+
constructor(injector, order = 'desc') {
|
|
27778
|
+
super('resourceCreationRevisionDate', injector, order);
|
|
27779
|
+
const dateSourceFields = [
|
|
27780
|
+
'creationDateForResource',
|
|
27781
|
+
'revisionDateForResource',
|
|
27782
|
+
];
|
|
27783
|
+
const collectSortedDates = dateSourceFields
|
|
27784
|
+
.map((field) => `if (doc.containsKey('${field}')) {
|
|
27785
|
+
for (def date : doc['${field}']) { dates.add(date.millis); }
|
|
27786
|
+
}`)
|
|
27787
|
+
.join('\n');
|
|
27788
|
+
this.esService.registerRuntimeField('resourceCreationRevisionDateMin', `def dates = [];
|
|
27789
|
+
${collectSortedDates}
|
|
27790
|
+
if (dates.length > 0) { dates.sort(null); emit(dates[0]); }`, 'date');
|
|
27791
|
+
this.esService.registerRuntimeField('resourceCreationRevisionDateMax', `def dates = [];
|
|
27792
|
+
${collectSortedDates}
|
|
27793
|
+
if (dates.length > 0) { dates.sort(null); emit(dates[dates.length - 1]); }`, 'date');
|
|
27794
|
+
}
|
|
27795
|
+
}
|
|
28351
27796
|
class BoundingBoxSearchField extends SimpleSearchField {
|
|
28352
27797
|
getAvailableValues() {
|
|
28353
27798
|
return of([]);
|
|
28354
27799
|
}
|
|
28355
27800
|
getFiltersForValues(values) {
|
|
28356
27801
|
return of({
|
|
28357
|
-
[this.
|
|
27802
|
+
[this.fieldIdentifier]: values.map(Number),
|
|
28358
27803
|
});
|
|
28359
27804
|
}
|
|
28360
27805
|
getValuesForFilter(filters) {
|
|
28361
|
-
const filter = filters[this.
|
|
27806
|
+
const filter = filters[this.fieldIdentifier];
|
|
28362
27807
|
return of(isBoundingBox(filter) ? filter : []);
|
|
28363
27808
|
}
|
|
28364
27809
|
getType() {
|
|
@@ -28457,7 +27902,7 @@ class RecordKindField extends SimpleSearchField {
|
|
|
28457
27902
|
}
|
|
28458
27903
|
getFiltersForValues(values) {
|
|
28459
27904
|
const filters = {
|
|
28460
|
-
[this.
|
|
27905
|
+
[this.fieldIdentifier]: values.reduce((acc, value) => {
|
|
28461
27906
|
if (value === '')
|
|
28462
27907
|
return { ...acc, [value]: true };
|
|
28463
27908
|
const keysToAdd = this.TYPE_MAPPING[value] || [value];
|
|
@@ -28480,7 +27925,7 @@ class RecordKindField extends SimpleSearchField {
|
|
|
28480
27925
|
return of(filters);
|
|
28481
27926
|
}
|
|
28482
27927
|
getValuesForFilter(filters) {
|
|
28483
|
-
const filter = filters[this.
|
|
27928
|
+
const filter = filters[this.fieldIdentifier];
|
|
28484
27929
|
if (!filter)
|
|
28485
27930
|
return of([]);
|
|
28486
27931
|
const activeValues = Object.keys(filter).filter((v) => filter[v]);
|
|
@@ -28509,11 +27954,16 @@ marker('search.filters.producerOrg');
|
|
|
28509
27954
|
marker('search.filters.publisherOrg');
|
|
28510
27955
|
marker('search.filters.user');
|
|
28511
27956
|
marker('search.filters.changeDate');
|
|
27957
|
+
marker('search.filters.resourceCreationRevisionDate');
|
|
27958
|
+
marker('search.filters.temporalExtent');
|
|
28512
27959
|
marker('search.filters.spatialExtent');
|
|
27960
|
+
marker('search.filters.documentStandard');
|
|
27961
|
+
const CUSTOM_FIELDS = new InjectionToken('custom-fields');
|
|
28513
27962
|
class FieldsService {
|
|
28514
27963
|
constructor() {
|
|
28515
27964
|
this.injector = inject(Injector);
|
|
28516
|
-
this.
|
|
27965
|
+
this.customFields = inject(CUSTOM_FIELDS, { optional: true }) ?? [];
|
|
27966
|
+
this.baseFields = {
|
|
28517
27967
|
organization: new OrganizationSearchField(this.injector),
|
|
28518
27968
|
format: new SimpleSearchField('format', this.injector, 'asc'),
|
|
28519
27969
|
resourceType: new ResourceTypeLegacyField(this.injector), // Deprecated, use `recordKind` instead
|
|
@@ -28532,9 +27982,28 @@ class FieldsService {
|
|
|
28532
27982
|
publisherOrg: new MultilingualSearchField('distributorOrgForResourceObject', this.injector, 'asc', 'key'),
|
|
28533
27983
|
user: new UserSearchField(this.injector),
|
|
28534
27984
|
changeDate: new DateRangeSearchField('changeDate', this.injector, 'desc'),
|
|
27985
|
+
resourceCreationRevisionDate: new ResourceCreationRevisionDateSearchField(this.injector, 'desc'),
|
|
27986
|
+
temporalExtent: new DateRangeSearchField('resourceTemporalExtentDateRange', this.injector, 'desc'),
|
|
28535
27987
|
availableServices: new AvailableServicesField(this.injector),
|
|
28536
27988
|
spatialExtent: new BoundingBoxSearchField('spatialExtent', this.injector),
|
|
28537
27989
|
};
|
|
27990
|
+
this.fields = { ...this.baseFields };
|
|
27991
|
+
for (const customField of this.customFields) {
|
|
27992
|
+
const baseField = this.baseFields[customField.baseFilter];
|
|
27993
|
+
if (!(baseField instanceof SimpleSearchField)) {
|
|
27994
|
+
console.warn(`The custom field '${customField.name}' relies on a base field '${customField.baseFilter}' that is not supported. This field will be ignored.`);
|
|
27995
|
+
continue;
|
|
27996
|
+
}
|
|
27997
|
+
const newField = baseField.clone();
|
|
27998
|
+
newField.setFieldIdentifier(customField.name);
|
|
27999
|
+
if (customField.includeValues) {
|
|
28000
|
+
newField.includeValues = customField.includeValues;
|
|
28001
|
+
}
|
|
28002
|
+
if (customField.excludeValues) {
|
|
28003
|
+
newField.excludeValues = customField.excludeValues;
|
|
28004
|
+
}
|
|
28005
|
+
this.fields[customField.name] = newField;
|
|
28006
|
+
}
|
|
28538
28007
|
}
|
|
28539
28008
|
get supportedFields() {
|
|
28540
28009
|
return Object.keys(this.fields);
|
|
@@ -28582,7 +28051,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
28582
28051
|
args: [{
|
|
28583
28052
|
providedIn: 'root',
|
|
28584
28053
|
}]
|
|
28585
|
-
}] });
|
|
28054
|
+
}], ctorParameters: () => [] });
|
|
28586
28055
|
|
|
28587
28056
|
class ApiCardComponent {
|
|
28588
28057
|
constructor() {
|
|
@@ -30522,7 +29991,7 @@ class ServiceCapabilitiesComponent {
|
|
|
30522
29991
|
if (this.apiLinks.length > 0 &&
|
|
30523
29992
|
this.apiLinks[0].accessServiceProtocol !== 'ogcFeatures') {
|
|
30524
29993
|
this.loading = true;
|
|
30525
|
-
this.availableLayers = await getLayers(this.apiLinks[0].url.href, this.apiLinks[0].accessServiceProtocol);
|
|
29994
|
+
this.availableLayers = await getLayers(this.apiLinks[0].url.href, this.apiLinks[0].accessServiceProtocol, true);
|
|
30526
29995
|
this.loading = false;
|
|
30527
29996
|
this.cdr.detectChanges();
|
|
30528
29997
|
this.filteredLayers = this.availableLayers;
|
|
@@ -31787,6 +31256,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
31787
31256
|
], 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" }]
|
|
31788
31257
|
}] });
|
|
31789
31258
|
|
|
31259
|
+
// in MB, null means no limit
|
|
31260
|
+
const SPATIAL_EXTENT_MAX_FILE_SIZE = new InjectionToken('spatialExtentMaxFileSize', { factory: () => null });
|
|
31790
31261
|
class FilterDropdownComponent {
|
|
31791
31262
|
constructor() {
|
|
31792
31263
|
this.searchFacade = inject(SearchFacade);
|
|
@@ -31794,9 +31265,12 @@ class FilterDropdownComponent {
|
|
|
31794
31265
|
this.fieldsService = inject(FieldsService);
|
|
31795
31266
|
this.notificationsService = inject(NotificationsService);
|
|
31796
31267
|
this.translateService = inject(TranslateService);
|
|
31797
|
-
this.spatialExtentMaxFileSize =
|
|
31268
|
+
this.spatialExtentMaxFileSize = inject(SPATIAL_EXTENT_MAX_FILE_SIZE);
|
|
31798
31269
|
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([])));
|
|
31799
31270
|
this.selectedDateRange$ = this.selected$.pipe(map$1((selected) => (Array.isArray(selected) ? {} : selected)));
|
|
31271
|
+
this.selectedBoundingBox$ = this.selected$.pipe(map$1((selected) => Array.isArray(selected) && selected.length > 0
|
|
31272
|
+
? selected
|
|
31273
|
+
: null));
|
|
31800
31274
|
this.spatialExtentErrorNotificationId = null;
|
|
31801
31275
|
}
|
|
31802
31276
|
onSelectedValues(values) {
|
|
@@ -31805,7 +31279,11 @@ class FilterDropdownComponent {
|
|
|
31805
31279
|
.subscribe((filters) => this.searchService.updateFilters(filters));
|
|
31806
31280
|
}
|
|
31807
31281
|
onBboxChange(bbox) {
|
|
31808
|
-
|
|
31282
|
+
this.fieldsService
|
|
31283
|
+
.buildFiltersFromFieldValues({
|
|
31284
|
+
[this.fieldName]: bbox,
|
|
31285
|
+
})
|
|
31286
|
+
.subscribe((filters) => this.searchService.updateFilters(filters));
|
|
31809
31287
|
this.clearSpatialExtentErrorNotification();
|
|
31810
31288
|
}
|
|
31811
31289
|
onSpatialExtentError(error) {
|
|
@@ -31838,7 +31316,7 @@ class FilterDropdownComponent {
|
|
|
31838
31316
|
.subscribe((filters) => this.searchService.updateFilters(filters));
|
|
31839
31317
|
}
|
|
31840
31318
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FilterDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31841
|
-
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 ></gn-ui-date-range-dropdown>\n} @else if (fieldType === 'spatialExtent') {\n <gn-ui-spatial-extent-dropdown\n [title]=\"title\"\n [maxFileSizeMb]=\"spatialExtentMaxFileSize\"\n (bboxChange)=\"onBboxChange($event)\"\n (errorChange)=\"onSpatialExtentError($event)\"\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"], outputs: ["bboxChange", "errorChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31319
|
+
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 }); }
|
|
31842
31320
|
}
|
|
31843
31321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FilterDropdownComponent, decorators: [{
|
|
31844
31322
|
type: Component,
|
|
@@ -31847,7 +31325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
31847
31325
|
DateRangeDropdownComponent,
|
|
31848
31326
|
DropdownMultiselectComponent,
|
|
31849
31327
|
SpatialExtentDropdownComponent,
|
|
31850
|
-
], template: "@if (fieldType === 'dateRange') {\n <gn-ui-date-range-dropdown\n [title]=\"title\"\n [dateRange]=\"(selectedDateRange$ | async) ?? {}\"\n (dateRangeChange)=\"onDateRangeChange($event)\"\n ></gn-ui-date-range-dropdown>\n} @else if (fieldType === 'spatialExtent') {\n <gn-ui-spatial-extent-dropdown\n [title]=\"title\"\n [maxFileSizeMb]=\"spatialExtentMaxFileSize\"\n (bboxChange)=\"onBboxChange($event)\"\n (errorChange)=\"onSpatialExtentError($event)\"\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" }]
|
|
31328
|
+
], 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" }]
|
|
31851
31329
|
}], propDecorators: { fieldName: [{
|
|
31852
31330
|
type: Input
|
|
31853
31331
|
}], title: [{
|
|
@@ -31908,7 +31386,7 @@ class FuzzySearchComponent {
|
|
|
31908
31386
|
this.isSearchActive.emit(event);
|
|
31909
31387
|
}
|
|
31910
31388
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FuzzySearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31911
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: FuzzySearchComponent, isStandalone: true, selector: "gn-ui-fuzzy-search", inputs: { autoFocus: "autoFocus", forceTrackPosition: "forceTrackPosition", enterButton: "enterButton", placeholder: "placeholder" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted", isSearchActive: "isSearchActive" }, viewQueries: [{ propertyName: "autocomplete", first: true, predicate: AutocompleteComponent, descendants: true }], ngImport: i0, template: "<gn-ui-autocomplete\n [placeholder]=\"placeholder ?? ('search.field.any.placeholder' | translate)\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n (isSearchActive)=\"handleSearchActive($event)\"\n [value]=\"searchInputValue$ | async\"\n [preventCompleteOnSelection]=\"true\"\n [autoFocus]=\"autoFocus\"\n [allowSubmit]=\"true\"\n [forceTrackPosition]=\"forceTrackPosition\"\n [enterButton]=\"enterButton\"\n></gn-ui-autocomplete>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "enterButton", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "forceTrackPosition", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared", "isSearchActive"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31389
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: FuzzySearchComponent, isStandalone: true, selector: "gn-ui-fuzzy-search", inputs: { autoFocus: "autoFocus", forceTrackPosition: "forceTrackPosition", enterButton: "enterButton", placeholder: "placeholder" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted", isSearchActive: "isSearchActive" }, viewQueries: [{ propertyName: "autocomplete", first: true, predicate: AutocompleteComponent, descendants: true }], ngImport: i0, template: "<gn-ui-autocomplete\n [placeholder]=\"placeholder ?? ('search.field.any.placeholder' | translate)\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n (isSearchActive)=\"handleSearchActive($event)\"\n [value]=\"searchInputValue$ | async\"\n [preventCompleteOnSelection]=\"true\"\n [autoFocus]=\"autoFocus\"\n [allowSubmit]=\"true\"\n [forceTrackPosition]=\"forceTrackPosition\"\n [enterButton]=\"enterButton\"\n></gn-ui-autocomplete>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31912
31390
|
}
|
|
31913
31391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FuzzySearchComponent, decorators: [{
|
|
31914
31392
|
type: Component,
|
|
@@ -32467,6 +31945,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
32467
31945
|
|
|
32468
31946
|
marker('search.filters.summaryLabel.user');
|
|
32469
31947
|
marker('search.filters.summaryLabel.changeDate');
|
|
31948
|
+
marker('search.filters.summaryLabel.resourceCreationRevisionDate');
|
|
31949
|
+
marker('search.filters.summaryLabel.temporalExtent');
|
|
32470
31950
|
const OPEN_BOUND = '…';
|
|
32471
31951
|
class SearchFiltersSummaryItemComponent {
|
|
32472
31952
|
constructor() {
|
|
@@ -32848,95 +32328,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
32848
32328
|
], template: "<div\n class=\"bg-white rounded shadow shadow-lg relative h-full w-[400px] overflow-hidden\"\n>\n <div class=\"p-3 border-b border-gray-300 flex items-center\">\n <ng-icon class=\"mr-2\" name=\"matLayersOutline\"></ng-icon>\n <span translate>map.layers.list</span>\n </div>\n <div class=\"flex flex-col px-4 divide-y divide-y-gray-50\">\n @for (layer of layers$ | async; track layer; let index = $index) {\n <div class=\"flex flex-row py-3\">\n <ng-icon class=\"-ml-2 mr-2 shrink-0\" name=\"matChevronRight\"></ng-icon>\n <span class=\"mr-2 grow\">{{ layer.label }}</span>\n <a\n href\n class=\"underline text-sm text-red-700 hover:text-red-900\"\n (click)=\"deleteLayer(index); $event.preventDefault()\"\n >\n delete\n </a>\n </div>\n }\n </div>\n <gn-ui-expandable-panel-button [titleTemplate]=\"addLayerTitle\">\n <mat-tab-group animationDuration=\"200ms\" class=\"h-full\">\n <mat-tab [label]=\"'map.add.layer.catalog' | translate\">\n <div class=\"p-3\">\n <gn-ui-add-layer-from-catalog></gn-ui-add-layer-from-catalog>\n </div>\n </mat-tab>\n <mat-tab [label]=\"'map.add.layer.wms' | translate\" bodyClass=\"h-full\">\n <div class=\"p-3\">\n <gn-ui-add-layer-from-wms></gn-ui-add-layer-from-wms>\n </div>\n </mat-tab>\n <mat-tab [label]=\"'map.add.layer.wfs' | translate\" bodyClass=\"h-full\">\n <div class=\"p-3\">\n <gn-ui-add-layer-from-wfs></gn-ui-add-layer-from-wfs>\n </div>\n </mat-tab>\n <mat-tab [label]=\"'map.add.layer.ogc.api' | translate\" bodyClass=\"h-full\">\n <div class=\"p-3\">\n <gn-ui-add-layer-from-ogc-api\n [ogcUrl]=\"ogcUrl\"\n (layerAdded)=\"addLayer($event)\"\n ></gn-ui-add-layer-from-ogc-api>\n </div>\n </mat-tab>\n <mat-tab [label]=\"'map.add.layer.file' | translate\" bodyClass=\"h-full\">\n <div class=\"p-3\">\n <gn-ui-add-layer-from-file></gn-ui-add-layer-from-file>\n </div>\n </mat-tab>\n </mat-tab-group>\n </gn-ui-expandable-panel-button>\n</div>\n\n<ng-template #addLayerTitle>\n <ng-icon class=\"mr-4\" name=\"matAddCircleOutlineOutline\"> </ng-icon>\n <span translate>map.add.layer</span>\n</ng-template>\n" }]
|
|
32849
32329
|
}] });
|
|
32850
32330
|
|
|
32851
|
-
class GeocodingComponent {
|
|
32852
|
-
constructor() {
|
|
32853
|
-
this.mapFacade = inject(MapFacade);
|
|
32854
|
-
this.geocodingService = inject(GeocodingService);
|
|
32855
|
-
this.searchText = '';
|
|
32856
|
-
this.results = [];
|
|
32857
|
-
this.searchTextChanged = new Subject();
|
|
32858
|
-
this.destroy$ = new Subject();
|
|
32859
|
-
this.errorMessage = null;
|
|
32860
|
-
this.searchTextChanged
|
|
32861
|
-
.pipe(debounceTime(300), switchMap$1((searchText) => {
|
|
32862
|
-
return from(this.geocodingService.query(searchText)).pipe(catchError$1((error) => {
|
|
32863
|
-
this.errorMessage =
|
|
32864
|
-
'An error occurred while searching. Please try again.';
|
|
32865
|
-
console.error(error);
|
|
32866
|
-
return [];
|
|
32867
|
-
}));
|
|
32868
|
-
}), takeUntil(this.destroy$))
|
|
32869
|
-
.subscribe((results) => {
|
|
32870
|
-
this.results = results;
|
|
32871
|
-
});
|
|
32872
|
-
}
|
|
32873
|
-
ngOnDestroy() {
|
|
32874
|
-
this.destroy$.next();
|
|
32875
|
-
this.destroy$.complete();
|
|
32876
|
-
}
|
|
32877
|
-
onSearchChange(searchText) {
|
|
32878
|
-
if (!searchText) {
|
|
32879
|
-
this.clearSearch();
|
|
32880
|
-
return;
|
|
32881
|
-
}
|
|
32882
|
-
else {
|
|
32883
|
-
this.searchTextChanged.next(searchText);
|
|
32884
|
-
}
|
|
32885
|
-
}
|
|
32886
|
-
clearSearch() {
|
|
32887
|
-
this.searchText = '';
|
|
32888
|
-
this.results = [];
|
|
32889
|
-
this.errorMessage = null;
|
|
32890
|
-
}
|
|
32891
|
-
async zoomToLocation(result) {
|
|
32892
|
-
const geometry = result.geom;
|
|
32893
|
-
if (geometry.type === 'Point') {
|
|
32894
|
-
await this.zoomToPoint(geometry.coordinates);
|
|
32895
|
-
}
|
|
32896
|
-
else if (geometry.type === 'Polygon') {
|
|
32897
|
-
await this.zoomToPolygon(geometry.coordinates);
|
|
32898
|
-
}
|
|
32899
|
-
else {
|
|
32900
|
-
console.error(`Unsupported geometry type: ${geometry.type}`);
|
|
32901
|
-
}
|
|
32902
|
-
}
|
|
32903
|
-
async zoomToPoint(pointCoords) {
|
|
32904
|
-
const context = await firstValueFrom(this.mapFacade.context$);
|
|
32905
|
-
const view = {
|
|
32906
|
-
center: pointCoords,
|
|
32907
|
-
zoom: 10,
|
|
32908
|
-
};
|
|
32909
|
-
this.mapFacade.applyContext({
|
|
32910
|
-
...context,
|
|
32911
|
-
view,
|
|
32912
|
-
});
|
|
32913
|
-
}
|
|
32914
|
-
async zoomToPolygon(polygonCoords) {
|
|
32915
|
-
const context = await firstValueFrom(this.mapFacade.context$);
|
|
32916
|
-
const view = {
|
|
32917
|
-
geometry: {
|
|
32918
|
-
type: 'Polygon',
|
|
32919
|
-
coordinates: polygonCoords,
|
|
32920
|
-
},
|
|
32921
|
-
};
|
|
32922
|
-
this.mapFacade.applyContext({
|
|
32923
|
-
...context,
|
|
32924
|
-
view,
|
|
32925
|
-
});
|
|
32926
|
-
}
|
|
32927
|
-
onEnterPress() {
|
|
32928
|
-
if (this.results && this.results.length > 0) {
|
|
32929
|
-
this.zoomToLocation(this.results[0]);
|
|
32930
|
-
}
|
|
32931
|
-
}
|
|
32932
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32933
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: GeocodingComponent, isStandalone: true, selector: "gn-ui-geocoding", ngImport: i0, template: "<gn-ui-search-input\n [(value)]=\"searchText\"\n (valueChange)=\"onSearchChange($event)\"\n (keyup.enter)=\"onEnterPress()\"\n [placeholder]=\"'map.geocoding.placeholder' | translate\"\n>\n</gn-ui-search-input>\n@if (results && results.length) {\n <ul\n class=\"bg-gray-50 border border-gray-200 w-full mt-2 shadow-sm rounded-lg\"\n >\n @for (result of results; track result) {\n <li\n (click)=\"zoomToLocation(result)\"\n class=\"flex items-center pl-8 pr-4 py-2 border-b border-gray-200 relative cursor-pointer hover:bg-blue-100 hover:text-gray-800 transition duration-300 ease-in-out\"\n >\n <svg\n class=\"stroke-current text-blue-500 absolute w-5 h-5 left-3 top-3\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z\"\n />\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 11a3 3 0 11-6 0 3 3 0 016 0z\"\n />\n </svg>\n <span class=\"font-sans font-semibold ml-4\">{{ result.label }}</span>\n </li>\n }\n </ul>\n}\n", styles: [""], dependencies: [{ kind: "component", type: SearchInputComponent, selector: "gn-ui-search-input", inputs: ["value", "placeholder"], outputs: ["valueChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
32934
|
-
}
|
|
32935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GeocodingComponent, decorators: [{
|
|
32936
|
-
type: Component,
|
|
32937
|
-
args: [{ selector: 'gn-ui-geocoding', standalone: true, imports: [SearchInputComponent, TranslatePipe], template: "<gn-ui-search-input\n [(value)]=\"searchText\"\n (valueChange)=\"onSearchChange($event)\"\n (keyup.enter)=\"onEnterPress()\"\n [placeholder]=\"'map.geocoding.placeholder' | translate\"\n>\n</gn-ui-search-input>\n@if (results && results.length) {\n <ul\n class=\"bg-gray-50 border border-gray-200 w-full mt-2 shadow-sm rounded-lg\"\n >\n @for (result of results; track result) {\n <li\n (click)=\"zoomToLocation(result)\"\n class=\"flex items-center pl-8 pr-4 py-2 border-b border-gray-200 relative cursor-pointer hover:bg-blue-100 hover:text-gray-800 transition duration-300 ease-in-out\"\n >\n <svg\n class=\"stroke-current text-blue-500 absolute w-5 h-5 left-3 top-3\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z\"\n />\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 11a3 3 0 11-6 0 3 3 0 016 0z\"\n />\n </svg>\n <span class=\"font-sans font-semibold ml-4\">{{ result.label }}</span>\n </li>\n }\n </ul>\n}\n" }]
|
|
32938
|
-
}], ctorParameters: () => [] });
|
|
32939
|
-
|
|
32940
32331
|
/*
|
|
32941
32332
|
Metadata actions
|
|
32942
32333
|
*/
|
|
@@ -37981,7 +37372,7 @@ class GenericKeywordsComponent {
|
|
|
37981
37372
|
this.deletedKeyword.emit(keyword);
|
|
37982
37373
|
}
|
|
37983
37374
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GenericKeywordsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37984
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: GenericKeywordsComponent, isStandalone: true, selector: "gn-ui-generic-keywords", inputs: { keywords: "keywords", keywordTypes: "keywordTypes", placeholder: "placeholder", allowSubmit: "allowSubmit" }, outputs: { changedKeywords: "changedKeywords", addedKeyword: "addedKeyword", deletedKeyword: "deletedKeyword" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\n <gn-ui-autocomplete\n [placeholder]=\"placeholder\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n [preventCompleteOnSelection]=\"false\"\n [minCharacterCount]=\"1\"\n [allowSubmit]=\"false\"\n [clearOnSelection]=\"true\"\n ></gn-ui-autocomplete>\n <div class=\"flex gap-2 flex-wrap\">\n @for (keyword of keywords; track keyword) {\n <gn-ui-keyword-badge\n [keyword]=\"keyword\"\n [editable]=\"true\"\n (keywordRemove)=\"removeKeyword($event)\"\n ></gn-ui-keyword-badge>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "enterButton", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "forceTrackPosition", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared", "isSearchActive"] }, { kind: "component", type: KeywordBadgeComponent, selector: "gn-ui-keyword-badge", inputs: ["keyword", "editable"], outputs: ["keywordClick", "keywordRemove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37375
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: GenericKeywordsComponent, isStandalone: true, selector: "gn-ui-generic-keywords", inputs: { keywords: "keywords", keywordTypes: "keywordTypes", placeholder: "placeholder", allowSubmit: "allowSubmit" }, outputs: { changedKeywords: "changedKeywords", addedKeyword: "addedKeyword", deletedKeyword: "deletedKeyword" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\n <gn-ui-autocomplete\n [placeholder]=\"placeholder\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n [preventCompleteOnSelection]=\"false\"\n [minCharacterCount]=\"1\"\n [allowSubmit]=\"false\"\n [clearOnSelection]=\"true\"\n ></gn-ui-autocomplete>\n <div class=\"flex gap-2 flex-wrap\">\n @for (keyword of keywords; track keyword) {\n <gn-ui-keyword-badge\n [keyword]=\"keyword\"\n [editable]=\"true\"\n (keywordRemove)=\"removeKeyword($event)\"\n ></gn-ui-keyword-badge>\n }\n </div>\n</div>\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"] }, { kind: "component", type: KeywordBadgeComponent, selector: "gn-ui-keyword-badge", inputs: ["keyword", "editable"], outputs: ["keywordClick", "keywordRemove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37985
37376
|
}
|
|
37986
37377
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: GenericKeywordsComponent, decorators: [{
|
|
37987
37378
|
type: Component,
|
|
@@ -38573,7 +37964,7 @@ class FormFieldContactsForResourceComponent {
|
|
|
38573
37964
|
provideNgIconsConfig({
|
|
38574
37965
|
size: '1.5rem',
|
|
38575
37966
|
}),
|
|
38576
|
-
], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <div class=\"flex flex-row flex-wrap gap-2\" data-test=\"rolesToPick\">\n @for (role of rolesToPick; track role) {\n <gn-ui-button type=\"gray\" (buttonClick)=\"addRoleToDisplay(role)\">\n <ng-icon name=\"iconoirPlus\" class=\"text-primary\"></ng-icon>\n \n <span translate>{{ roleToLabel(role) }}</span>\n </gn-ui-button>\n }\n </div>\n @if (value.length === 0) {\n <div\n class=\"p-4 border border-primary bg-primary-lightest rounded-lg\"\n translate\n >\n editor.record.form.field.contactsForResource.noContact\n </div>\n }\n @if (roleSectionsToDisplay && roleSectionsToDisplay.length > 0) {\n <div class=\"mt-8\" data-test=\"displayedRoles\">\n @for (\n role of roleSectionsToDisplay;\n track role;\n let index = $index;\n let isLast = $last\n ) {\n <div class=\"flex flex-col gap-4\">\n <div class=\"flex flex-row justify-between\">\n <span class=\"font-bold text-base\" translate>{{\n roleToLabel(role)\n }}</span>\n </div>\n @if (role !== 'unspecified' && role !== 'other') {\n <gn-ui-autocomplete\n [placeholder]=\"\n 'editor.record.form.field.contactsForResource.placeholder'\n | translate\n \"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"addContact($event, role)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"1\"\n [clearOnSelection]=\"true\"\n [allowSubmit]=\"false\"\n >\n </gn-ui-autocomplete>\n }\n @if (contactsForRessourceByRole.get(role); as contacts) {\n <gn-ui-sortable-list\n [items]=\"contacts\"\n (itemsOrderChange)=\"handleContactsChanged($event, role)\"\n [elementTemplate]=\"contactTemplate\"\n ></gn-ui-sortable-list>\n <ng-template #contactTemplate let-contact>\n <gn-ui-contact-card [contact]=\"contact\"></gn-ui-contact-card>\n </ng-template>\n }\n @if (!isLast) {\n <hr class=\"border-t-[#D6D3D1] mt-4 mb-6\" />\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{--gn-ui-button-padding: 8px 8px;--gn-ui-button-rounded: 8px}\n"], dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "enterButton", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "forceTrackPosition", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared", "isSearchActive"] }, { kind: "component", type: ContactCardComponent, selector: "gn-ui-contact-card", inputs: ["contact"] }, { kind: "component", type: SortableListComponent, selector: "gn-ui-sortable-list", inputs: ["elementTemplate", "items"], outputs: ["itemsOrderChange"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37967
|
+
], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <div class=\"flex flex-row flex-wrap gap-2\" data-test=\"rolesToPick\">\n @for (role of rolesToPick; track role) {\n <gn-ui-button type=\"gray\" (buttonClick)=\"addRoleToDisplay(role)\">\n <ng-icon name=\"iconoirPlus\" class=\"text-primary\"></ng-icon>\n \n <span translate>{{ roleToLabel(role) }}</span>\n </gn-ui-button>\n }\n </div>\n @if (value.length === 0) {\n <div\n class=\"p-4 border border-primary bg-primary-lightest rounded-lg\"\n translate\n >\n editor.record.form.field.contactsForResource.noContact\n </div>\n }\n @if (roleSectionsToDisplay && roleSectionsToDisplay.length > 0) {\n <div class=\"mt-8\" data-test=\"displayedRoles\">\n @for (\n role of roleSectionsToDisplay;\n track role;\n let index = $index;\n let isLast = $last\n ) {\n <div class=\"flex flex-col gap-4\">\n <div class=\"flex flex-row justify-between\">\n <span class=\"font-bold text-base\" translate>{{\n roleToLabel(role)\n }}</span>\n </div>\n @if (role !== 'unspecified' && role !== 'other') {\n <gn-ui-autocomplete\n [placeholder]=\"\n 'editor.record.form.field.contactsForResource.placeholder'\n | translate\n \"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"addContact($event, role)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"1\"\n [clearOnSelection]=\"true\"\n [allowSubmit]=\"false\"\n >\n </gn-ui-autocomplete>\n }\n @if (contactsForRessourceByRole.get(role); as contacts) {\n <gn-ui-sortable-list\n [items]=\"contacts\"\n (itemsOrderChange)=\"handleContactsChanged($event, role)\"\n [elementTemplate]=\"contactTemplate\"\n ></gn-ui-sortable-list>\n <ng-template #contactTemplate let-contact>\n <gn-ui-contact-card [contact]=\"contact\"></gn-ui-contact-card>\n </ng-template>\n }\n @if (!isLast) {\n <hr class=\"border-t-[#D6D3D1] mt-4 mb-6\" />\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{--gn-ui-button-padding: 8px 8px;--gn-ui-button-rounded: 8px}\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"] }, { kind: "component", type: ContactCardComponent, selector: "gn-ui-contact-card", inputs: ["contact"] }, { kind: "component", type: SortableListComponent, selector: "gn-ui-sortable-list", inputs: ["elementTemplate", "items"], outputs: ["itemsOrderChange"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38577
37968
|
}
|
|
38578
37969
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldContactsForResourceComponent, decorators: [{
|
|
38579
37970
|
type: Component,
|
|
@@ -38673,7 +38064,7 @@ class FormFieldContactsComponent {
|
|
|
38673
38064
|
this.subscription.unsubscribe();
|
|
38674
38065
|
}
|
|
38675
38066
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldContactsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38676
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FormFieldContactsComponent, isStandalone: true, selector: "gn-ui-form-field-contacts", inputs: { value: "value", modelSpecifier: "modelSpecifier" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'editor.record.form.field.contacts.placeholder' | translate\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"addContact($event)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"1\"\n [clearOnSelection]=\"true\"\n >\n </gn-ui-autocomplete>\n\n @if (contacts.length > 0) {\n <gn-ui-sortable-list\n [items]=\"contacts\"\n (itemsOrderChange)=\"handleContactsChanged($event)\"\n [elementTemplate]=\"contactTemplate\"\n ></gn-ui-sortable-list>\n <ng-template #contactTemplate let-contact let-index=\"index\">\n @if (modelSpecifier === 'contact:editableDetails') {\n <gn-ui-contact-details-form\n [contact]=\"contact\"\n (contactChange)=\"handleContactChanged($event, index)\"\n ></gn-ui-contact-details-form>\n } @else {\n <gn-ui-contact-card [contact]=\"contact\"></gn-ui-contact-card>\n }\n </ng-template>\n } @else {\n <div\n class=\"p-4 text-sm border border-primary bg-primary-lightest rounded-lg\"\n translate\n >\n editor.record.form.field.contacts.noContact\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "enterButton", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "forceTrackPosition", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared", "isSearchActive"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: ContactCardComponent, selector: "gn-ui-contact-card", inputs: ["contact"] }, { kind: "component", type: ContactDetailsFormComponent, selector: "gn-ui-contact-details-form", inputs: ["contact"], outputs: ["contactChange"] }, { kind: "component", type: SortableListComponent, selector: "gn-ui-sortable-list", inputs: ["elementTemplate", "items"], outputs: ["itemsOrderChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38067
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FormFieldContactsComponent, isStandalone: true, selector: "gn-ui-form-field-contacts", inputs: { value: "value", modelSpecifier: "modelSpecifier" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'editor.record.form.field.contacts.placeholder' | translate\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"addContact($event)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"1\"\n [clearOnSelection]=\"true\"\n >\n </gn-ui-autocomplete>\n\n @if (contacts.length > 0) {\n <gn-ui-sortable-list\n [items]=\"contacts\"\n (itemsOrderChange)=\"handleContactsChanged($event)\"\n [elementTemplate]=\"contactTemplate\"\n ></gn-ui-sortable-list>\n <ng-template #contactTemplate let-contact let-index=\"index\">\n @if (modelSpecifier === 'contact:editableDetails') {\n <gn-ui-contact-details-form\n [contact]=\"contact\"\n (contactChange)=\"handleContactChanged($event, index)\"\n ></gn-ui-contact-details-form>\n } @else {\n <gn-ui-contact-card [contact]=\"contact\"></gn-ui-contact-card>\n }\n </ng-template>\n } @else {\n <div\n class=\"p-4 text-sm border border-primary bg-primary-lightest rounded-lg\"\n translate\n >\n editor.record.form.field.contacts.noContact\n </div>\n }\n</div>\n", styles: [""], 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"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: ContactCardComponent, selector: "gn-ui-contact-card", inputs: ["contact"] }, { kind: "component", type: ContactDetailsFormComponent, selector: "gn-ui-contact-details-form", inputs: ["contact"], outputs: ["contactChange"] }, { kind: "component", type: SortableListComponent, selector: "gn-ui-sortable-list", inputs: ["elementTemplate", "items"], outputs: ["itemsOrderChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38677
38068
|
}
|
|
38678
38069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldContactsComponent, decorators: [{
|
|
38679
38070
|
type: Component,
|
|
@@ -39026,7 +38417,7 @@ class OnlineServiceResourceInputComponent {
|
|
|
39026
38417
|
provideNgIconsConfig({
|
|
39027
38418
|
size: '1.5em',
|
|
39028
38419
|
}),
|
|
39029
|
-
], ngImport: i0, template: "<div class=\"flex flex-row justify-between\">\n <h3 class=\"text-[16px] font-bold text-main mb-[12px]\" translate>\n editor.record.form.field.onlineResource.edit.protocol\n </h3>\n @if (protocolHint) {\n <ng-icon\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"protocolHint\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n }\n</div>\n<div class=\"flex flex-row items-center gap-4 h-[48px]\">\n <mat-radio-group\n aria-labelledby=\"example-radio-group-label\"\n class=\"flex flex-row gap-[8px]\"\n [(ngModel)]=\"_service.accessServiceProtocol\"\n [disabled]=\"disabled\"\n (change)=\"resetAllFormFields()\"\n >\n @for (protocolOption of availableProtocolOptions; track protocolOption) {\n <mat-radio-button [value]=\"protocolOption.value\">\n {{ protocolOption.label | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n</div>\n\n<div class=\"flex flex-col gap-4\">\n <gn-ui-url-input\n class=\"w-full\"\n (uploadClick)=\"handleUploadClick($event)\"\n (valueChange)=\"handleUrlValueChange($event)\"\n [disabled]=\"disabled\"\n [value]=\"_service.url?.toString()\"\n [showValidateButton]=\"activeLayerSuggestion\"\n [resetUrlOnChange]=\"resetUrlOnChange\"\n >\n @if (activeLayerSuggestion) {\n <ng-content>\n <ng-icon name=\"iconoirRefresh\"></ng-icon>\n </ng-content>\n }\n </gn-ui-url-input>\n\n @if (loading) {\n <div class=\"flex justify-center w-full py-4\">\n <gn-ui-spinning-loader></gn-ui-spinning-loader>\n </div>\n }\n @if (errorMessage) {\n <p class=\"text-sm text-red-500 pl-4\" translate>\n editor.record.form.field.onlineResource.edit.identifier.error\n </p>\n }\n\n @if (\n !activeLayerSuggestion ||\n (_service.url && errorMessage) ||\n (modifyMode && (layers$ | async).length === 0)\n ) {\n <gn-ui-text-input\n class=\"grow border-b border-gray-300 pb-4\"\n [(value)]=\"_service.identifierInService\"\n [placeholder]=\"getIdentifierPlaceholder() | translate\"\n data-cy=\"identifier-in-service\"\n [disabled]=\"disabled\"\n ></gn-ui-text-input>\n }\n @if (activeLayerSuggestion && (layers$ | async)?.length > 0) {\n <gn-ui-autocomplete\n class=\"border-b border-gray-300 pb-4\"\n [placeholder]=\"\n 'editor.record.form.field.onlineResource.edit.identifier.select.label'\n | translate\n \"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleSelectValue($event)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"0\"\n [clearOnSelection]=\"false\"\n >\n </gn-ui-autocomplete>\n }\n @if (\n !modifyMode &&\n ((activeLayerSuggestion && (layers$ | async)) ||\n !activeLayerSuggestion ||\n (_service.url && errorMessage))\n ) {\n <gn-ui-button\n (buttonClick)=\"submit()\"\n [disabled]=\"disabled || !_service.identifierInService\"\n type=\"primary\"\n >\n <span class=\"text-white font-bold\" translate>\n editor.record.form.field.onlineResource.edit.identifier.submit</span\n >\n </gn-ui-button>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "enterButton", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "forceTrackPosition", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared", "isSearchActive"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i3$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i3$1.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: SpinningLoaderComponent, selector: "gn-ui-spinning-loader" }, { kind: "component", type: TextInputComponent, selector: "gn-ui-text-input", inputs: ["value", "extraClass", "placeholder", "required", "disabled", "type"], outputs: ["valueChange"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: UrlInputComponent, selector: "gn-ui-url-input", inputs: ["value", "extraClass", "placeholder", "disabled", "showValidateButton", "resetUrlOnChange"], outputs: ["valueChange", "uploadClick"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38420
|
+
], ngImport: i0, template: "<div class=\"flex flex-row justify-between\">\n <h3 class=\"text-[16px] font-bold text-main mb-[12px]\" translate>\n editor.record.form.field.onlineResource.edit.protocol\n </h3>\n @if (protocolHint) {\n <ng-icon\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"protocolHint\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n }\n</div>\n<div class=\"flex flex-row items-center gap-4 h-[48px]\">\n <mat-radio-group\n aria-labelledby=\"example-radio-group-label\"\n class=\"flex flex-row gap-[8px]\"\n [(ngModel)]=\"_service.accessServiceProtocol\"\n [disabled]=\"disabled\"\n (change)=\"resetAllFormFields()\"\n >\n @for (protocolOption of availableProtocolOptions; track protocolOption) {\n <mat-radio-button [value]=\"protocolOption.value\">\n {{ protocolOption.label | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n</div>\n\n<div class=\"flex flex-col gap-4\">\n <gn-ui-url-input\n class=\"w-full\"\n (uploadClick)=\"handleUploadClick($event)\"\n (valueChange)=\"handleUrlValueChange($event)\"\n [disabled]=\"disabled\"\n [value]=\"_service.url?.toString()\"\n [showValidateButton]=\"activeLayerSuggestion\"\n [resetUrlOnChange]=\"resetUrlOnChange\"\n >\n @if (activeLayerSuggestion) {\n <ng-content>\n <ng-icon name=\"iconoirRefresh\"></ng-icon>\n </ng-content>\n }\n </gn-ui-url-input>\n\n @if (loading) {\n <div class=\"flex justify-center w-full py-4\">\n <gn-ui-spinning-loader></gn-ui-spinning-loader>\n </div>\n }\n @if (errorMessage) {\n <p class=\"text-sm text-red-500 pl-4\" translate>\n editor.record.form.field.onlineResource.edit.identifier.error\n </p>\n }\n\n @if (\n !activeLayerSuggestion ||\n (_service.url && errorMessage) ||\n (modifyMode && (layers$ | async).length === 0)\n ) {\n <gn-ui-text-input\n class=\"grow border-b border-gray-300 pb-4\"\n [(value)]=\"_service.identifierInService\"\n [placeholder]=\"getIdentifierPlaceholder() | translate\"\n data-cy=\"identifier-in-service\"\n [disabled]=\"disabled\"\n ></gn-ui-text-input>\n }\n @if (activeLayerSuggestion && (layers$ | async)?.length > 0) {\n <gn-ui-autocomplete\n class=\"border-b border-gray-300 pb-4\"\n [placeholder]=\"\n 'editor.record.form.field.onlineResource.edit.identifier.select.label'\n | translate\n \"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleSelectValue($event)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"0\"\n [clearOnSelection]=\"false\"\n >\n </gn-ui-autocomplete>\n }\n @if (\n !modifyMode &&\n ((activeLayerSuggestion && (layers$ | async)) ||\n !activeLayerSuggestion ||\n (_service.url && errorMessage))\n ) {\n <gn-ui-button\n (buttonClick)=\"submit()\"\n [disabled]=\"disabled || !_service.identifierInService\"\n type=\"primary\"\n >\n <span class=\"text-white font-bold\" translate>\n editor.record.form.field.onlineResource.edit.identifier.submit</span\n >\n </gn-ui-button>\n }\n</div>\n", styles: [""], 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"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i3$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i3$1.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: SpinningLoaderComponent, selector: "gn-ui-spinning-loader" }, { kind: "component", type: TextInputComponent, selector: "gn-ui-text-input", inputs: ["value", "extraClass", "placeholder", "required", "disabled", "type"], outputs: ["valueChange"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: UrlInputComponent, selector: "gn-ui-url-input", inputs: ["value", "extraClass", "placeholder", "disabled", "showValidateButton", "resetUrlOnChange"], outputs: ["valueChange", "uploadClick"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
39030
38421
|
}
|
|
39031
38422
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: OnlineServiceResourceInputComponent, decorators: [{
|
|
39032
38423
|
type: Component,
|
|
@@ -40901,6 +40292,625 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
40901
40292
|
args: ['gnUiSearchRouterContainer']
|
|
40902
40293
|
}] } });
|
|
40903
40294
|
|
|
40295
|
+
const flatten = (base, obj, keepLevel = false) => Object.keys(obj).reduce((prev, curr) => {
|
|
40296
|
+
const path = base ? `${base}.${curr}` : curr;
|
|
40297
|
+
const val = obj[curr];
|
|
40298
|
+
if (keepLevel) {
|
|
40299
|
+
return { ...prev, [path]: flatten('', val) };
|
|
40300
|
+
}
|
|
40301
|
+
else if (typeof val === 'object' && !Array.isArray(val)) {
|
|
40302
|
+
return {
|
|
40303
|
+
...prev,
|
|
40304
|
+
...flatten(path, val),
|
|
40305
|
+
};
|
|
40306
|
+
}
|
|
40307
|
+
else {
|
|
40308
|
+
return { ...prev, [path]: val };
|
|
40309
|
+
}
|
|
40310
|
+
}, {});
|
|
40311
|
+
const checkKeys = (input, mandatory, optional) => {
|
|
40312
|
+
const keys = Object.keys(input);
|
|
40313
|
+
const missing = mandatory.filter((key) => keys.indexOf(key) === -1);
|
|
40314
|
+
const unrecognized = keys.filter((key) => mandatory.indexOf(key) === -1 && optional.indexOf(key) === -1);
|
|
40315
|
+
return {
|
|
40316
|
+
missing,
|
|
40317
|
+
unrecognized,
|
|
40318
|
+
};
|
|
40319
|
+
};
|
|
40320
|
+
/**
|
|
40321
|
+
* Only keeps recognized keys, flatten nested values (to allow having "." in keys),
|
|
40322
|
+
* pushes warnings and errors to the given arrays; returns null in case of error
|
|
40323
|
+
*/
|
|
40324
|
+
function parseConfigSection(fullConfigObj, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors) {
|
|
40325
|
+
if (typeof fullConfigObj[sectionName] !== 'object') {
|
|
40326
|
+
if (mandatoryKeys.length === 0)
|
|
40327
|
+
return null;
|
|
40328
|
+
outErrors.push(`The [${sectionName}] mandatory section is missing.`);
|
|
40329
|
+
return null;
|
|
40330
|
+
}
|
|
40331
|
+
const sectionConf = fullConfigObj[sectionName];
|
|
40332
|
+
const keysCheck = checkKeys(sectionConf, mandatoryKeys, optionalKeys);
|
|
40333
|
+
if (keysCheck.missing.length) {
|
|
40334
|
+
// note: this is not thrown to allow merging several Errors down the line
|
|
40335
|
+
outErrors.push(`In the [${sectionName}] section: ${keysCheck.missing.join(', ')}`);
|
|
40336
|
+
return null;
|
|
40337
|
+
}
|
|
40338
|
+
else if (keysCheck.unrecognized.length) {
|
|
40339
|
+
outWarnings.push(`In the [${sectionName}] section: ${keysCheck.unrecognized.join(', ')}`);
|
|
40340
|
+
keysCheck.unrecognized.forEach((key) => delete sectionConf[key]);
|
|
40341
|
+
}
|
|
40342
|
+
return sectionConf;
|
|
40343
|
+
}
|
|
40344
|
+
/**
|
|
40345
|
+
* Same as parseConfigSection but keeps all keys, recognized or not
|
|
40346
|
+
* Also the first level is the language code (e.g. 'en')
|
|
40347
|
+
* This is optional
|
|
40348
|
+
*/
|
|
40349
|
+
function parseTranslationsConfigSection(fullConfigObj, sectionName) {
|
|
40350
|
+
if (typeof fullConfigObj[sectionName] !== 'object') {
|
|
40351
|
+
return {};
|
|
40352
|
+
}
|
|
40353
|
+
return flatten('', fullConfigObj[sectionName], true);
|
|
40354
|
+
}
|
|
40355
|
+
/**
|
|
40356
|
+
* Same as parseConfigSection but handles an array of configs; this is
|
|
40357
|
+
* considered optional; returns null in case of error in at least one of
|
|
40358
|
+
* the sections
|
|
40359
|
+
*/
|
|
40360
|
+
function parseMultiConfigSection(fullConfigObj, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors) {
|
|
40361
|
+
const sections = fullConfigObj[sectionName];
|
|
40362
|
+
if (!sections) {
|
|
40363
|
+
return [];
|
|
40364
|
+
}
|
|
40365
|
+
if (!Array.isArray(sections)) {
|
|
40366
|
+
outErrors.push(`Expected [[${sectionName}]] to be an array of sections.`);
|
|
40367
|
+
return null;
|
|
40368
|
+
}
|
|
40369
|
+
const result = sections.map((section) => parseConfigSection({ [sectionName]: section }, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors));
|
|
40370
|
+
if (result.some((r) => r === null)) {
|
|
40371
|
+
return null;
|
|
40372
|
+
}
|
|
40373
|
+
return result;
|
|
40374
|
+
}
|
|
40375
|
+
function checkMetadataLanguage(parsedConfigSection, outWarnings) {
|
|
40376
|
+
const lang2 = toLang2(parsedConfigSection.metadata_language.toLowerCase());
|
|
40377
|
+
if (lang2?.length !== 2) {
|
|
40378
|
+
outWarnings.push(`In the [global] section: metadata_language = "${parsedConfigSection.metadata_language}" is not a recognized ISO 639 language code`);
|
|
40379
|
+
}
|
|
40380
|
+
return parsedConfigSection;
|
|
40381
|
+
}
|
|
40382
|
+
function checkNewRecordDefaultLanguage(parsedConfigSection, outWarnings) {
|
|
40383
|
+
const lang2 = toLang2(parsedConfigSection.new_record_default_language.toLowerCase());
|
|
40384
|
+
if (!(lang2 in LANG_2_TO_3_MAPPER)) {
|
|
40385
|
+
outWarnings.push(`In the [editing] section: new_record_default_language = "${parsedConfigSection.new_record_default_language}" is not a recognized ISO 639 language code`);
|
|
40386
|
+
return {
|
|
40387
|
+
...parsedConfigSection,
|
|
40388
|
+
new_record_default_language: undefined,
|
|
40389
|
+
};
|
|
40390
|
+
}
|
|
40391
|
+
return {
|
|
40392
|
+
...parsedConfigSection,
|
|
40393
|
+
new_record_default_language: lang2,
|
|
40394
|
+
};
|
|
40395
|
+
}
|
|
40396
|
+
function checkNewRecordStandard(parsedConfigSection, outWarnings) {
|
|
40397
|
+
const standard = parsedConfigSection.new_record_standard;
|
|
40398
|
+
const normalizedStandard = typeof standard === 'string' ? standard.trim().toLowerCase() : null;
|
|
40399
|
+
if (normalizedStandard === 'iso19139' ||
|
|
40400
|
+
normalizedStandard === 'iso19115-3') {
|
|
40401
|
+
return {
|
|
40402
|
+
...parsedConfigSection,
|
|
40403
|
+
new_record_standard: normalizedStandard,
|
|
40404
|
+
};
|
|
40405
|
+
}
|
|
40406
|
+
outWarnings.push(`In the [editing] section: new_record_standard = "${standard}" is not a supported metadata standard`);
|
|
40407
|
+
return {
|
|
40408
|
+
...parsedConfigSection,
|
|
40409
|
+
new_record_standard: undefined,
|
|
40410
|
+
};
|
|
40411
|
+
}
|
|
40412
|
+
|
|
40413
|
+
/**
|
|
40414
|
+
* This loader extends the default one based on JSON files but also loads custom translations
|
|
40415
|
+
* defined in the app configuration
|
|
40416
|
+
* Implements a fallback on default lang if translated labels are empty
|
|
40417
|
+
*/
|
|
40418
|
+
class FileWithOverridesTranslateLoader extends FileTranslateLoader {
|
|
40419
|
+
getTranslation(lang) {
|
|
40420
|
+
const baseLang = lang.substring(0, 2); // removing the right part of e.g. en_EN
|
|
40421
|
+
return super.getTranslation(baseLang).pipe(map$1((translations) => ({
|
|
40422
|
+
...translations,
|
|
40423
|
+
...getCustomTranslations(baseLang),
|
|
40424
|
+
})));
|
|
40425
|
+
}
|
|
40426
|
+
}
|
|
40427
|
+
|
|
40428
|
+
const MISSING_CONFIG_ERROR = `Application configuration was not initialized correctly.
|
|
40429
|
+
This error might show up in case of an invalid/malformed configuration file.
|
|
40430
|
+
|
|
40431
|
+
Note: make sure that you have called \`loadAppConfig\` from '../../../../../libs/util/app-config/src' before starting the Angular application.`;
|
|
40432
|
+
let globalConfig = null;
|
|
40433
|
+
function getGlobalConfig() {
|
|
40434
|
+
if (globalConfig === null)
|
|
40435
|
+
throw new Error(MISSING_CONFIG_ERROR);
|
|
40436
|
+
return globalConfig;
|
|
40437
|
+
}
|
|
40438
|
+
let themeConfig = null;
|
|
40439
|
+
function getThemeConfig() {
|
|
40440
|
+
if (themeConfig === null)
|
|
40441
|
+
throw new Error(MISSING_CONFIG_ERROR);
|
|
40442
|
+
return themeConfig;
|
|
40443
|
+
}
|
|
40444
|
+
let mapConfig = null;
|
|
40445
|
+
function getOptionalMapConfig() {
|
|
40446
|
+
return mapConfig;
|
|
40447
|
+
}
|
|
40448
|
+
let searchConfig = null;
|
|
40449
|
+
function getOptionalSearchConfig() {
|
|
40450
|
+
return searchConfig;
|
|
40451
|
+
}
|
|
40452
|
+
let editorConfig = null;
|
|
40453
|
+
function getOptionalEditorConfig() {
|
|
40454
|
+
return editorConfig;
|
|
40455
|
+
}
|
|
40456
|
+
let metadataQualityConfig = null;
|
|
40457
|
+
function getMetadataQualityConfig() {
|
|
40458
|
+
return (metadataQualityConfig ||
|
|
40459
|
+
{
|
|
40460
|
+
ENABLED: false,
|
|
40461
|
+
});
|
|
40462
|
+
}
|
|
40463
|
+
let customTranslations = null;
|
|
40464
|
+
function getCustomTranslations(langCode) {
|
|
40465
|
+
if (customTranslations === null)
|
|
40466
|
+
throw new Error(MISSING_CONFIG_ERROR);
|
|
40467
|
+
return langCode in customTranslations ? customTranslations[langCode] : {};
|
|
40468
|
+
}
|
|
40469
|
+
let appConfigLoaded = false;
|
|
40470
|
+
function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
40471
|
+
console.log(`[geonetwork-ui] Loading application configuration from ${configUrl}`);
|
|
40472
|
+
return fetch(configUrl)
|
|
40473
|
+
.then((resp) => {
|
|
40474
|
+
if (!resp.ok)
|
|
40475
|
+
throw new Error('Configuration file could not be loaded');
|
|
40476
|
+
return resp.text();
|
|
40477
|
+
})
|
|
40478
|
+
.then((conf) => {
|
|
40479
|
+
let parsed;
|
|
40480
|
+
try {
|
|
40481
|
+
parsed = TOML.parse(conf, { joiner: '\n', bigint: false });
|
|
40482
|
+
}
|
|
40483
|
+
catch (e) {
|
|
40484
|
+
throw new Error(`An error occurred when parsing the configuration file: ${e.message}`);
|
|
40485
|
+
}
|
|
40486
|
+
const errors = [];
|
|
40487
|
+
const warnings = [];
|
|
40488
|
+
let parsedGlobalSection = parseConfigSection(parsed, 'global', ['geonetwork4_api_url'], [
|
|
40489
|
+
'datahub_url',
|
|
40490
|
+
'edit_url_template',
|
|
40491
|
+
'proxy_path',
|
|
40492
|
+
'metadata_language',
|
|
40493
|
+
'login_url',
|
|
40494
|
+
'logout_url',
|
|
40495
|
+
'settings_url',
|
|
40496
|
+
'web_component_embedder_url',
|
|
40497
|
+
'languages',
|
|
40498
|
+
'contact_email',
|
|
40499
|
+
'reuse_form_url',
|
|
40500
|
+
], warnings, errors);
|
|
40501
|
+
if (parsedGlobalSection?.metadata_language) {
|
|
40502
|
+
parsedGlobalSection = checkMetadataLanguage(parsedGlobalSection, warnings);
|
|
40503
|
+
}
|
|
40504
|
+
globalConfig =
|
|
40505
|
+
parsedGlobalSection === null
|
|
40506
|
+
? null
|
|
40507
|
+
: {
|
|
40508
|
+
GN4_API_URL: parsedGlobalSection.geonetwork4_api_url,
|
|
40509
|
+
DATAHUB_URL: parsedGlobalSection.datahub_url,
|
|
40510
|
+
EDIT_URL_TEMPLATE: parsedGlobalSection.edit_url_template,
|
|
40511
|
+
PROXY_PATH: parsedGlobalSection.proxy_path,
|
|
40512
|
+
METADATA_LANGUAGE: parsedGlobalSection.metadata_language
|
|
40513
|
+
? parsedGlobalSection.metadata_language.toLowerCase()
|
|
40514
|
+
: undefined,
|
|
40515
|
+
LOGIN_URL: parsedGlobalSection.login_url,
|
|
40516
|
+
LOGOUT_URL: parsedGlobalSection.logout_url,
|
|
40517
|
+
SETTINGS_URL: parsedGlobalSection.settings_url,
|
|
40518
|
+
WEB_COMPONENT_EMBEDDER_URL: parsedGlobalSection.web_component_embedder_url,
|
|
40519
|
+
LANGUAGES: parsedGlobalSection.languages,
|
|
40520
|
+
CONTACT_EMAIL: parsedGlobalSection.contact_email,
|
|
40521
|
+
REUSE_FORM_URL: parsedGlobalSection.reuse_form_url,
|
|
40522
|
+
};
|
|
40523
|
+
const parsedLayersSections = parseMultiConfigSection(parsed, 'map_layer', ['type'], ['name', 'url', 'data', 'styleUrl', 'accessToken'], warnings, errors);
|
|
40524
|
+
const parsedMapSection = parseConfigSection(parsed, 'map', [], [
|
|
40525
|
+
'max_zoom',
|
|
40526
|
+
'do_not_tile_wms',
|
|
40527
|
+
'max_extent',
|
|
40528
|
+
'max_feature_count',
|
|
40529
|
+
'baselayer',
|
|
40530
|
+
'do_not_use_default_basemap',
|
|
40531
|
+
'external_viewer_url_template',
|
|
40532
|
+
'external_viewer_open_new_tab',
|
|
40533
|
+
], warnings, errors);
|
|
40534
|
+
mapConfig =
|
|
40535
|
+
parsedMapSection === null || parsedLayersSections === null
|
|
40536
|
+
? null
|
|
40537
|
+
: {
|
|
40538
|
+
MAX_ZOOM: parsedMapSection.max_zoom,
|
|
40539
|
+
DO_NOT_TILE_WMS: parsedMapSection.do_not_tile_wms,
|
|
40540
|
+
MAX_EXTENT: parsedMapSection.max_extent,
|
|
40541
|
+
MAX_FEATURE_COUNT: parsedMapSection.max_feature_count,
|
|
40542
|
+
EXTERNAL_VIEWER_URL_TEMPLATE: parsedMapSection.external_viewer_url_template,
|
|
40543
|
+
EXTERNAL_VIEWER_OPEN_NEW_TAB: parsedMapSection.external_viewer_open_new_tab,
|
|
40544
|
+
DO_NOT_USE_DEFAULT_BASEMAP: !!parsedMapSection.do_not_use_default_basemap,
|
|
40545
|
+
MAP_LAYERS: parsedLayersSections.map((map_layer) => ({
|
|
40546
|
+
TYPE: map_layer.type,
|
|
40547
|
+
URL: map_layer.url,
|
|
40548
|
+
NAME: map_layer.name,
|
|
40549
|
+
DATA: map_layer.data,
|
|
40550
|
+
STYLE_URL: map_layer.styleUrl,
|
|
40551
|
+
ACCESS_TOKEN: map_layer.accessToken,
|
|
40552
|
+
})),
|
|
40553
|
+
};
|
|
40554
|
+
const parsedThemeSection = parseConfigSection(parsed, 'theme', ['primary_color', 'secondary_color', 'main_color', 'background_color'], [
|
|
40555
|
+
'header_foreground_color',
|
|
40556
|
+
'main_font',
|
|
40557
|
+
'title_font',
|
|
40558
|
+
'fonts_stylesheet_url',
|
|
40559
|
+
'thumbnail_placeholder',
|
|
40560
|
+
'header_background',
|
|
40561
|
+
'favicon',
|
|
40562
|
+
], warnings, errors);
|
|
40563
|
+
themeConfig =
|
|
40564
|
+
parsedThemeSection === null
|
|
40565
|
+
? null
|
|
40566
|
+
: {
|
|
40567
|
+
PRIMARY_COLOR: parsedThemeSection.primary_color,
|
|
40568
|
+
SECONDARY_COLOR: parsedThemeSection.secondary_color,
|
|
40569
|
+
MAIN_COLOR: parsedThemeSection.main_color,
|
|
40570
|
+
BACKGROUND_COLOR: parsedThemeSection.background_color,
|
|
40571
|
+
HEADER_FOREGROUND_COLOR: parsedThemeSection.header_foreground_color,
|
|
40572
|
+
THUMBNAIL_PLACEHOLDER: parsedThemeSection.thumbnail_placeholder,
|
|
40573
|
+
HEADER_BACKGROUND: parsedThemeSection.header_background,
|
|
40574
|
+
TITLE_FONT: parsedThemeSection.title_font,
|
|
40575
|
+
MAIN_FONT: parsedThemeSection.main_font,
|
|
40576
|
+
FONTS_STYLESHEET_URL: parsedThemeSection.fonts_stylesheet_url,
|
|
40577
|
+
FAVICON: parsedThemeSection.favicon,
|
|
40578
|
+
};
|
|
40579
|
+
const parsedSearchSection = parseConfigSection(parsed, 'search', [], [
|
|
40580
|
+
'record_kind_quick_filter',
|
|
40581
|
+
'filter_geometry_data',
|
|
40582
|
+
'filter_geometry_url',
|
|
40583
|
+
'do_not_use_default_search_preset',
|
|
40584
|
+
'search_preset',
|
|
40585
|
+
'advanced_filters',
|
|
40586
|
+
'limit',
|
|
40587
|
+
'spatial_extent_max_file_size',
|
|
40588
|
+
'geocoding_provider',
|
|
40589
|
+
'geocoding_provider_options',
|
|
40590
|
+
], warnings, errors);
|
|
40591
|
+
const parsedSearchParams = parseMultiConfigSection(parsed, 'search_preset', ['name'], ['sort', 'filters'], warnings, errors);
|
|
40592
|
+
const parsedCustomFilters = parseMultiConfigSection(parsed, 'custom_filter', ['name', 'base_filter'], ['exclude_values', 'include_values', 'label_key'], warnings, errors);
|
|
40593
|
+
searchConfig =
|
|
40594
|
+
parsedSearchSection === null
|
|
40595
|
+
? null
|
|
40596
|
+
: {
|
|
40597
|
+
RECORD_KIND_QUICK_FILTER: parsedSearchSection.record_kind_quick_filter,
|
|
40598
|
+
FILTER_GEOMETRY_DATA: parsedSearchSection.filter_geometry_data,
|
|
40599
|
+
FILTER_GEOMETRY_URL: parsedSearchSection.filter_geometry_url,
|
|
40600
|
+
DO_NOT_USE_DEFAULT_SEARCH_PRESET: !!parsedSearchSection.do_not_use_default_search_preset,
|
|
40601
|
+
SEARCH_PRESET: parsedSearchParams.map((param) => ({
|
|
40602
|
+
sort: param.sort,
|
|
40603
|
+
name: param.name,
|
|
40604
|
+
filters: param.filters,
|
|
40605
|
+
})),
|
|
40606
|
+
ADVANCED_FILTERS: parsedSearchSection.advanced_filters,
|
|
40607
|
+
CUSTOM_FILTERS: (parsedCustomFilters ?? []).map((customFilter) => ({
|
|
40608
|
+
name: customFilter.name,
|
|
40609
|
+
baseFilter: customFilter.base_filter,
|
|
40610
|
+
excludeValues: customFilter.exclude_values,
|
|
40611
|
+
includeValues: customFilter.include_values,
|
|
40612
|
+
labelKey: customFilter.label_key,
|
|
40613
|
+
})),
|
|
40614
|
+
LIMIT: parsedSearchSection.limit,
|
|
40615
|
+
SPATIAL_EXTENT_MAX_FILE_SIZE: parsedSearchSection.spatial_extent_max_file_size,
|
|
40616
|
+
GEOCODING_PROVIDER: parsedSearchSection.geocoding_provider,
|
|
40617
|
+
GEOCODING_PROVIDER_OPTIONS: parsedSearchSection.geocoding_provider_options,
|
|
40618
|
+
};
|
|
40619
|
+
const parsedMetadataQualitySection = parseConfigSection(parsed, 'metadata-quality', [], ['enabled'], warnings, errors);
|
|
40620
|
+
metadataQualityConfig =
|
|
40621
|
+
parsedMetadataQualitySection === null
|
|
40622
|
+
? null
|
|
40623
|
+
: {
|
|
40624
|
+
ENABLED: parsedMetadataQualitySection.enabled,
|
|
40625
|
+
SORTABLE: parsedMetadataQualitySection.sortable,
|
|
40626
|
+
};
|
|
40627
|
+
let parsedEditingSection = parseConfigSection(parsed, 'editing', [], ['new_record_default_language', 'new_record_standard'], warnings, errors);
|
|
40628
|
+
if (parsedEditingSection !== null &&
|
|
40629
|
+
parsedEditingSection.new_record_default_language !== undefined) {
|
|
40630
|
+
parsedEditingSection = checkNewRecordDefaultLanguage(parsedEditingSection, warnings);
|
|
40631
|
+
}
|
|
40632
|
+
if (parsedEditingSection !== null &&
|
|
40633
|
+
parsedEditingSection.new_record_standard !== undefined) {
|
|
40634
|
+
parsedEditingSection = checkNewRecordStandard(parsedEditingSection, warnings);
|
|
40635
|
+
}
|
|
40636
|
+
editorConfig =
|
|
40637
|
+
parsedEditingSection === null
|
|
40638
|
+
? null
|
|
40639
|
+
: {
|
|
40640
|
+
NEW_RECORD_DEFAULT_LANGUAGE: parsedEditingSection.new_record_default_language,
|
|
40641
|
+
NEW_RECORD_STANDARD: parsedEditingSection.new_record_standard,
|
|
40642
|
+
};
|
|
40643
|
+
customTranslations = parseTranslationsConfigSection(parsed, 'translations');
|
|
40644
|
+
if (errors.length) {
|
|
40645
|
+
throw new Error(`One or more mandatory settings were missing from the configuration file.
|
|
40646
|
+
${errors.join('\n')}`);
|
|
40647
|
+
}
|
|
40648
|
+
else if (warnings.length) {
|
|
40649
|
+
console.warn(`One or more unexpected settings were encountered in the configuration file.
|
|
40650
|
+
${warnings.join('\n')}`);
|
|
40651
|
+
}
|
|
40652
|
+
appConfigLoaded = true;
|
|
40653
|
+
});
|
|
40654
|
+
}
|
|
40655
|
+
function isConfigLoaded() {
|
|
40656
|
+
return appConfigLoaded;
|
|
40657
|
+
}
|
|
40658
|
+
function _reset() {
|
|
40659
|
+
globalConfig = null;
|
|
40660
|
+
themeConfig = null;
|
|
40661
|
+
editorConfig = null;
|
|
40662
|
+
customTranslations = null;
|
|
40663
|
+
}
|
|
40664
|
+
const TRANSLATE_WITH_OVERRIDES_CONFIG = {
|
|
40665
|
+
compiler: {
|
|
40666
|
+
provide: TranslateCompiler,
|
|
40667
|
+
useClass: TranslateMessageFormatCompiler,
|
|
40668
|
+
},
|
|
40669
|
+
loader: [
|
|
40670
|
+
{
|
|
40671
|
+
provide: TRANSLATE_HTTP_LOADER_CONFIG,
|
|
40672
|
+
useValue: {
|
|
40673
|
+
prefix: './assets/i18n/',
|
|
40674
|
+
suffix: '.json',
|
|
40675
|
+
},
|
|
40676
|
+
},
|
|
40677
|
+
{
|
|
40678
|
+
provide: TranslateLoader,
|
|
40679
|
+
useClass: FileWithOverridesTranslateLoader,
|
|
40680
|
+
deps: [HttpClient, TRANSLATE_HTTP_LOADER_CONFIG],
|
|
40681
|
+
},
|
|
40682
|
+
],
|
|
40683
|
+
};
|
|
40684
|
+
|
|
40685
|
+
const okAppConfigFixture = () => `
|
|
40686
|
+
[global]
|
|
40687
|
+
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
40688
|
+
proxy_path = "/proxy/?url="
|
|
40689
|
+
metadata_language = "fre"
|
|
40690
|
+
login_url = "/cas/login?service="
|
|
40691
|
+
logout_url = "/geonetwork/signout"
|
|
40692
|
+
settings_url = "/geonetwork/settings"
|
|
40693
|
+
web_component_embedder_url = "/datahub/wc-embedder.html"
|
|
40694
|
+
|
|
40695
|
+
[map]
|
|
40696
|
+
max_zoom = 10
|
|
40697
|
+
max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
|
|
40698
|
+
do_not_use_default_basemap = false
|
|
40699
|
+
external_viewer_url_template = 'https://example.com/myviewer?'
|
|
40700
|
+
external_viewer_open_new_tab = true
|
|
40701
|
+
[[map_layer]]
|
|
40702
|
+
type = "wms"
|
|
40703
|
+
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
40704
|
+
name = "masque_hdf_ign_carto_latin1"
|
|
40705
|
+
[[map_layer]]
|
|
40706
|
+
type = "wfs"
|
|
40707
|
+
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
40708
|
+
name = "masque_hdf_ign_carto_latin1"
|
|
40709
|
+
|
|
40710
|
+
[theme]
|
|
40711
|
+
primary_color = "#093564"
|
|
40712
|
+
secondary_color = "#c2e9dc"
|
|
40713
|
+
main_color = "#212029" # All-purpose text color
|
|
40714
|
+
background_color = "#fdfbff"
|
|
40715
|
+
thumbnail_placeholder = 'assets/img/placeholder.svg'
|
|
40716
|
+
header_background = 'teal'
|
|
40717
|
+
header_foreground_color = "#872e2e"
|
|
40718
|
+
main_font = 'sans-serif'
|
|
40719
|
+
title_font = 'serif'
|
|
40720
|
+
fonts_stylesheet_url = "https://fonts.googleapis.com/css2?family=Open+Sans"
|
|
40721
|
+
|
|
40722
|
+
[search]
|
|
40723
|
+
record_kind_quick_filter = false
|
|
40724
|
+
filter_geometry_url = 'https://my.domain.org/geom.json'
|
|
40725
|
+
do_not_use_default_search_preset = false
|
|
40726
|
+
geocoding_provider = "geoplateforme"
|
|
40727
|
+
geocoding_provider_options.category = "administratif"
|
|
40728
|
+
geocoding_provider_options.limit = 5
|
|
40729
|
+
advanced_filters = ['publicationYear', 'documentStandard', 'inspireKeyword', 'topic', 'license', 'myOrg:firstCustomFilter', 'myOrg:secondCustomFilter']
|
|
40730
|
+
|
|
40731
|
+
[[custom_filter]]
|
|
40732
|
+
name = 'myOrg:firstCustomFilter'
|
|
40733
|
+
base_filter = 'keyword'
|
|
40734
|
+
exclude_values = ['my keyword 1', 'my keyword 2']
|
|
40735
|
+
label_key = 'myOrg.firstCustomFilter'
|
|
40736
|
+
|
|
40737
|
+
[[custom_filter]]
|
|
40738
|
+
name = 'myOrg:secondCustomFilter'
|
|
40739
|
+
base_filter = 'keyword'
|
|
40740
|
+
include_values = ['my keyword 3', 'my keyword 4']
|
|
40741
|
+
label_key = 'myOrg.secondCustomFilter'
|
|
40742
|
+
|
|
40743
|
+
[[search_preset]]
|
|
40744
|
+
sort = "-createDate"
|
|
40745
|
+
name = 'filterByOrgs'
|
|
40746
|
+
filters.q = 'Carto'
|
|
40747
|
+
filters.organisation = ['Org1', 'Org2']
|
|
40748
|
+
filters.format = ['ESRI Shapefile']
|
|
40749
|
+
filters.topic = ['boundaries']
|
|
40750
|
+
filters.publicationYear = ['2023', '2022']
|
|
40751
|
+
filters.spatial = ['yes']
|
|
40752
|
+
|
|
40753
|
+
[translations.en]
|
|
40754
|
+
"my.first.key" = 'First label.'
|
|
40755
|
+
"my.second.key" = """
|
|
40756
|
+
Second label,
|
|
40757
|
+
on two lines."""
|
|
40758
|
+
|
|
40759
|
+
[translations.de]
|
|
40760
|
+
my.first.key = 'Erste Etikett.'
|
|
40761
|
+
|
|
40762
|
+
[translations.fr]
|
|
40763
|
+
my.sample.text = "Un bon exemple de texte."
|
|
40764
|
+
"my.quoted.text" = 'du texte entre guillements.'
|
|
40765
|
+
`;
|
|
40766
|
+
const appConfigWithTranslationFixture = () => okAppConfigFixture();
|
|
40767
|
+
const minimalAppConfigFixture = () => `
|
|
40768
|
+
[global]
|
|
40769
|
+
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
40770
|
+
proxy_path = "/proxy/?url="
|
|
40771
|
+
|
|
40772
|
+
[theme]
|
|
40773
|
+
primary_color = "#093564"
|
|
40774
|
+
secondary_color = "#c2e9dc"
|
|
40775
|
+
main_color = "#212029" # All-purpose text color
|
|
40776
|
+
background_color = "#fdfbff"
|
|
40777
|
+
`;
|
|
40778
|
+
const customFilterMissingMandatoryConfigFixture = () => `
|
|
40779
|
+
[global]
|
|
40780
|
+
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
40781
|
+
|
|
40782
|
+
[theme]
|
|
40783
|
+
primary_color = "#093564"
|
|
40784
|
+
secondary_color = "#c2e9dc"
|
|
40785
|
+
main_color = "#212029" # All-purpose text color
|
|
40786
|
+
background_color = "#fdfbff"
|
|
40787
|
+
|
|
40788
|
+
[search]
|
|
40789
|
+
advanced_filters = ['myOrg:firstCustomFilter']
|
|
40790
|
+
|
|
40791
|
+
[[custom_filter]]
|
|
40792
|
+
name = 'myOrg:firstCustomFilter'
|
|
40793
|
+
`;
|
|
40794
|
+
const mapConfigFixture = () => ({
|
|
40795
|
+
MAX_ZOOM: 10,
|
|
40796
|
+
MAX_EXTENT: [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855],
|
|
40797
|
+
DO_NOT_USE_DEFAULT_BASEMAP: false,
|
|
40798
|
+
DO_NOT_TILE_WMS: false,
|
|
40799
|
+
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}"}]}]',
|
|
40800
|
+
EXTERNAL_VIEWER_OPEN_NEW_TAB: true,
|
|
40801
|
+
MAP_LAYERS: [
|
|
40802
|
+
{
|
|
40803
|
+
TYPE: 'xyz',
|
|
40804
|
+
URL: 'https://some-basemap-server',
|
|
40805
|
+
},
|
|
40806
|
+
{
|
|
40807
|
+
TYPE: 'wms',
|
|
40808
|
+
URL: 'https://some-wms-server',
|
|
40809
|
+
NAME: 'some_layername',
|
|
40810
|
+
},
|
|
40811
|
+
{
|
|
40812
|
+
TYPE: 'wfs',
|
|
40813
|
+
URL: 'https://some-wfs-server',
|
|
40814
|
+
NAME: 'some_layername',
|
|
40815
|
+
},
|
|
40816
|
+
],
|
|
40817
|
+
});
|
|
40818
|
+
const malformedConfigFixture = () => `
|
|
40819
|
+
{
|
|
40820
|
+
"I thought": "we were still doing json"
|
|
40821
|
+
}
|
|
40822
|
+
`;
|
|
40823
|
+
const missingMandatoryConfigFixture = () => `
|
|
40824
|
+
[theme]
|
|
40825
|
+
primary_color = "#093564"
|
|
40826
|
+
secondary_color = "#c2e9dc"
|
|
40827
|
+
background_color = "#fdfbff"
|
|
40828
|
+
main_font = 'sans-serif'
|
|
40829
|
+
`;
|
|
40830
|
+
const wrongLanguageCodeConfigFixture = () => `
|
|
40831
|
+
[global]
|
|
40832
|
+
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
40833
|
+
proxy_path = "/proxy/?url="
|
|
40834
|
+
metadata_language = "abc"
|
|
40835
|
+
|
|
40836
|
+
[map]
|
|
40837
|
+
|
|
40838
|
+
[theme]
|
|
40839
|
+
primary_color = "#093564"
|
|
40840
|
+
secondary_color = "#c2e9dc"
|
|
40841
|
+
main_color = "#212029" # All-purpose text color
|
|
40842
|
+
background_color = "#fdfbff"
|
|
40843
|
+
`;
|
|
40844
|
+
const unrecognizedKeysConfigFixture = () => `
|
|
40845
|
+
[global]
|
|
40846
|
+
geonetwork4_api_url = "/geonetwork/srv/api"
|
|
40847
|
+
proxy_path = "/proxy/?url="
|
|
40848
|
+
metadata_language = "fre"
|
|
40849
|
+
another_path = '/whatever'
|
|
40850
|
+
|
|
40851
|
+
[map]
|
|
40852
|
+
max_zoom = 10
|
|
40853
|
+
max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
|
|
40854
|
+
do_not_use_default_basemap = false
|
|
40855
|
+
external_viewer_url_template = 'https://example.com/myviewer?'
|
|
40856
|
+
external_viewer_open_new_tab = true
|
|
40857
|
+
another_zoom = 15
|
|
40858
|
+
[[map_layer]]
|
|
40859
|
+
type = "wms"
|
|
40860
|
+
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
40861
|
+
name = "masque_hdf_ign_carto_latin1"
|
|
40862
|
+
[[map_layer]]
|
|
40863
|
+
type = "wfs"
|
|
40864
|
+
url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
|
|
40865
|
+
name = "masque_hdf_ign_carto_latin1"
|
|
40866
|
+
another_layer = "wrong layer definition"
|
|
40867
|
+
|
|
40868
|
+
[theme]
|
|
40869
|
+
primary_color = "#093564"
|
|
40870
|
+
secondary_color = "#c2e9dc"
|
|
40871
|
+
main_color = "#212029" # All-purpose text color
|
|
40872
|
+
background_color = "#fdfbff"
|
|
40873
|
+
thumbnail_placeholder = 'assets/img/placeholder.svg'
|
|
40874
|
+
header_background = 'teal'
|
|
40875
|
+
header_foreground_color = "#872e2e"
|
|
40876
|
+
main_font = 'sans-serif'
|
|
40877
|
+
title_font = 'serif'
|
|
40878
|
+
another_color = 'red'
|
|
40879
|
+
`;
|
|
40880
|
+
|
|
40881
|
+
function getMapContextLayerFromConfig(config) {
|
|
40882
|
+
switch (config.TYPE) {
|
|
40883
|
+
case 'wms':
|
|
40884
|
+
return {
|
|
40885
|
+
type: 'wms',
|
|
40886
|
+
url: config.URL,
|
|
40887
|
+
name: config.NAME,
|
|
40888
|
+
};
|
|
40889
|
+
case 'wfs':
|
|
40890
|
+
return {
|
|
40891
|
+
type: 'wfs',
|
|
40892
|
+
url: config.URL,
|
|
40893
|
+
featureType: config.NAME,
|
|
40894
|
+
};
|
|
40895
|
+
case 'xyz':
|
|
40896
|
+
return {
|
|
40897
|
+
type: config.TYPE,
|
|
40898
|
+
url: config.URL,
|
|
40899
|
+
};
|
|
40900
|
+
case 'geojson':
|
|
40901
|
+
return {
|
|
40902
|
+
type: config.TYPE,
|
|
40903
|
+
...(config.DATA ? { data: config.DATA } : { url: config.URL }),
|
|
40904
|
+
};
|
|
40905
|
+
case 'maplibre-style':
|
|
40906
|
+
return {
|
|
40907
|
+
type: config.TYPE,
|
|
40908
|
+
styleUrl: config.STYLE_URL,
|
|
40909
|
+
accessToken: config.ACCESS_TOKEN,
|
|
40910
|
+
};
|
|
40911
|
+
}
|
|
40912
|
+
}
|
|
40913
|
+
|
|
40904
40914
|
const CHART_TYPE_VALUES = [
|
|
40905
40915
|
'bar',
|
|
40906
40916
|
'bar-horizontal',
|
|
@@ -40916,5 +40926,5 @@ const CHART_TYPE_VALUES = [
|
|
|
40916
40926
|
* Generated bundle index. Do not edit.
|
|
40917
40927
|
*/
|
|
40918
40928
|
|
|
40919
|
-
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, GEONETWORK_UI_TAG_NAME, GEONETWORK_UI_VERSION, GeoDataBadgeComponent, GeoTableViewComponent, GeocodingComponent, 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, 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, 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, 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 };
|
|
40929
|
+
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, 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, bboxToPolygon, blockModelFixture, bytesToMegabytes, canEditRecord, checkFileFormat, 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, 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 };
|
|
40920
40930
|
//# sourceMappingURL=geonetwork-ui.mjs.map
|