geonetwork-ui 2.10.3-dev.4154db07d → 2.11.0-dev.1cf4ab0c6
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 +1540 -839
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +242 -92
- package/index.d.ts.map +1 -1
- package/package.json +9 -8
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +5 -5
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +5 -5
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +43 -13
- package/src/libs/api/metadata-converter/src/lib/gn4/types/elasticsearch.model.ts +13 -1
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +9 -5
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/association-type.mapper.ts +12 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +99 -37
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +40 -16
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +40 -2
- package/src/libs/common/domain/src/lib/model/search/filter.model.ts +13 -1
- package/src/libs/common/domain/src/lib/model/search/sort-by.model.ts +1 -5
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +2 -2
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +3 -2
- package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +2 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +22 -22
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-associated-records/form-field-associated-records.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-associated-records/form-field-associated-records.component.html +33 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-associated-records/form-field-associated-records.component.ts +94 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +16 -12
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +6 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +6 -0
- package/src/libs/feature/editor/src/lib/fields.config.ts +5 -0
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -0
- package/src/libs/feature/notifications/src/lib/notifications.service.ts +6 -4
- package/src/libs/feature/record/src/lib/state/mdview.actions.ts +4 -8
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +7 -16
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +1 -3
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +4 -9
- package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +2 -7
- package/src/libs/feature/router/src/lib/default/router.service.ts +1 -1
- package/src/libs/feature/router/src/lib/default/state/query-params.utils.ts +1 -1
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.html +12 -4
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +58 -19
- package/src/libs/feature/search/src/lib/search-filters-summary-item/search-filters-summary-item.component.ts +18 -8
- package/src/libs/feature/search/src/lib/sort-by/sort-by.component.ts +1 -1
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +9 -1
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +43 -2
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -7
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +31 -19
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.ts +2 -2
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +2 -1
- package/src/libs/ui/inputs/src/index.ts +2 -0
- package/src/libs/ui/inputs/src/lib/date-adapter.providers.ts +30 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +3 -24
- package/src/libs/ui/inputs/src/lib/date-range-dropdown/date-range-dropdown.component.css +37 -3
- package/src/libs/ui/inputs/src/lib/date-range-dropdown/date-range-dropdown.component.html +135 -16
- package/src/libs/ui/inputs/src/lib/date-range-dropdown/date-range-dropdown.component.ts +166 -29
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +3 -7
- package/src/libs/ui/inputs/src/lib/drag-and-drop-file-input/drag-and-drop-file-input.component.css +1 -0
- package/src/libs/ui/inputs/src/lib/drag-and-drop-file-input/drag-and-drop-file-input.component.html +20 -7
- package/src/libs/ui/inputs/src/lib/drag-and-drop-file-input/drag-and-drop-file-input.component.ts +46 -5
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.css +0 -0
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.html +111 -0
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.ts +215 -0
- package/src/libs/util/app-config/src/lib/app-config.ts +3 -0
- package/src/libs/util/app-config/src/lib/model.ts +1 -0
- package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +19 -22
- package/src/libs/util/data-fetcher/src/lib/engine/duckdb.ts +185 -0
- package/src/libs/util/data-fetcher/src/lib/engine/results.ts +63 -0
- package/src/libs/util/data-fetcher/src/lib/{sql-utils.ts → engine/sql-utils.ts} +28 -13
- package/src/libs/util/data-fetcher/src/lib/model.ts +2 -1
- package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +53 -38
- package/src/libs/util/data-fetcher/src/lib/readers/base.ts +11 -0
- package/src/libs/util/data-fetcher/src/lib/readers/csv.ts +9 -47
- package/src/libs/util/data-fetcher/src/lib/readers/excel.ts +27 -27
- package/src/libs/util/data-fetcher/src/lib/readers/geojson.ts +5 -24
- package/src/libs/util/data-fetcher/src/lib/readers/gml.ts +5 -49
- package/src/libs/util/data-fetcher/src/lib/readers/json.ts +5 -23
- package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +184 -128
- package/src/libs/util/data-fetcher/src/lib/utils.ts +0 -143
- package/src/libs/util/shared/src/index.ts +1 -0
- package/src/libs/util/shared/src/lib/autofocus.directive.ts +26 -0
- package/src/libs/util/shared/src/lib/gn-ui-version.ts +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +19 -10
- package/src/libs/util/shared/src/lib/services/date.service.ts +3 -3
- package/src/libs/util/shared/src/lib/utils/file.ts +15 -0
- package/src/libs/util/shared/src/lib/utils/geojson.ts +8 -0
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/tailwind.base.css +5 -0
- package/translations/de.json +30 -3
- package/translations/en.json +29 -2
- package/translations/es.json +27 -0
- package/translations/fr.json +30 -3
- package/translations/it.json +28 -1
- package/translations/nl.json +27 -0
- package/translations/pt.json +27 -0
- package/translations/sk.json +28 -1
- package/src/libs/util/data-fetcher/src/lib/readers/base-cache.ts +0 -14
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { parseXml, XmlDocument, XmlElement, XmlText } from '@rgrove/parse-xml';
|
|
2
2
|
export { XmlDocument, XmlElement } from '@rgrove/parse-xml';
|
|
3
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
|
3
4
|
import GML32 from 'ol/format/GML32.js';
|
|
4
5
|
import GeoJSON from 'ol/format/GeoJSON.js';
|
|
5
6
|
import { parse as parse$1 } from 'ol/xml.js';
|
|
6
|
-
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
|
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, combineLatest, from, exhaustMap, throwError,
|
|
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, takeUntil, EMPTY, mergeMap as mergeMap$1, withLatestFrom as withLatestFrom$1 } from 'rxjs';
|
|
10
10
|
import * as i0 from '@angular/core';
|
|
11
|
-
import { InjectionToken, inject, Injectable, NgModule, Injector, provideAppInitializer, makeEnvironmentProviders, ElementRef,
|
|
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';
|
|
13
13
|
import * as i4 from '@ngx-translate/core';
|
|
14
14
|
import { TranslateLoader, TranslateCompiler, TranslateDefaultParser, TranslateParser, TranslateService, provideTranslateService, TranslateDirective, TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
@@ -18,7 +18,7 @@ import { map as map$1, shareReplay as shareReplay$1, catchError, tap as tap$1, f
|
|
|
18
18
|
import { lt, valid, coerce, satisfies, ltr } from 'semver';
|
|
19
19
|
import chroma from 'chroma-js';
|
|
20
20
|
import * as i1$1 from '@angular/common';
|
|
21
|
-
import { Location, CommonModule,
|
|
21
|
+
import { Location, CommonModule, NgTemplateOutlet, NgClass, AsyncPipe } from '@angular/common';
|
|
22
22
|
import { formatDistance } from 'date-fns/formatDistance';
|
|
23
23
|
import { Scroll, NavigationEnd, Router, RouteReuseStrategy } from '@angular/router';
|
|
24
24
|
import { WmtsEndpoint, WmsEndpoint, WfsEndpoint, OgcApiEndpoint, sharedFetch, useCache, StacEndpoint, TmsEndpoint } from '@camptocamp/ogc-client';
|
|
@@ -41,10 +41,10 @@ import * as TOML from '@ltd/j-toml';
|
|
|
41
41
|
import { Style, Stroke, Fill, Circle } from 'ol/style.js';
|
|
42
42
|
import CircleStyle from 'ol/style/Circle.js';
|
|
43
43
|
import EmblaCarousel from 'embla-carousel';
|
|
44
|
-
import { iconoirNavArrowLeft, iconoirNavArrowRight, iconoirLongArrowDownLeft, iconoirSearch, iconoirCalendar, iconoirArrowUp, iconoirLink, iconoirFramePlusIn, iconoirCloudUpload, iconoirReduce, iconoirNavArrowUp, iconoirNavArrowDown, iconoirExpand, iconoirSettings, iconoirDownload, iconoirPlus, iconoirBin, iconoirMediaImageXmark, iconoirMediaImage, iconoirAppWindow, iconoirCode, iconoirDatabase, iconoirAppleWallet, iconoirBank, iconoirList, iconoirTranslate, iconoirLock, iconoirUser, iconoirArrowLeft, iconoirLightBulbOn,
|
|
44
|
+
import { iconoirNavArrowLeft, iconoirNavArrowRight, iconoirLongArrowDownLeft, iconoirSearch, iconoirCalendar, iconoirArrowUp, iconoirLink, iconoirFramePlusIn, iconoirCloudUpload, iconoirTrash, iconoirSquareDashed, iconoirImport, iconoirCheckCircle, iconoirReduce, iconoirNavArrowUp, iconoirNavArrowDown, iconoirExpand, iconoirSettings, iconoirDownload, iconoirPlus, iconoirBin, iconoirMediaImageXmark, iconoirMediaImage, iconoirAppWindow, iconoirCode, iconoirDatabase, iconoirAppleWallet, iconoirBank, iconoirList, iconoirTranslate, iconoirLock, iconoirUser, iconoirArrowLeft, iconoirLightBulbOn, iconoirBadgeCheck, iconoirSystemShut, iconoirCircle, iconoirAttachment, iconoirRefresh } from '@ng-icons/iconoir';
|
|
45
45
|
import { MatButtonModule } from '@angular/material/button';
|
|
46
|
-
import * as i1$
|
|
47
|
-
import {
|
|
46
|
+
import * as i1$7 from '@angular/cdk/overlay';
|
|
47
|
+
import { ScrollStrategyOptions, OverlayModule, CdkConnectedOverlay, ScrollDispatcher, Overlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
48
48
|
import * as i1$3 from '@angular/forms';
|
|
49
49
|
import { UntypedFormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
50
50
|
import * as i1$2 from '@angular/material/autocomplete';
|
|
@@ -52,16 +52,18 @@ import { MatAutocompleteModule, MatAutocompleteTrigger, MatAutocomplete } from '
|
|
|
52
52
|
import tippy from 'tippy.js';
|
|
53
53
|
import * as i2 from '@angular/material/progress-spinner';
|
|
54
54
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
55
|
-
import { matClose, matContentCopy,
|
|
55
|
+
import { matClose, matContentCopy, matExpandMore, matExpandLess, matSearch, matStarBorder, matStar, matRemove, matAdd, matChevronRight, matChevronLeft, matArrowForwardIos, matArrowBackIos, matMoodBad, matQuestionMark, matFace, matZoomOutMap, matOpenInNew, matPersonOutline, matMailOutline, matWarningAmber, matCheck, matCheckCircleOutline, matWarning, matMoreVert } from '@ng-icons/material-icons/baseline';
|
|
56
56
|
import * as i1$4 from '@angular/material/checkbox';
|
|
57
57
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
58
58
|
import * as i1$5 from '@angular/material/tooltip';
|
|
59
59
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
60
|
-
import {
|
|
60
|
+
import { MAT_DATE_LOCALE, MAT_DATE_FORMATS, DateAdapter } from '@angular/material/core';
|
|
61
|
+
import { MAT_DATE_FNS_FORMATS, DateFnsAdapter } from '@angular/material-date-fns-adapter';
|
|
62
|
+
import { enUS } from 'date-fns/locale/en-US';
|
|
61
63
|
import * as i1$6 from '@angular/material/datepicker';
|
|
62
64
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
63
|
-
import * as i1$
|
|
64
|
-
import { NgxDropzoneModule } from 'ngx-dropzone';
|
|
65
|
+
import * as i1$8 from 'ngx-dropzone';
|
|
66
|
+
import { NgxDropzoneModule, NgxDropzoneComponent } from 'ngx-dropzone';
|
|
65
67
|
import * as i1$9 from '@angular/material/button-toggle';
|
|
66
68
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
67
69
|
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
@@ -79,10 +81,10 @@ import { ScrollingModule, CdkScrollable } from '@angular/cdk/scrolling';
|
|
|
79
81
|
import Duration from 'duration-relativetimeformat';
|
|
80
82
|
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
|
81
83
|
import { trigger, transition, animate, keyframes, style } from '@angular/animations';
|
|
82
|
-
import * as
|
|
83
|
-
import {
|
|
84
|
-
import
|
|
85
|
-
import
|
|
84
|
+
import * as duckdb from '@duckdb/duckdb-wasm';
|
|
85
|
+
import { Vector, DataType } from 'apache-arrow';
|
|
86
|
+
import WFS from 'ol/format/WFS';
|
|
87
|
+
import GeoJSON$1 from 'ol/format/GeoJSON';
|
|
86
88
|
import { Chart, BarController, BarElement, CategoryScale, LinearScale, LineController, LineElement, PointElement, PieController, ArcElement, ScatterController, Tooltip, Colors, Legend } from 'chart.js';
|
|
87
89
|
import * as i2$4 from '@angular/material/sort';
|
|
88
90
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
@@ -90,7 +92,6 @@ import * as i1$b from '@angular/material/table';
|
|
|
90
92
|
import { MatTableModule } from '@angular/material/table';
|
|
91
93
|
import * as i3 from '@angular/material/paginator';
|
|
92
94
|
import { MatPaginatorIntl, MatPaginatorModule, MatPaginator } from '@angular/material/paginator';
|
|
93
|
-
import { LetDirective } from '@ngrx/component';
|
|
94
95
|
import { Meta } from '@angular/platform-browser';
|
|
95
96
|
import { tablerFolderOpen } from '@ng-icons/tabler-icons';
|
|
96
97
|
import * as i3$1 from '@angular/material/radio';
|
|
@@ -674,6 +675,149 @@ function matchMimeType(format) {
|
|
|
674
675
|
return format || null;
|
|
675
676
|
}
|
|
676
677
|
|
|
678
|
+
const RoleValues = [
|
|
679
|
+
'unspecified',
|
|
680
|
+
'other',
|
|
681
|
+
'author', // Party who authored the resource
|
|
682
|
+
'collaborator', // party who assists with the generation of the resource other than the principal investigator
|
|
683
|
+
'contributor', // party contributing to the resource
|
|
684
|
+
'custodian', // Party that accepts accountability and responsibility for the data and ensures appropriate care and maintenance of the resource
|
|
685
|
+
'distributor', // Party who distributes the resource
|
|
686
|
+
'editor', // party who reviewed or modified the resource to improve the content
|
|
687
|
+
'funder', // party providing monetary support for the resource
|
|
688
|
+
'mediator', // a class of entity that mediates access to the resource and for whom the resource is intended or useful
|
|
689
|
+
'originator', // Party who created the resource
|
|
690
|
+
'owner', // Party that owns the resource
|
|
691
|
+
'point_of_contact', // Party who can be contacted for acquiring knowledge about or acquisition of the resource
|
|
692
|
+
'principal_investigator', // Key party responsible for gathering information and conducting research
|
|
693
|
+
'processor', // Party who has processed the data in a manner such that the resource has been modified
|
|
694
|
+
'publisher', // Party who published the resource
|
|
695
|
+
'resource_provider', // Party that supplies the resource
|
|
696
|
+
'rights_holder', // party owning or managing rights over the resource
|
|
697
|
+
'sponsor', // party that sponsors the resource
|
|
698
|
+
'stakeholder', // party who has an interest in the resource or the use of the resource
|
|
699
|
+
'user', // Party who uses the resource
|
|
700
|
+
];
|
|
701
|
+
const RoleLabels = new Map([
|
|
702
|
+
['unspecified', marker('domain.contact.role.unspecified')],
|
|
703
|
+
['other', marker('domain.contact.role.other')],
|
|
704
|
+
['author', marker('domain.contact.role.author')],
|
|
705
|
+
['collaborator', marker('domain.contact.role.collaborator')],
|
|
706
|
+
['contributor', marker('domain.contact.role.contributor')],
|
|
707
|
+
['custodian', marker('domain.contact.role.custodian')],
|
|
708
|
+
['distributor', marker('domain.contact.role.distributor')],
|
|
709
|
+
['editor', marker('domain.contact.role.editor')],
|
|
710
|
+
['funder', marker('domain.contact.role.funder')],
|
|
711
|
+
['mediator', marker('domain.contact.role.mediator')],
|
|
712
|
+
['originator', marker('domain.contact.role.originator')],
|
|
713
|
+
['owner', marker('domain.contact.role.owner')],
|
|
714
|
+
['point_of_contact', marker('domain.contact.role.point_of_contact')],
|
|
715
|
+
[
|
|
716
|
+
'principal_investigator',
|
|
717
|
+
marker('domain.contact.role.principal_investigator'),
|
|
718
|
+
],
|
|
719
|
+
['processor', marker('domain.contact.role.processor')],
|
|
720
|
+
['publisher', marker('domain.contact.role.publisher')],
|
|
721
|
+
['resource_provider', marker('domain.contact.role.resource_provider')],
|
|
722
|
+
['rights_holder', marker('domain.contact.role.rights_holder')],
|
|
723
|
+
['sponsor', marker('domain.contact.role.sponsor')],
|
|
724
|
+
['stakeholder', marker('domain.contact.role.stakeholder')],
|
|
725
|
+
['user', marker('domain.contact.role.user')],
|
|
726
|
+
]);
|
|
727
|
+
|
|
728
|
+
marker('domain.record.updateFrequency.unknown');
|
|
729
|
+
marker('domain.record.updateFrequency.notPlanned');
|
|
730
|
+
marker('domain.record.updateFrequency.asNeeded');
|
|
731
|
+
marker('domain.record.updateFrequency.irregular');
|
|
732
|
+
marker('domain.record.updateFrequency.continual');
|
|
733
|
+
marker('domain.record.updateFrequency.periodic');
|
|
734
|
+
const updateFrequencyCodeValues = [
|
|
735
|
+
'unknown',
|
|
736
|
+
'notPlanned',
|
|
737
|
+
'asNeeded',
|
|
738
|
+
'irregular',
|
|
739
|
+
'continual',
|
|
740
|
+
'periodic',
|
|
741
|
+
'daily',
|
|
742
|
+
'weekly',
|
|
743
|
+
'fortnightly',
|
|
744
|
+
'semimonthly',
|
|
745
|
+
'monthly',
|
|
746
|
+
'quarterly',
|
|
747
|
+
'biannually',
|
|
748
|
+
'annually',
|
|
749
|
+
'biennially',
|
|
750
|
+
];
|
|
751
|
+
marker('domain.record.updateFrequency.day');
|
|
752
|
+
marker('domain.record.updateFrequency.week');
|
|
753
|
+
marker('domain.record.updateFrequency.month');
|
|
754
|
+
marker('domain.record.updateFrequency.year');
|
|
755
|
+
marker('domain.record.updateFrequency.daily');
|
|
756
|
+
marker('domain.record.updateFrequency.weekly');
|
|
757
|
+
marker('domain.record.updateFrequency.fortnightly');
|
|
758
|
+
marker('domain.record.updateFrequency.monthly');
|
|
759
|
+
marker('domain.record.updateFrequency.quarterly');
|
|
760
|
+
marker('domain.record.updateFrequency.biannually');
|
|
761
|
+
marker('domain.record.updateFrequency.annually');
|
|
762
|
+
marker('domain.record.updateFrequency.semimonthly');
|
|
763
|
+
marker('domain.record.updateFrequency.biennially');
|
|
764
|
+
marker('domain.record.status.completed');
|
|
765
|
+
marker('domain.record.status.ongoing');
|
|
766
|
+
marker('domain.record.status.under_development');
|
|
767
|
+
marker('domain.record.status.deprecated');
|
|
768
|
+
marker('domain.record.status.removed');
|
|
769
|
+
marker('domain.record.status.planned');
|
|
770
|
+
marker('domain.record.status.required');
|
|
771
|
+
const RecordStatusValues = [
|
|
772
|
+
'completed',
|
|
773
|
+
'ongoing',
|
|
774
|
+
'under_development',
|
|
775
|
+
'deprecated',
|
|
776
|
+
'removed',
|
|
777
|
+
'planned',
|
|
778
|
+
'required',
|
|
779
|
+
];
|
|
780
|
+
marker('record.metadata.api.accessServiceProtocol.wms');
|
|
781
|
+
marker('record.metadata.api.accessServiceProtocol.wfs');
|
|
782
|
+
marker('record.metadata.api.accessServiceProtocol.wps');
|
|
783
|
+
marker('record.metadata.api.accessServiceProtocol.wmts');
|
|
784
|
+
marker('record.metadata.api.accessServiceProtocol.esriRest');
|
|
785
|
+
marker('record.metadata.api.accessServiceProtocol.ogcFeatures');
|
|
786
|
+
marker('record.metadata.api.accessServiceProtocol.GPFDL');
|
|
787
|
+
marker('record.metadata.api.accessServiceProtocol.tms');
|
|
788
|
+
marker('record.metadata.api.accessServiceProtocol.maplibre-style');
|
|
789
|
+
marker('record.metadata.api.accessServiceProtocol.postgis');
|
|
790
|
+
marker('record.metadata.api.accessServiceProtocol.stac');
|
|
791
|
+
marker('record.metadata.api.accessServiceProtocol.other');
|
|
792
|
+
marker('domain.record.associationType.crossReference');
|
|
793
|
+
marker('domain.record.associationType.largerWorkCitation');
|
|
794
|
+
marker('domain.record.associationType.partOfSeamlessDatabase');
|
|
795
|
+
marker('domain.record.associationType.stereoMate');
|
|
796
|
+
marker('domain.record.associationType.isComposedOf');
|
|
797
|
+
marker('domain.record.associationType.collectiveTitle');
|
|
798
|
+
marker('domain.record.associationType.series');
|
|
799
|
+
marker('domain.record.associationType.dependency');
|
|
800
|
+
marker('domain.record.associationType.revisionOf');
|
|
801
|
+
// DS_AssociationTypeCode values of the ISO19115-3 codelist, any unrecognized value
|
|
802
|
+
// being mapped to 'crossReference'
|
|
803
|
+
const associationTypeValues = [
|
|
804
|
+
'crossReference',
|
|
805
|
+
'largerWorkCitation',
|
|
806
|
+
'partOfSeamlessDatabase',
|
|
807
|
+
'stereoMate',
|
|
808
|
+
'isComposedOf',
|
|
809
|
+
'collectiveTitle',
|
|
810
|
+
'series',
|
|
811
|
+
'dependency',
|
|
812
|
+
'revisionOf',
|
|
813
|
+
];
|
|
814
|
+
|
|
815
|
+
function getAssociationTypeFromCode(associationTypeCode) {
|
|
816
|
+
return associationTypeValues.includes(associationTypeCode)
|
|
817
|
+
? associationTypeCode
|
|
818
|
+
: 'crossReference';
|
|
819
|
+
}
|
|
820
|
+
|
|
677
821
|
function readGeometry(el) {
|
|
678
822
|
const xmlDoc = createDocument(el);
|
|
679
823
|
xmlDoc.root.attributes['xmlns'] = 'http://www.opengis.net/gml/3.2';
|
|
@@ -802,121 +946,6 @@ function getStatusFromStatusCode(statusCode) {
|
|
|
802
946
|
}
|
|
803
947
|
}
|
|
804
948
|
|
|
805
|
-
const RoleValues = [
|
|
806
|
-
'unspecified',
|
|
807
|
-
'other',
|
|
808
|
-
'author', // Party who authored the resource
|
|
809
|
-
'collaborator', // party who assists with the generation of the resource other than the principal investigator
|
|
810
|
-
'contributor', // party contributing to the resource
|
|
811
|
-
'custodian', // Party that accepts accountability and responsibility for the data and ensures appropriate care and maintenance of the resource
|
|
812
|
-
'distributor', // Party who distributes the resource
|
|
813
|
-
'editor', // party who reviewed or modified the resource to improve the content
|
|
814
|
-
'funder', // party providing monetary support for the resource
|
|
815
|
-
'mediator', // a class of entity that mediates access to the resource and for whom the resource is intended or useful
|
|
816
|
-
'originator', // Party who created the resource
|
|
817
|
-
'owner', // Party that owns the resource
|
|
818
|
-
'point_of_contact', // Party who can be contacted for acquiring knowledge about or acquisition of the resource
|
|
819
|
-
'principal_investigator', // Key party responsible for gathering information and conducting research
|
|
820
|
-
'processor', // Party who has processed the data in a manner such that the resource has been modified
|
|
821
|
-
'publisher', // Party who published the resource
|
|
822
|
-
'resource_provider', // Party that supplies the resource
|
|
823
|
-
'rights_holder', // party owning or managing rights over the resource
|
|
824
|
-
'sponsor', // party that sponsors the resource
|
|
825
|
-
'stakeholder', // party who has an interest in the resource or the use of the resource
|
|
826
|
-
'user', // Party who uses the resource
|
|
827
|
-
];
|
|
828
|
-
const RoleLabels = new Map([
|
|
829
|
-
['unspecified', marker('domain.contact.role.unspecified')],
|
|
830
|
-
['other', marker('domain.contact.role.other')],
|
|
831
|
-
['author', marker('domain.contact.role.author')],
|
|
832
|
-
['collaborator', marker('domain.contact.role.collaborator')],
|
|
833
|
-
['contributor', marker('domain.contact.role.contributor')],
|
|
834
|
-
['custodian', marker('domain.contact.role.custodian')],
|
|
835
|
-
['distributor', marker('domain.contact.role.distributor')],
|
|
836
|
-
['editor', marker('domain.contact.role.editor')],
|
|
837
|
-
['funder', marker('domain.contact.role.funder')],
|
|
838
|
-
['mediator', marker('domain.contact.role.mediator')],
|
|
839
|
-
['originator', marker('domain.contact.role.originator')],
|
|
840
|
-
['owner', marker('domain.contact.role.owner')],
|
|
841
|
-
['point_of_contact', marker('domain.contact.role.point_of_contact')],
|
|
842
|
-
[
|
|
843
|
-
'principal_investigator',
|
|
844
|
-
marker('domain.contact.role.principal_investigator'),
|
|
845
|
-
],
|
|
846
|
-
['processor', marker('domain.contact.role.processor')],
|
|
847
|
-
['publisher', marker('domain.contact.role.publisher')],
|
|
848
|
-
['resource_provider', marker('domain.contact.role.resource_provider')],
|
|
849
|
-
['rights_holder', marker('domain.contact.role.rights_holder')],
|
|
850
|
-
['sponsor', marker('domain.contact.role.sponsor')],
|
|
851
|
-
['stakeholder', marker('domain.contact.role.stakeholder')],
|
|
852
|
-
['user', marker('domain.contact.role.user')],
|
|
853
|
-
]);
|
|
854
|
-
|
|
855
|
-
marker('domain.record.updateFrequency.unknown');
|
|
856
|
-
marker('domain.record.updateFrequency.notPlanned');
|
|
857
|
-
marker('domain.record.updateFrequency.asNeeded');
|
|
858
|
-
marker('domain.record.updateFrequency.irregular');
|
|
859
|
-
marker('domain.record.updateFrequency.continual');
|
|
860
|
-
marker('domain.record.updateFrequency.periodic');
|
|
861
|
-
const updateFrequencyCodeValues = [
|
|
862
|
-
'unknown',
|
|
863
|
-
'notPlanned',
|
|
864
|
-
'asNeeded',
|
|
865
|
-
'irregular',
|
|
866
|
-
'continual',
|
|
867
|
-
'periodic',
|
|
868
|
-
'daily',
|
|
869
|
-
'weekly',
|
|
870
|
-
'fortnightly',
|
|
871
|
-
'semimonthly',
|
|
872
|
-
'monthly',
|
|
873
|
-
'quarterly',
|
|
874
|
-
'biannually',
|
|
875
|
-
'annually',
|
|
876
|
-
'biennially',
|
|
877
|
-
];
|
|
878
|
-
marker('domain.record.updateFrequency.day');
|
|
879
|
-
marker('domain.record.updateFrequency.week');
|
|
880
|
-
marker('domain.record.updateFrequency.month');
|
|
881
|
-
marker('domain.record.updateFrequency.year');
|
|
882
|
-
marker('domain.record.updateFrequency.daily');
|
|
883
|
-
marker('domain.record.updateFrequency.weekly');
|
|
884
|
-
marker('domain.record.updateFrequency.fortnightly');
|
|
885
|
-
marker('domain.record.updateFrequency.monthly');
|
|
886
|
-
marker('domain.record.updateFrequency.quarterly');
|
|
887
|
-
marker('domain.record.updateFrequency.biannually');
|
|
888
|
-
marker('domain.record.updateFrequency.annually');
|
|
889
|
-
marker('domain.record.updateFrequency.semimonthly');
|
|
890
|
-
marker('domain.record.updateFrequency.biennially');
|
|
891
|
-
marker('domain.record.status.completed');
|
|
892
|
-
marker('domain.record.status.ongoing');
|
|
893
|
-
marker('domain.record.status.under_development');
|
|
894
|
-
marker('domain.record.status.deprecated');
|
|
895
|
-
marker('domain.record.status.removed');
|
|
896
|
-
marker('domain.record.status.planned');
|
|
897
|
-
marker('domain.record.status.required');
|
|
898
|
-
const RecordStatusValues = [
|
|
899
|
-
'completed',
|
|
900
|
-
'ongoing',
|
|
901
|
-
'under_development',
|
|
902
|
-
'deprecated',
|
|
903
|
-
'removed',
|
|
904
|
-
'planned',
|
|
905
|
-
'required',
|
|
906
|
-
];
|
|
907
|
-
marker('record.metadata.api.accessServiceProtocol.wms');
|
|
908
|
-
marker('record.metadata.api.accessServiceProtocol.wfs');
|
|
909
|
-
marker('record.metadata.api.accessServiceProtocol.wps');
|
|
910
|
-
marker('record.metadata.api.accessServiceProtocol.wmts');
|
|
911
|
-
marker('record.metadata.api.accessServiceProtocol.esriRest');
|
|
912
|
-
marker('record.metadata.api.accessServiceProtocol.ogcFeatures');
|
|
913
|
-
marker('record.metadata.api.accessServiceProtocol.GPFDL');
|
|
914
|
-
marker('record.metadata.api.accessServiceProtocol.tms');
|
|
915
|
-
marker('record.metadata.api.accessServiceProtocol.maplibre-style');
|
|
916
|
-
marker('record.metadata.api.accessServiceProtocol.postgis');
|
|
917
|
-
marker('record.metadata.api.accessServiceProtocol.stac');
|
|
918
|
-
marker('record.metadata.api.accessServiceProtocol.other');
|
|
919
|
-
|
|
920
949
|
function getUpdateFrequencyFromFrequencyCode(frequencyCode) {
|
|
921
950
|
return frequencyCode &&
|
|
922
951
|
updateFrequencyCodeValues.includes(frequencyCode)
|
|
@@ -1484,14 +1513,17 @@ function extractSourceRecords(liLineageEl) {
|
|
|
1484
1513
|
function readSourceRecords$1(rootEl) {
|
|
1485
1514
|
return extractSourceRecords(pipe(findNestedElement('gmd:dataQualityInfo', 'gmd:DQ_DataQuality', 'gmd:lineage', 'gmd:LI_Lineage'))(rootEl));
|
|
1486
1515
|
}
|
|
1487
|
-
function extractAssociatedRecords(containerName, aggregateName,
|
|
1516
|
+
function extractAssociatedRecords(containerName, aggregateName, readIdentifier) {
|
|
1488
1517
|
return pipe(findChildrenElement(containerName, false), mapArray((el) => {
|
|
1489
1518
|
const aggregateEl = findChildElement(aggregateName, false)(el);
|
|
1490
|
-
const
|
|
1491
|
-
const
|
|
1492
|
-
if (!
|
|
1519
|
+
const uniqueIdentifier = readIdentifier(aggregateEl);
|
|
1520
|
+
const associationTypeCode = pipe(findNestedElement('gmd:associationType', 'gmd:DS_AssociationTypeCode'), readAttribute('codeListValue'))(aggregateEl);
|
|
1521
|
+
if (!uniqueIdentifier || !associationTypeCode)
|
|
1493
1522
|
return null;
|
|
1494
|
-
return {
|
|
1523
|
+
return {
|
|
1524
|
+
uniqueIdentifier,
|
|
1525
|
+
associationType: getAssociationTypeFromCode(associationTypeCode),
|
|
1526
|
+
};
|
|
1495
1527
|
}), filterArray((r) => r !== null));
|
|
1496
1528
|
}
|
|
1497
1529
|
function readAssociatedRecords$1(rootEl) {
|
|
@@ -2039,8 +2071,8 @@ function writeSourceRecords$1(record, rootEl) {
|
|
|
2039
2071
|
}
|
|
2040
2072
|
function writeAssociatedRecords$1(record, rootEl) {
|
|
2041
2073
|
pipe(findOrCreateIdentification(), removeChildrenByName('gmd:aggregationInfo'), appendChildren(...record.associatedRecords
|
|
2042
|
-
.filter((assoc) => assoc.
|
|
2043
|
-
.map((assoc) => pipe(createNestedElement('gmd:aggregationInfo', 'gmd:MD_AggregateInformation'), appendChildren(pipe(createNestedElement('gmd:aggregateDataSetIdentifier', 'gmd:MD_Identifier', 'gmd:code'), writeCharacterString(assoc.
|
|
2074
|
+
.filter((assoc) => assoc.uniqueIdentifier && assoc.associationType)
|
|
2075
|
+
.map((assoc) => pipe(createNestedElement('gmd:aggregationInfo', 'gmd:MD_AggregateInformation'), appendChildren(pipe(createNestedElement('gmd:aggregateDataSetIdentifier', 'gmd:MD_Identifier', 'gmd:code'), writeCharacterString(assoc.uniqueIdentifier)), pipe(createNestedElement('gmd:associationType', 'gmd:DS_AssociationTypeCode'), writeAttribute('codeList', 'http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#DS_AssociationTypeCode'), writeAttribute('codeListValue', assoc.associationType)))))))(rootEl);
|
|
2044
2076
|
}
|
|
2045
2077
|
function getServiceEndpointProtocol(endpoint) {
|
|
2046
2078
|
switch (endpoint.accessServiceProtocol.toLowerCase()) {
|
|
@@ -2752,8 +2784,8 @@ function writeSourceRecords(record, rootEl) {
|
|
|
2752
2784
|
}
|
|
2753
2785
|
function writeAssociatedRecords(record, rootEl) {
|
|
2754
2786
|
pipe(findOrCreateIdentification(), removeChildrenByName('mri:associatedResource'), appendChildren(...record.associatedRecords
|
|
2755
|
-
.filter((assoc) => assoc.
|
|
2756
|
-
.map((assoc) => pipe(createNestedElement('mri:associatedResource', 'mri:MD_AssociatedResource'), appendChildren(pipe(createNestedElement('mri:associationType', 'mri:DS_AssociationTypeCode'), writeAttribute('codeList', 'http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#DS_AssociationTypeCode'), writeAttribute('codeListValue', assoc.associationType)), pipe(createElement('mri:metadataReference'), writeAttribute('uuidref', assoc.
|
|
2787
|
+
.filter((assoc) => assoc.uniqueIdentifier && assoc.associationType)
|
|
2788
|
+
.map((assoc) => pipe(createNestedElement('mri:associatedResource', 'mri:MD_AssociatedResource'), appendChildren(pipe(createNestedElement('mri:associationType', 'mri:DS_AssociationTypeCode'), writeAttribute('codeList', 'http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#DS_AssociationTypeCode'), writeAttribute('codeListValue', assoc.associationType)), pipe(createElement('mri:metadataReference'), writeAttribute('uuidref', assoc.uniqueIdentifier)))))))(rootEl);
|
|
2757
2789
|
}
|
|
2758
2790
|
|
|
2759
2791
|
class Iso191153Converter extends Iso19139Converter {
|
|
@@ -18876,14 +18908,29 @@ class Gn4FieldMapper {
|
|
|
18876
18908
|
featureTypes: selectField(source, 'featureTypes'),
|
|
18877
18909
|
}, output),
|
|
18878
18910
|
related: (output, source) => {
|
|
18879
|
-
const
|
|
18911
|
+
const related = selectField(source, 'related');
|
|
18912
|
+
const fcatSource = selectField(getFirstValue(selectField(related, 'fcats')) ?? {}, '_source');
|
|
18880
18913
|
const featureCatalogIdentifier = selectField(fcatSource, 'uuid');
|
|
18881
|
-
const sourceOfLinks = getAsArray(selectField(
|
|
18914
|
+
const sourceOfLinks = getAsArray(selectField(related, 'hassources'));
|
|
18882
18915
|
const sourceOfIdentifiers = sourceOfLinks
|
|
18883
18916
|
.filter((link) => link['origin'] === 'catalog')
|
|
18884
18917
|
.map((link) => {
|
|
18885
18918
|
return selectField(selectField(link, '_source'), 'uuid');
|
|
18886
18919
|
});
|
|
18920
|
+
const siblingLinks = getAsArray(selectField(related, 'siblings'));
|
|
18921
|
+
const siblings = siblingLinks
|
|
18922
|
+
.filter((link) => link['origin'] === 'catalog')
|
|
18923
|
+
.map((link) => ({
|
|
18924
|
+
uniqueIdentifier: selectField(selectField(link, '_source'), 'uuid'),
|
|
18925
|
+
associationType: getAssociationTypeFromCode(selectField(selectField(link, 'properties'), 'associationType')),
|
|
18926
|
+
}));
|
|
18927
|
+
const associatedLinks = getAsArray(selectField(related, 'associated'));
|
|
18928
|
+
const associatedIdentifiers = associatedLinks
|
|
18929
|
+
.filter((link) => link['origin'] === 'catalog')
|
|
18930
|
+
.map((link) => {
|
|
18931
|
+
return selectField(selectField(link, '_source'), 'uuid');
|
|
18932
|
+
})
|
|
18933
|
+
.filter((uuid) => !siblings.some((sibling) => sibling.uniqueIdentifier === uuid));
|
|
18887
18934
|
const extraValues = {};
|
|
18888
18935
|
if (featureCatalogIdentifier) {
|
|
18889
18936
|
extraValues.featureCatalogIdentifier = featureCatalogIdentifier;
|
|
@@ -18891,6 +18938,12 @@ class Gn4FieldMapper {
|
|
|
18891
18938
|
if (sourceOfIdentifiers && sourceOfIdentifiers.length > 0) {
|
|
18892
18939
|
extraValues.sourceOfIdentifiers = sourceOfIdentifiers;
|
|
18893
18940
|
}
|
|
18941
|
+
if (associatedIdentifiers && associatedIdentifiers.length > 0) {
|
|
18942
|
+
extraValues.associatedIdentifiers = associatedIdentifiers;
|
|
18943
|
+
}
|
|
18944
|
+
if (siblings && siblings.length > 0) {
|
|
18945
|
+
extraValues.siblings = siblings;
|
|
18946
|
+
}
|
|
18894
18947
|
return Object.keys(extraValues).length > 0
|
|
18895
18948
|
? this.addExtra(extraValues, output)
|
|
18896
18949
|
: output;
|
|
@@ -19416,10 +19469,10 @@ class DateService {
|
|
|
19416
19469
|
const dateObj = this.getDateObject(date);
|
|
19417
19470
|
return { locale, dateObj };
|
|
19418
19471
|
}
|
|
19419
|
-
async
|
|
19472
|
+
async getDateFnsLocale() {
|
|
19420
19473
|
const lang = this.translateService.getCurrentLang() || DEFAULT_LANGUAGE;
|
|
19421
19474
|
const locales = await this.dateLocales;
|
|
19422
|
-
return locales[lang];
|
|
19475
|
+
return locales[lang] ?? locales[DEFAULT_LANGUAGE];
|
|
19423
19476
|
}
|
|
19424
19477
|
formatDate(date, options) {
|
|
19425
19478
|
const { locale, dateObj } = this.getLocaleAndDate(date);
|
|
@@ -19432,7 +19485,7 @@ class DateService {
|
|
|
19432
19485
|
async formatRelativeDateTime(date) {
|
|
19433
19486
|
const dateObj = this.getDateObject(date);
|
|
19434
19487
|
const now = new Date();
|
|
19435
|
-
const locale = await this.
|
|
19488
|
+
const locale = await this.getDateFnsLocale();
|
|
19436
19489
|
return formatDistance(dateObj, now, {
|
|
19437
19490
|
addSuffix: true,
|
|
19438
19491
|
locale: locale,
|
|
@@ -19467,6 +19520,18 @@ function propagateToDocumentOnly(event) {
|
|
|
19467
19520
|
}, 0);
|
|
19468
19521
|
}
|
|
19469
19522
|
|
|
19523
|
+
function isFileExtensionValid(fileName, acceptedExtensions) {
|
|
19524
|
+
return acceptedExtensions.some((ext) => fileName.toLowerCase().endsWith(ext));
|
|
19525
|
+
}
|
|
19526
|
+
function readFileAsText(file) {
|
|
19527
|
+
return new Promise((resolve, reject) => {
|
|
19528
|
+
const reader = new FileReader();
|
|
19529
|
+
reader.onload = () => resolve(reader.result);
|
|
19530
|
+
reader.onerror = () => reject(reader.error);
|
|
19531
|
+
reader.readAsText(file);
|
|
19532
|
+
});
|
|
19533
|
+
}
|
|
19534
|
+
|
|
19470
19535
|
function formatUserInfo(userInfo, displayCount = false) {
|
|
19471
19536
|
const infos = (typeof userInfo === 'string' ? userInfo : '').split('|');
|
|
19472
19537
|
const count = displayCount ? ` ${infos[3].split(' ')[1]}` : '';
|
|
@@ -19526,6 +19591,11 @@ function getGeometryFromGeoJSON(data) {
|
|
|
19526
19591
|
}
|
|
19527
19592
|
return null;
|
|
19528
19593
|
}
|
|
19594
|
+
function isBoundingBox(value) {
|
|
19595
|
+
return (Array.isArray(value) &&
|
|
19596
|
+
value.length === 4 &&
|
|
19597
|
+
value.every((item) => typeof item === 'number'));
|
|
19598
|
+
}
|
|
19529
19599
|
function getGeometryBoundingBox(geometry) {
|
|
19530
19600
|
// use the bounding box if specified in the GeoJSON object
|
|
19531
19601
|
if (geometry.bbox) {
|
|
@@ -20194,7 +20264,7 @@ function getLinkLabel(link) {
|
|
|
20194
20264
|
const label = link.description || ('name' in link ? link.name : '');
|
|
20195
20265
|
return format ? `${label} (${format})` : label;
|
|
20196
20266
|
}
|
|
20197
|
-
async function getLayers(url, serviceProtocol) {
|
|
20267
|
+
async function getLayers(url, serviceProtocol, deep = false) {
|
|
20198
20268
|
switch (serviceProtocol) {
|
|
20199
20269
|
case 'ogcFeatures': {
|
|
20200
20270
|
const layers = await new OgcApiEndpoint(url).allCollections;
|
|
@@ -20202,7 +20272,10 @@ async function getLayers(url, serviceProtocol) {
|
|
|
20202
20272
|
}
|
|
20203
20273
|
case 'wfs': {
|
|
20204
20274
|
const endpointWfs = await new WfsEndpoint(url).isReady();
|
|
20205
|
-
const featureTypes =
|
|
20275
|
+
const featureTypes = endpointWfs.getFeatureTypes();
|
|
20276
|
+
if (!deep) {
|
|
20277
|
+
return featureTypes;
|
|
20278
|
+
}
|
|
20206
20279
|
const layers = (await Promise.allSettled(featureTypes.map((collection) => {
|
|
20207
20280
|
return endpointWfs.getFeatureTypeFull(collection.name);
|
|
20208
20281
|
})))
|
|
@@ -20212,12 +20285,14 @@ async function getLayers(url, serviceProtocol) {
|
|
|
20212
20285
|
}
|
|
20213
20286
|
case 'wms': {
|
|
20214
20287
|
const endpointWms = await new WmsEndpoint(url).isReady();
|
|
20215
|
-
const
|
|
20288
|
+
const layersSummary = endpointWms
|
|
20216
20289
|
.getLayers()
|
|
20217
20290
|
.flatMap(wmsLayerFlatten)
|
|
20218
|
-
.filter((l) => l.name)
|
|
20219
|
-
|
|
20220
|
-
|
|
20291
|
+
.filter((l) => l.name);
|
|
20292
|
+
if (!deep) {
|
|
20293
|
+
return layersSummary;
|
|
20294
|
+
}
|
|
20295
|
+
const layers = layersSummary.map((collection) => endpointWms.getLayerByName(collection.name));
|
|
20221
20296
|
return layers;
|
|
20222
20297
|
}
|
|
20223
20298
|
case 'wmts': {
|
|
@@ -20311,6 +20386,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
20311
20386
|
}]
|
|
20312
20387
|
}] });
|
|
20313
20388
|
|
|
20389
|
+
class AutofocusDirective {
|
|
20390
|
+
constructor() {
|
|
20391
|
+
this.el = inject(ElementRef);
|
|
20392
|
+
this.injector = inject(Injector);
|
|
20393
|
+
}
|
|
20394
|
+
set autofocus(active) {
|
|
20395
|
+
if (!active)
|
|
20396
|
+
return;
|
|
20397
|
+
afterNextRender(() => this.el.nativeElement.focus(), {
|
|
20398
|
+
injector: this.injector,
|
|
20399
|
+
});
|
|
20400
|
+
}
|
|
20401
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AutofocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
20402
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.19", type: AutofocusDirective, isStandalone: true, selector: "[gnUiAutofocus]", inputs: { autofocus: ["gnUiAutofocus", "autofocus", booleanAttribute] }, ngImport: i0 }); }
|
|
20403
|
+
}
|
|
20404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AutofocusDirective, decorators: [{
|
|
20405
|
+
type: Directive,
|
|
20406
|
+
args: [{
|
|
20407
|
+
selector: '[gnUiAutofocus]',
|
|
20408
|
+
standalone: true,
|
|
20409
|
+
}]
|
|
20410
|
+
}], propDecorators: { autofocus: [{
|
|
20411
|
+
type: Input,
|
|
20412
|
+
args: [{ alias: 'gnUiAutofocus', transform: booleanAttribute }]
|
|
20413
|
+
}] } });
|
|
20414
|
+
|
|
20314
20415
|
class ImageFallbackDirective {
|
|
20315
20416
|
constructor() {
|
|
20316
20417
|
this.el = inject(ElementRef);
|
|
@@ -20338,7 +20439,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
20338
20439
|
}] } });
|
|
20339
20440
|
|
|
20340
20441
|
var name = "geonetwork-ui";
|
|
20341
|
-
var version = "2.
|
|
20442
|
+
var version = "2.11.0-dev.1cf4ab0c6";
|
|
20342
20443
|
var engines = {
|
|
20343
20444
|
node: ">=24"
|
|
20344
20445
|
};
|
|
@@ -20359,6 +20460,7 @@ var peerDependencies = {
|
|
|
20359
20460
|
"@angular/core": "19.x || 20.x || 21.x",
|
|
20360
20461
|
"@angular/forms": "19.x || 20.x || 21.x",
|
|
20361
20462
|
"@angular/material": "19.x || 20.x || 21.x",
|
|
20463
|
+
"@angular/material-date-fns-adapter": "19.x || 20.x",
|
|
20362
20464
|
"@angular/platform-browser": "19.x || 20.x || 21.x",
|
|
20363
20465
|
"@angular/platform-browser-dynamic": "19.x || 20.x || 21.x",
|
|
20364
20466
|
"@angular/router": "19.x || 20.x || 21.x",
|
|
@@ -20377,11 +20479,12 @@ var peerDependencies = {
|
|
|
20377
20479
|
};
|
|
20378
20480
|
var dependencies = {
|
|
20379
20481
|
"@biesbjerg/ngx-translate-extract-marker": "~1.0.0",
|
|
20380
|
-
"@camptocamp/ogc-client": "1.3.1-dev.
|
|
20381
|
-
"@
|
|
20382
|
-
"@geospatial-sdk/
|
|
20383
|
-
"@geospatial-sdk/
|
|
20384
|
-
"@geospatial-sdk/
|
|
20482
|
+
"@camptocamp/ogc-client": "1.3.1-dev.200c02a",
|
|
20483
|
+
"@duckdb/duckdb-wasm": "~1.32.0",
|
|
20484
|
+
"@geospatial-sdk/core": "0.0.5-dev.78",
|
|
20485
|
+
"@geospatial-sdk/geocoding": "0.0.5-dev.78",
|
|
20486
|
+
"@geospatial-sdk/legend": "0.0.5-dev.78",
|
|
20487
|
+
"@geospatial-sdk/openlayers": "0.0.5-dev.78",
|
|
20385
20488
|
"@ltd/j-toml": "~1.38.0",
|
|
20386
20489
|
"@messageformat/core": "~3.4.0",
|
|
20387
20490
|
"@ng-icons/core": "~32.5.0",
|
|
@@ -20389,7 +20492,7 @@ var dependencies = {
|
|
|
20389
20492
|
"@ng-icons/material-icons": "~32.5.0",
|
|
20390
20493
|
"@ng-icons/tabler-icons": "~32.4.0",
|
|
20391
20494
|
"@rgrove/parse-xml": "4.2.0",
|
|
20392
|
-
|
|
20495
|
+
"apache-arrow": "~17.0.0",
|
|
20393
20496
|
"chart.js": "~4.5.1",
|
|
20394
20497
|
"chroma-js": "~3.2.0",
|
|
20395
20498
|
"date-fns": "4.1.0",
|
|
@@ -20402,7 +20505,6 @@ var dependencies = {
|
|
|
20402
20505
|
"ngx-dropzone": "~3.1.0",
|
|
20403
20506
|
"ngx-translate-messageformat-compiler": "~7.2.0",
|
|
20404
20507
|
ol: "~10.8.0",
|
|
20405
|
-
papaparse: "~5.5.3",
|
|
20406
20508
|
proj4: "~2.20.4",
|
|
20407
20509
|
rdflib: "~2.3.5",
|
|
20408
20510
|
semver: "~7.7.4",
|
|
@@ -20424,7 +20526,7 @@ var packageJson = {
|
|
|
20424
20526
|
|
|
20425
20527
|
const GEONETWORK_UI_VERSION = packageJson.version;
|
|
20426
20528
|
const GEONETWORK_UI_TAG_NAME = GEONETWORK_UI_VERSION.split('-')[1]?.startsWith('dev')
|
|
20427
|
-
? '
|
|
20529
|
+
? 'main'
|
|
20428
20530
|
: `v${packageJson.version}`;
|
|
20429
20531
|
|
|
20430
20532
|
const ValidatorMapper = {
|
|
@@ -20600,8 +20702,8 @@ class ElasticsearchService {
|
|
|
20600
20702
|
if (!payload.runtime_mappings)
|
|
20601
20703
|
payload.runtime_mappings = {};
|
|
20602
20704
|
payload.runtime_mappings[fieldName] = {
|
|
20603
|
-
type:
|
|
20604
|
-
script: this.runtimeFields[fieldName],
|
|
20705
|
+
type: this.runtimeFields[fieldName].type,
|
|
20706
|
+
script: this.runtimeFields[fieldName].script,
|
|
20605
20707
|
};
|
|
20606
20708
|
};
|
|
20607
20709
|
const lookForField = (node) => {
|
|
@@ -20621,6 +20723,12 @@ class ElasticsearchService {
|
|
|
20621
20723
|
(node[runtimeField] === 'asc' || node[runtimeField] === 'desc')) {
|
|
20622
20724
|
addMapping(runtimeField);
|
|
20623
20725
|
}
|
|
20726
|
+
if (runtimeField in node &&
|
|
20727
|
+
typeof node[runtimeField] === 'object' &&
|
|
20728
|
+
node[runtimeField] !== null &&
|
|
20729
|
+
('gte' in node[runtimeField] || 'lte' in node[runtimeField])) {
|
|
20730
|
+
addMapping(runtimeField);
|
|
20731
|
+
}
|
|
20624
20732
|
if ('query' in node &&
|
|
20625
20733
|
typeof node.query === 'string' &&
|
|
20626
20734
|
node.query.indexOf(runtimeField + ':') > -1) {
|
|
@@ -20637,8 +20745,8 @@ class ElasticsearchService {
|
|
|
20637
20745
|
lookForField(payload.query);
|
|
20638
20746
|
return payload;
|
|
20639
20747
|
}
|
|
20640
|
-
registerRuntimeField(fieldName, expression) {
|
|
20641
|
-
this.runtimeFields[fieldName] = expression;
|
|
20748
|
+
registerRuntimeField(fieldName, expression, type = 'keyword') {
|
|
20749
|
+
this.runtimeFields[fieldName] = { script: expression, type };
|
|
20642
20750
|
}
|
|
20643
20751
|
getMetadataByIdsPayload(uuids) {
|
|
20644
20752
|
return {
|
|
@@ -20647,6 +20755,7 @@ class ElasticsearchService {
|
|
|
20647
20755
|
values: uuids,
|
|
20648
20756
|
},
|
|
20649
20757
|
},
|
|
20758
|
+
size: uuids.length,
|
|
20650
20759
|
};
|
|
20651
20760
|
}
|
|
20652
20761
|
getRelatedRecordPayload(record, size = 6, _source = [...ES_SOURCE_SUMMARY, 'createDate']) {
|
|
@@ -20697,10 +20806,28 @@ class ElasticsearchService {
|
|
|
20697
20806
|
};
|
|
20698
20807
|
}
|
|
20699
20808
|
buildPayloadSort(sortBy) {
|
|
20700
|
-
if (sortBy ===
|
|
20809
|
+
if (!sortBy || sortBy.length === 0)
|
|
20701
20810
|
return undefined;
|
|
20702
|
-
const fields = Array.isArray(sortBy[0])
|
|
20703
|
-
|
|
20811
|
+
const fields = Array.isArray(sortBy[0])
|
|
20812
|
+
? sortBy
|
|
20813
|
+
: [sortBy];
|
|
20814
|
+
return fields.map((field) => {
|
|
20815
|
+
// Sort by nested array of dates only works with the explicit syntax
|
|
20816
|
+
if (field[1].endsWith('.date')) {
|
|
20817
|
+
const nestedPath = field[1].slice(0, field[1].lastIndexOf('.date'));
|
|
20818
|
+
return {
|
|
20819
|
+
[field[1]]: {
|
|
20820
|
+
order: field[0],
|
|
20821
|
+
mode: field[0] === 'desc' ? 'max' : 'min',
|
|
20822
|
+
missing: '_last',
|
|
20823
|
+
nested: {
|
|
20824
|
+
path: nestedPath,
|
|
20825
|
+
},
|
|
20826
|
+
},
|
|
20827
|
+
};
|
|
20828
|
+
}
|
|
20829
|
+
return { [field[1]]: field[0] };
|
|
20830
|
+
});
|
|
20704
20831
|
}
|
|
20705
20832
|
injectLangInQueryStringFields(queryFieldsPriority) {
|
|
20706
20833
|
const queryLang = this.getQueryLang();
|
|
@@ -20736,7 +20863,13 @@ class ElasticsearchService {
|
|
|
20736
20863
|
isCurrentSearchLang() {
|
|
20737
20864
|
return this.metadataLang === 'current';
|
|
20738
20865
|
}
|
|
20739
|
-
|
|
20866
|
+
findSpatialFilterExtent(filters) {
|
|
20867
|
+
if (typeof filters === 'string') {
|
|
20868
|
+
return undefined;
|
|
20869
|
+
}
|
|
20870
|
+
return Object.values(filters).find(isBoundingBox);
|
|
20871
|
+
}
|
|
20872
|
+
filtersToQuery(filters, spatialFilterExtent = this.findSpatialFilterExtent(filters)) {
|
|
20740
20873
|
const addQuote = (key) => (/^\/.+\/$/.test(key) ? key : `"${key}"`);
|
|
20741
20874
|
const makeQuery = (filter) => {
|
|
20742
20875
|
if (typeof filter === 'string') {
|
|
@@ -20755,7 +20888,9 @@ class ElasticsearchService {
|
|
|
20755
20888
|
? filters
|
|
20756
20889
|
: Object.keys(filters)
|
|
20757
20890
|
.filter((fieldname) => fieldname !== 'gn-ui-crossFieldFilter')
|
|
20891
|
+
.filter((fieldname) => !isBoundingBox(filters[fieldname]))
|
|
20758
20892
|
.filter((fieldname) => !isDateRange(filters[fieldname]))
|
|
20893
|
+
.filter((fieldname) => !Array.isArray(filters[fieldname]))
|
|
20759
20894
|
.filter((fieldname) => filters[fieldname] &&
|
|
20760
20895
|
JSON.stringify(filters[fieldname]) !== '{}')
|
|
20761
20896
|
.map((fieldname) => `${fieldname}:(${makeQuery(filters[fieldname])})`)
|
|
@@ -20763,33 +20898,36 @@ class ElasticsearchService {
|
|
|
20763
20898
|
if (filters['gn-ui-crossFieldFilter']) {
|
|
20764
20899
|
queryString = `${queryString} AND (${filters['gn-ui-crossFieldFilter']})`;
|
|
20765
20900
|
}
|
|
20766
|
-
const
|
|
20767
|
-
.filter(([, value]) => isDateRange(value))
|
|
20768
|
-
.map(([searchField, dateRange]) => {
|
|
20769
|
-
return {
|
|
20770
|
-
searchField,
|
|
20771
|
-
dateRange,
|
|
20772
|
-
};
|
|
20773
|
-
})[0];
|
|
20901
|
+
const queryRanges = Object.entries(filters).filter(([, value]) => isDateRange(value));
|
|
20774
20902
|
const queryParts = [
|
|
20775
20903
|
queryString && {
|
|
20776
20904
|
query_string: {
|
|
20777
20905
|
query: queryString,
|
|
20778
20906
|
},
|
|
20779
20907
|
},
|
|
20780
|
-
|
|
20781
|
-
queryRange.dateRange && {
|
|
20908
|
+
...queryRanges.map(([searchField, dateRange]) => ({
|
|
20782
20909
|
range: {
|
|
20783
|
-
[
|
|
20784
|
-
...(
|
|
20785
|
-
|
|
20786
|
-
}),
|
|
20787
|
-
...(queryRange.dateRange.end && {
|
|
20788
|
-
lte: formatDate(queryRange.dateRange.end),
|
|
20789
|
-
}),
|
|
20910
|
+
[searchField]: {
|
|
20911
|
+
...(dateRange.start && { gte: formatDate(dateRange.start) }),
|
|
20912
|
+
...(dateRange.end && { lte: formatDate(dateRange.end) }),
|
|
20790
20913
|
format: 'yyyy-MM-dd',
|
|
20791
20914
|
},
|
|
20792
20915
|
},
|
|
20916
|
+
})),
|
|
20917
|
+
spatialFilterExtent && {
|
|
20918
|
+
geo_shape: {
|
|
20919
|
+
geom: {
|
|
20920
|
+
shape: {
|
|
20921
|
+
type: 'envelope',
|
|
20922
|
+
// spatialFilterExtent is [minX, minY, maxX, maxY]; envelope coordinates are [top-left, bottom-right]
|
|
20923
|
+
coordinates: [
|
|
20924
|
+
[spatialFilterExtent[0], spatialFilterExtent[3]],
|
|
20925
|
+
[spatialFilterExtent[2], spatialFilterExtent[1]],
|
|
20926
|
+
],
|
|
20927
|
+
},
|
|
20928
|
+
relation: 'intersects',
|
|
20929
|
+
},
|
|
20930
|
+
},
|
|
20793
20931
|
},
|
|
20794
20932
|
].filter(Boolean);
|
|
20795
20933
|
return queryParts.length > 0 ? queryParts : undefined;
|
|
@@ -20817,7 +20955,9 @@ class ElasticsearchService {
|
|
|
20817
20955
|
},
|
|
20818
20956
|
});
|
|
20819
20957
|
}
|
|
20820
|
-
|
|
20958
|
+
// a spatial extent filter takes precedence over the preference geometry for boosting
|
|
20959
|
+
const spatialFilterExtent = this.findSpatialFilterExtent(fieldSearchFilters);
|
|
20960
|
+
const queryFilters = this.filtersToQuery(fieldSearchFilters, spatialFilterExtent);
|
|
20821
20961
|
if (queryFilters) {
|
|
20822
20962
|
filter.push(...queryFilters);
|
|
20823
20963
|
}
|
|
@@ -20828,7 +20968,10 @@ class ElasticsearchService {
|
|
|
20828
20968
|
},
|
|
20829
20969
|
});
|
|
20830
20970
|
}
|
|
20831
|
-
|
|
20971
|
+
const boostGeometry = spatialFilterExtent
|
|
20972
|
+
? bboxToPolygon(spatialFilterExtent)
|
|
20973
|
+
: geometry;
|
|
20974
|
+
if (boostGeometry) {
|
|
20832
20975
|
// boosts applied using the filter geometry:
|
|
20833
20976
|
// * records completely within the geometry receive a boost of 5
|
|
20834
20977
|
// * records intersecting the geometry receive a boost of 2
|
|
@@ -20837,7 +20980,7 @@ class ElasticsearchService {
|
|
|
20837
20980
|
should.push({
|
|
20838
20981
|
geo_shape: {
|
|
20839
20982
|
geom: {
|
|
20840
|
-
shape:
|
|
20983
|
+
shape: boostGeometry,
|
|
20841
20984
|
relation: 'within',
|
|
20842
20985
|
},
|
|
20843
20986
|
boost: 5.0,
|
|
@@ -20845,7 +20988,7 @@ class ElasticsearchService {
|
|
|
20845
20988
|
}, {
|
|
20846
20989
|
geo_shape: {
|
|
20847
20990
|
geom: {
|
|
20848
|
-
shape:
|
|
20991
|
+
shape: boostGeometry,
|
|
20849
20992
|
relation: 'intersects',
|
|
20850
20993
|
},
|
|
20851
20994
|
boost: 2.0,
|
|
@@ -20854,7 +20997,7 @@ class ElasticsearchService {
|
|
|
20854
20997
|
// this will boost the results variably depending on their distance from the given geometry
|
|
20855
20998
|
// note: this takes into account the `location` field of a record; this is generally the center of all spatial extents
|
|
20856
20999
|
// combined, and thus the actual size/coverage of the record spatial extent isn't relevant here
|
|
20857
|
-
const bbox = getGeometryBoundingBox(
|
|
21000
|
+
const bbox = getGeometryBoundingBox(boostGeometry);
|
|
20858
21001
|
const center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2];
|
|
20859
21002
|
const northToCenter = new LineString([
|
|
20860
21003
|
[center[0], bbox[3]],
|
|
@@ -21180,7 +21323,7 @@ class Gn4Repository {
|
|
|
21180
21323
|
}
|
|
21181
21324
|
getRecord(uniqueIdentifier) {
|
|
21182
21325
|
return this.gn4SearchApi
|
|
21183
|
-
.search('bucket', ['fcats', 'hassources'], JSON.stringify(this.gn4SearchHelper.getMetadataByIdsPayload([uniqueIdentifier])))
|
|
21326
|
+
.search('bucket', ['fcats', 'hassources', 'siblings', 'associated'], JSON.stringify(this.gn4SearchHelper.getMetadataByIdsPayload([uniqueIdentifier])))
|
|
21184
21327
|
.pipe(map$1((results) => results.hits.hits[0]), switchMap((record) => record ? this.gn4Mapper.readRecord(record) : of(null)));
|
|
21185
21328
|
}
|
|
21186
21329
|
getMultipleRecords(uniqueIdentifiers) {
|
|
@@ -21234,19 +21377,28 @@ class Gn4Repository {
|
|
|
21234
21377
|
.search('bucket', null, JSON.stringify(this.gn4SearchHelper.getRelatedRecordPayload(similarTo, 3)))
|
|
21235
21378
|
.pipe(switchMap((results) => this.gn4Mapper.readRecords(results.hits.hits)));
|
|
21236
21379
|
}
|
|
21237
|
-
|
|
21238
|
-
const
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21242
|
-
|
|
21243
|
-
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21380
|
+
getLinkedRecords(record) {
|
|
21381
|
+
const siblings = (record.extras?.['siblings'] ?? []);
|
|
21382
|
+
const relations = [
|
|
21383
|
+
['source', (record.extras?.['sourcesIdentifiers'] ?? [])],
|
|
21384
|
+
['sourceOf', (record.extras?.['sourceOfIdentifiers'] ?? [])],
|
|
21385
|
+
['sibling', siblings.map(({ uniqueIdentifier }) => uniqueIdentifier)],
|
|
21386
|
+
[
|
|
21387
|
+
'associated',
|
|
21388
|
+
(record.extras?.['associatedIdentifiers'] ?? []),
|
|
21389
|
+
],
|
|
21390
|
+
];
|
|
21391
|
+
const requested = relations.filter(([, identifiers]) => identifiers.length > 0);
|
|
21392
|
+
if (requested.length === 0) {
|
|
21393
|
+
return of([]);
|
|
21248
21394
|
}
|
|
21249
|
-
return
|
|
21395
|
+
return forkJoin(requested.map(([relation, identifiers]) => this.getMultipleRecords(identifiers).pipe(map$1((records) => (records ?? []).map((record) => ({
|
|
21396
|
+
record,
|
|
21397
|
+
relation,
|
|
21398
|
+
associationType: relation === 'sibling'
|
|
21399
|
+
? siblings.find(({ uniqueIdentifier }) => uniqueIdentifier === record.uniqueIdentifier)?.associationType
|
|
21400
|
+
: undefined,
|
|
21401
|
+
}))), catchError(() => of([]))))).pipe(map$1((groups) => groups.flat()));
|
|
21250
21402
|
}
|
|
21251
21403
|
aggregate(params) {
|
|
21252
21404
|
// if aggregations are empty, return an empty object right away
|
|
@@ -23225,6 +23377,7 @@ function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
|
23225
23377
|
'search_preset',
|
|
23226
23378
|
'advanced_filters',
|
|
23227
23379
|
'limit',
|
|
23380
|
+
'spatial_extent_max_file_size',
|
|
23228
23381
|
], warnings, errors);
|
|
23229
23382
|
const parsedSearchParams = parseMultiConfigSection(parsed, 'search_preset', ['name'], ['sort', 'filters'], warnings, errors);
|
|
23230
23383
|
searchConfig =
|
|
@@ -23242,6 +23395,7 @@ function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
|
23242
23395
|
})),
|
|
23243
23396
|
ADVANCED_FILTERS: parsedSearchSection.advanced_filters,
|
|
23244
23397
|
LIMIT: parsedSearchSection.limit,
|
|
23398
|
+
SPATIAL_EXTENT_MAX_FILE_SIZE: parsedSearchSection.spatial_extent_max_file_size,
|
|
23245
23399
|
};
|
|
23246
23400
|
const parsedMetadataQualitySection = parseConfigSection(parsed, 'metadata-quality', [], ['enabled'], warnings, errors);
|
|
23247
23401
|
metadataQualityConfig =
|
|
@@ -24499,12 +24653,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
24499
24653
|
type: Input
|
|
24500
24654
|
}] } });
|
|
24501
24655
|
|
|
24656
|
+
function provideLocalizedDateAdapter() {
|
|
24657
|
+
return [
|
|
24658
|
+
{ provide: MAT_DATE_LOCALE, useValue: enUS },
|
|
24659
|
+
{ provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS },
|
|
24660
|
+
{
|
|
24661
|
+
provide: DateAdapter,
|
|
24662
|
+
useFactory: () => {
|
|
24663
|
+
const dateService = inject(DateService);
|
|
24664
|
+
const adapter = new DateFnsAdapter();
|
|
24665
|
+
dateService
|
|
24666
|
+
.getDateFnsLocale()
|
|
24667
|
+
.then((locale) => adapter.setLocale(locale));
|
|
24668
|
+
return adapter;
|
|
24669
|
+
},
|
|
24670
|
+
},
|
|
24671
|
+
];
|
|
24672
|
+
}
|
|
24673
|
+
|
|
24502
24674
|
class DatePickerComponent {
|
|
24503
24675
|
constructor() {
|
|
24504
|
-
this.dateAdapter = inject(DateAdapter);
|
|
24505
|
-
this.translate = inject(TranslateService);
|
|
24506
24676
|
this.dateChange = new EventEmitter();
|
|
24507
|
-
this.dateAdapter.setLocale(this.translate.getCurrentLang());
|
|
24508
24677
|
}
|
|
24509
24678
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24510
24679
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: DatePickerComponent, isStandalone: true, selector: "gn-ui-date-picker", inputs: { date: "date" }, outputs: { dateChange: "dateChange" }, providers: [
|
|
@@ -24512,30 +24681,19 @@ class DatePickerComponent {
|
|
|
24512
24681
|
provideNgIconsConfig({
|
|
24513
24682
|
size: '1.5rem',
|
|
24514
24683
|
}),
|
|
24515
|
-
|
|
24516
|
-
|
|
24517
|
-
useFactory: (locale) => locale,
|
|
24518
|
-
},
|
|
24519
|
-
], ngImport: i0, template: "<span class=\"w-full inline-block relative\">\n <input\n class=\"gn-ui-text-input pr-[var(--text-padding)]\"\n [matDatepicker]=\"picker\"\n [value]=\"date\"\n (dateChange)=\"dateChange.emit($event.value)\"\n />\n <gn-ui-button\n type=\"light\"\n class=\"absolute inset-y-[var(--side-padding)] right-[var(--side-padding)] z-10\"\n (buttonClick)=\"picker.open()\"\n data-cy=\"date-picker-button\"\n extraClass=\"h-full\"\n >\n <ng-icon name=\"iconoirCalendar\" class=\"text-primary\"></ng-icon>\n </gn-ui-button>\n</span>\n<mat-datepicker #picker></mat-datepicker>\n", styles: [":host{--gn-ui-button-rounded: 8px;--gn-ui-button-width: 32px;--gn-ui-button-padding: 0;--side-padding: calc(var(--gn-ui-text-input-padding, .6em) - 6px);--text-padding: calc(var(--side-padding) + 40px)}\n"], dependencies: [{ kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1$6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1$6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24684
|
+
provideLocalizedDateAdapter(),
|
|
24685
|
+
], ngImport: i0, template: "<span class=\"w-full inline-block relative\">\n <input\n class=\"gn-ui-text-input pr-[var(--text-padding)]\"\n [matDatepicker]=\"picker\"\n [value]=\"date\"\n (dateChange)=\"dateChange.emit($event.value)\"\n />\n <gn-ui-button\n type=\"light\"\n class=\"absolute inset-y-[var(--side-padding)] right-[var(--side-padding)] z-10\"\n (buttonClick)=\"picker.open()\"\n data-cy=\"date-picker-button\"\n extraClass=\"h-full\"\n >\n <ng-icon name=\"iconoirCalendar\" class=\"text-primary\"></ng-icon>\n </gn-ui-button>\n</span>\n<mat-datepicker #picker></mat-datepicker>\n", styles: [":host{--gn-ui-button-rounded: 8px;--gn-ui-button-width: 32px;--gn-ui-button-padding: 0;--side-padding: calc(var(--gn-ui-text-input-padding, .6em) - 6px);--text-padding: calc(var(--side-padding) + 40px)}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1$6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1$6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24520
24686
|
}
|
|
24521
24687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
24522
24688
|
type: Component,
|
|
24523
|
-
args: [{ selector: 'gn-ui-date-picker', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
24524
|
-
MatNativeDateModule,
|
|
24525
|
-
MatDatepickerModule,
|
|
24526
|
-
ButtonComponent,
|
|
24527
|
-
NgIconComponent,
|
|
24528
|
-
], providers: [
|
|
24689
|
+
args: [{ selector: 'gn-ui-date-picker', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatDatepickerModule, ButtonComponent, NgIconComponent], providers: [
|
|
24529
24690
|
provideIcons({ iconoirCalendar }),
|
|
24530
24691
|
provideNgIconsConfig({
|
|
24531
24692
|
size: '1.5rem',
|
|
24532
24693
|
}),
|
|
24533
|
-
|
|
24534
|
-
provide: MAT_DATE_LOCALE,
|
|
24535
|
-
useFactory: (locale) => locale,
|
|
24536
|
-
},
|
|
24694
|
+
provideLocalizedDateAdapter(),
|
|
24537
24695
|
], template: "<span class=\"w-full inline-block relative\">\n <input\n class=\"gn-ui-text-input pr-[var(--text-padding)]\"\n [matDatepicker]=\"picker\"\n [value]=\"date\"\n (dateChange)=\"dateChange.emit($event.value)\"\n />\n <gn-ui-button\n type=\"light\"\n class=\"absolute inset-y-[var(--side-padding)] right-[var(--side-padding)] z-10\"\n (buttonClick)=\"picker.open()\"\n data-cy=\"date-picker-button\"\n extraClass=\"h-full\"\n >\n <ng-icon name=\"iconoirCalendar\" class=\"text-primary\"></ng-icon>\n </gn-ui-button>\n</span>\n<mat-datepicker #picker></mat-datepicker>\n", styles: [":host{--gn-ui-button-rounded: 8px;--gn-ui-button-width: 32px;--gn-ui-button-padding: 0;--side-padding: calc(var(--gn-ui-text-input-padding, .6em) - 6px);--text-padding: calc(var(--side-padding) + 40px)}\n"] }]
|
|
24538
|
-
}],
|
|
24696
|
+
}], propDecorators: { date: [{
|
|
24539
24697
|
type: Input
|
|
24540
24698
|
}], dateChange: [{
|
|
24541
24699
|
type: Output
|
|
@@ -24543,58 +24701,159 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
24543
24701
|
|
|
24544
24702
|
class DateRangeDropdownComponent {
|
|
24545
24703
|
constructor() {
|
|
24546
|
-
this.
|
|
24704
|
+
this.scrollStrategies = inject(ScrollStrategyOptions);
|
|
24705
|
+
this.dateAdapter = inject(DateAdapter);
|
|
24706
|
+
this.dateFormats = inject(MAT_DATE_FORMATS);
|
|
24547
24707
|
this.cdr = inject(ChangeDetectorRef);
|
|
24548
|
-
this.
|
|
24549
|
-
this.
|
|
24550
|
-
this.
|
|
24708
|
+
this.dateRange = {};
|
|
24709
|
+
this.dateRangeChange = new EventEmitter();
|
|
24710
|
+
this.overlayPositions = [
|
|
24711
|
+
{
|
|
24712
|
+
originX: 'start',
|
|
24713
|
+
originY: 'bottom',
|
|
24714
|
+
overlayX: 'start',
|
|
24715
|
+
overlayY: 'top',
|
|
24716
|
+
offsetY: 8,
|
|
24717
|
+
},
|
|
24718
|
+
{
|
|
24719
|
+
originX: 'start',
|
|
24720
|
+
originY: 'top',
|
|
24721
|
+
overlayX: 'start',
|
|
24722
|
+
overlayY: 'bottom',
|
|
24723
|
+
offsetY: -8,
|
|
24724
|
+
},
|
|
24725
|
+
];
|
|
24726
|
+
this.scrollStrategy = this.scrollStrategies.reposition();
|
|
24727
|
+
this.overlayOpen = false;
|
|
24728
|
+
this.expandedBound = 'start';
|
|
24729
|
+
this.invalidBounds = { start: false, end: false };
|
|
24730
|
+
// redraw when the lazily loaded UI locale reaches the adapter
|
|
24731
|
+
this.dateAdapter.localeChanges
|
|
24732
|
+
.pipe(takeUntilDestroyed())
|
|
24733
|
+
.subscribe(() => this.cdr.markForCheck());
|
|
24551
24734
|
}
|
|
24552
|
-
|
|
24553
|
-
this.
|
|
24735
|
+
get startDate() {
|
|
24736
|
+
return this.dateRange.start;
|
|
24554
24737
|
}
|
|
24555
|
-
|
|
24556
|
-
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
|
|
24560
|
-
|
|
24561
|
-
|
|
24562
|
-
|
|
24738
|
+
get endDate() {
|
|
24739
|
+
return this.dateRange.end;
|
|
24740
|
+
}
|
|
24741
|
+
get selectedDatesCount() {
|
|
24742
|
+
return (this.startDate ? 1 : 0) + (this.endDate ? 1 : 0);
|
|
24743
|
+
}
|
|
24744
|
+
openOverlay() {
|
|
24745
|
+
this.expandedBound = 'start';
|
|
24746
|
+
this.overlayOpen = true;
|
|
24747
|
+
}
|
|
24748
|
+
closeOverlay() {
|
|
24749
|
+
this.overlayOpen = false;
|
|
24750
|
+
}
|
|
24751
|
+
toggleBound(bound) {
|
|
24752
|
+
this.expandedBound = this.expandedBound === bound ? null : bound;
|
|
24753
|
+
}
|
|
24754
|
+
formatDate(date) {
|
|
24755
|
+
return this.dateAdapter.format(date, this.dateFormats.display.dateInput);
|
|
24756
|
+
}
|
|
24757
|
+
onDateInput(bound, event) {
|
|
24758
|
+
const typedText = event.target.value.trim();
|
|
24759
|
+
const date = typedText
|
|
24760
|
+
? this.dateAdapter.parse(typedText, this.dateFormats.parse.dateInput)
|
|
24761
|
+
: null;
|
|
24762
|
+
if (!this.isAcceptable(bound, typedText, date)) {
|
|
24763
|
+
// keep the text as typed and flag it; the filter stays on its last value
|
|
24764
|
+
this.invalidBounds = { ...this.invalidBounds, [bound]: true };
|
|
24765
|
+
return;
|
|
24766
|
+
}
|
|
24767
|
+
if (bound === 'start')
|
|
24768
|
+
this.setStartDate(date);
|
|
24769
|
+
else
|
|
24770
|
+
this.setEndDate(date);
|
|
24771
|
+
}
|
|
24772
|
+
normalizeDateInput(bound, event) {
|
|
24773
|
+
if (this.invalidBounds[bound])
|
|
24774
|
+
return;
|
|
24775
|
+
const date = bound === 'start' ? this.startDate : this.endDate;
|
|
24776
|
+
const input = event.target;
|
|
24777
|
+
input.value = date ? this.formatDate(date) : '';
|
|
24778
|
+
}
|
|
24779
|
+
isAcceptable(bound, typedText, date) {
|
|
24780
|
+
if (!typedText)
|
|
24781
|
+
return true;
|
|
24782
|
+
if (!date || !this.dateAdapter.isValid(date))
|
|
24783
|
+
return false;
|
|
24784
|
+
return bound === 'start'
|
|
24785
|
+
? !this.endDate || date <= this.endDate
|
|
24786
|
+
: !this.startDate || date >= this.startDate;
|
|
24787
|
+
}
|
|
24788
|
+
setStartDate(date) {
|
|
24789
|
+
this.invalidBounds = { ...this.invalidBounds, start: false };
|
|
24790
|
+
this.applyDateRange({ ...this.dateRange, start: date });
|
|
24791
|
+
this.expandedBound = 'end';
|
|
24792
|
+
}
|
|
24793
|
+
setEndDate(date) {
|
|
24794
|
+
this.invalidBounds = { ...this.invalidBounds, end: false };
|
|
24795
|
+
this.applyDateRange({ ...this.dateRange, end: date });
|
|
24796
|
+
this.expandedBound = null;
|
|
24797
|
+
}
|
|
24798
|
+
clearDates(event) {
|
|
24799
|
+
this.invalidBounds = { start: false, end: false };
|
|
24800
|
+
this.expandedBound = 'start';
|
|
24801
|
+
this.applyDateRange({});
|
|
24802
|
+
propagateToDocumentOnly(event);
|
|
24803
|
+
}
|
|
24804
|
+
applyDateRange(dateRange) {
|
|
24805
|
+
this.dateRange = {
|
|
24806
|
+
...(dateRange.start && { start: dateRange.start }),
|
|
24807
|
+
...(dateRange.end && { end: dateRange.end }),
|
|
24808
|
+
};
|
|
24809
|
+
this.dateRangeChange.emit(this.dateRange);
|
|
24563
24810
|
}
|
|
24564
24811
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DateRangeDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24565
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
24812
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DateRangeDropdownComponent, isStandalone: true, selector: "gn-ui-date-range-dropdown", inputs: { title: "title", dateRange: "dateRange" }, outputs: { dateRangeChange: "dateRangeChange" }, providers: [
|
|
24566
24813
|
provideIcons({
|
|
24567
|
-
|
|
24814
|
+
iconoirCalendar,
|
|
24815
|
+
matClose,
|
|
24568
24816
|
matExpandLess,
|
|
24817
|
+
matExpandMore,
|
|
24818
|
+
}),
|
|
24819
|
+
provideNgIconsConfig({
|
|
24820
|
+
size: '1.5rem',
|
|
24569
24821
|
}),
|
|
24570
|
-
|
|
24822
|
+
provideLocalizedDateAdapter(),
|
|
24823
|
+
], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: ["overlayOrigin"], 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)=\"openOverlay()\"\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 (selectedDatesCount) {\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 {{ selectedDatesCount }}\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 (selectedDatesCount && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"clearDates($event)\"\n name=\"matClose\"\n ></ng-icon>\n }\n </button>\n <ng-icon\n data-test=\"dropdown-toggle\"\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 (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div\n class=\"w-[296px] flex flex-col gap-2 bg-white border border-gray-400 rounded px-4 py-3 shadow-lg text-main text-[16px] leading-[24px]\"\n data-test=\"date-range-panel\"\n >\n <div class=\"flex flex-col justify-center border-b border-gray-300 pb-1\">\n <ng-container\n [ngTemplateOutlet]=\"boundRow\"\n [ngTemplateOutletContext]=\"{\n bound: 'start',\n label: 'daterange.filter.from',\n date: startDate,\n }\"\n ></ng-container>\n @if (expandedBound === 'start') {\n <div class=\"calendar\" animate.enter=\"expand\" animate.leave=\"collapse\">\n <mat-calendar\n data-test=\"start-date-calendar\"\n [selected]=\"startDate\"\n [startAt]=\"startDate ?? endDate\"\n [maxDate]=\"endDate\"\n (selectedChange)=\"setStartDate($event)\"\n ></mat-calendar>\n </div>\n }\n </div>\n <div class=\"flex flex-col justify-center\">\n <ng-container\n [ngTemplateOutlet]=\"boundRow\"\n [ngTemplateOutletContext]=\"{\n bound: 'end',\n label: 'daterange.filter.to',\n date: endDate,\n }\"\n ></ng-container>\n @if (expandedBound === 'end') {\n <div class=\"calendar\" animate.enter=\"expand\" animate.leave=\"collapse\">\n <mat-calendar\n data-test=\"end-date-calendar\"\n [selected]=\"endDate\"\n [startAt]=\"endDate ?? startDate\"\n [minDate]=\"startDate\"\n (selectedChange)=\"setEndDate($event)\"\n ></mat-calendar>\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<ng-template #boundRow let-bound=\"bound\" let-label=\"label\" let-date=\"date\">\n <div class=\"flex items-center gap-1 w-full\">\n <span class=\"w-[80px] shrink-0\" [translate]=\"label\"></span>\n <div\n class=\"flex-1 min-w-0 flex items-center gap-1 border rounded-lg px-2 py-1 transition-colors\"\n [class]=\"\n invalidBounds[bound]\n ? 'border-red-400 text-red-800 focus-within:border-red-800 hover:border-red-800'\n : 'border-gray-400 focus-within:border-main hover:border-main'\n \"\n >\n <ng-icon\n name=\"iconoirCalendar\"\n class=\"shrink-0\"\n aria-hidden=\"true\"\n ></ng-icon>\n <input\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [gnUiAutofocus]=\"bound === expandedBound\"\n class=\"min-w-0 grow bg-transparent focus:outline-none\"\n [value]=\"date ? formatDate(date) : ''\"\n [placeholder]=\"'daterange.filter.datePlaceholder' | translate\"\n [attr.aria-label]=\"label | translate\"\n [attr.aria-invalid]=\"invalidBounds[bound] || null\"\n [attr.data-test]=\"bound + '-date-input'\"\n (change)=\"onDateInput(bound, $event)\"\n (blur)=\"normalizeDateInput(bound, $event)\"\n (click)=\"expandedBound !== bound && toggleBound(bound)\"\n />\n </div>\n <div class=\"shrink-0 flex items-center justify-end\">\n <gn-ui-button\n type=\"light\"\n [style.--gn-ui-button-padding]=\"0\"\n [style.--gn-ui-button-width]=\"'24px'\"\n [style.--gn-ui-button-height]=\"'24px'\"\n [attr.aria-expanded]=\"expandedBound === bound\"\n [attr.data-test]=\"bound + '-date-toggle'\"\n (buttonClick)=\"toggleBound(bound)\"\n >\n <ng-icon\n [name]=\"expandedBound === bound ? 'matExpandLess' : 'matExpandMore'\"\n ></ng-icon>\n </gn-ui-button>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-calendar{width:100%}.calendar{display:grid;grid-template-rows:1fr}.calendar>mat-calendar{min-height:0;overflow:hidden}.calendar.expand{animation:open .2s ease-out}.calendar.collapse{animation:open .2s ease-in reverse}@keyframes open{0%{grid-template-rows:0fr;opacity:0}to{grid-template-rows:1fr;opacity:1}}@media (prefers-reduced-motion: reduce){.calendar.expand,.calendar.collapse{animation-duration:1ms}}\n"], dependencies: [{ kind: "directive", type: AutofocusDirective, selector: "[gnUiAutofocus]", inputs: ["gnUiAutofocus"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1$6.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24571
24824
|
}
|
|
24572
24825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DateRangeDropdownComponent, decorators: [{
|
|
24573
24826
|
type: Component,
|
|
24574
24827
|
args: [{ selector: 'gn-ui-date-range-dropdown', standalone: true, imports: [
|
|
24575
|
-
|
|
24576
|
-
MatNativeDateModule,
|
|
24577
|
-
MatDatepickerModule,
|
|
24828
|
+
AutofocusDirective,
|
|
24578
24829
|
ButtonComponent,
|
|
24830
|
+
MatDatepickerModule,
|
|
24831
|
+
NgIcon,
|
|
24832
|
+
NgTemplateOutlet,
|
|
24833
|
+
OverlayModule,
|
|
24834
|
+
TranslateDirective,
|
|
24835
|
+
TranslatePipe,
|
|
24579
24836
|
], providers: [
|
|
24580
24837
|
provideIcons({
|
|
24581
|
-
|
|
24838
|
+
iconoirCalendar,
|
|
24839
|
+
matClose,
|
|
24582
24840
|
matExpandLess,
|
|
24841
|
+
matExpandMore,
|
|
24583
24842
|
}),
|
|
24584
|
-
|
|
24585
|
-
|
|
24586
|
-
|
|
24587
|
-
|
|
24843
|
+
provideNgIconsConfig({
|
|
24844
|
+
size: '1.5rem',
|
|
24845
|
+
}),
|
|
24846
|
+
provideLocalizedDateAdapter(),
|
|
24847
|
+
], 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)=\"openOverlay()\"\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 (selectedDatesCount) {\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 {{ selectedDatesCount }}\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 (selectedDatesCount && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"clearDates($event)\"\n name=\"matClose\"\n ></ng-icon>\n }\n </button>\n <ng-icon\n data-test=\"dropdown-toggle\"\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 (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div\n class=\"w-[296px] flex flex-col gap-2 bg-white border border-gray-400 rounded px-4 py-3 shadow-lg text-main text-[16px] leading-[24px]\"\n data-test=\"date-range-panel\"\n >\n <div class=\"flex flex-col justify-center border-b border-gray-300 pb-1\">\n <ng-container\n [ngTemplateOutlet]=\"boundRow\"\n [ngTemplateOutletContext]=\"{\n bound: 'start',\n label: 'daterange.filter.from',\n date: startDate,\n }\"\n ></ng-container>\n @if (expandedBound === 'start') {\n <div class=\"calendar\" animate.enter=\"expand\" animate.leave=\"collapse\">\n <mat-calendar\n data-test=\"start-date-calendar\"\n [selected]=\"startDate\"\n [startAt]=\"startDate ?? endDate\"\n [maxDate]=\"endDate\"\n (selectedChange)=\"setStartDate($event)\"\n ></mat-calendar>\n </div>\n }\n </div>\n <div class=\"flex flex-col justify-center\">\n <ng-container\n [ngTemplateOutlet]=\"boundRow\"\n [ngTemplateOutletContext]=\"{\n bound: 'end',\n label: 'daterange.filter.to',\n date: endDate,\n }\"\n ></ng-container>\n @if (expandedBound === 'end') {\n <div class=\"calendar\" animate.enter=\"expand\" animate.leave=\"collapse\">\n <mat-calendar\n data-test=\"end-date-calendar\"\n [selected]=\"endDate\"\n [startAt]=\"endDate ?? startDate\"\n [minDate]=\"startDate\"\n (selectedChange)=\"setEndDate($event)\"\n ></mat-calendar>\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<ng-template #boundRow let-bound=\"bound\" let-label=\"label\" let-date=\"date\">\n <div class=\"flex items-center gap-1 w-full\">\n <span class=\"w-[80px] shrink-0\" [translate]=\"label\"></span>\n <div\n class=\"flex-1 min-w-0 flex items-center gap-1 border rounded-lg px-2 py-1 transition-colors\"\n [class]=\"\n invalidBounds[bound]\n ? 'border-red-400 text-red-800 focus-within:border-red-800 hover:border-red-800'\n : 'border-gray-400 focus-within:border-main hover:border-main'\n \"\n >\n <ng-icon\n name=\"iconoirCalendar\"\n class=\"shrink-0\"\n aria-hidden=\"true\"\n ></ng-icon>\n <input\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [gnUiAutofocus]=\"bound === expandedBound\"\n class=\"min-w-0 grow bg-transparent focus:outline-none\"\n [value]=\"date ? formatDate(date) : ''\"\n [placeholder]=\"'daterange.filter.datePlaceholder' | translate\"\n [attr.aria-label]=\"label | translate\"\n [attr.aria-invalid]=\"invalidBounds[bound] || null\"\n [attr.data-test]=\"bound + '-date-input'\"\n (change)=\"onDateInput(bound, $event)\"\n (blur)=\"normalizeDateInput(bound, $event)\"\n (click)=\"expandedBound !== bound && toggleBound(bound)\"\n />\n </div>\n <div class=\"shrink-0 flex items-center justify-end\">\n <gn-ui-button\n type=\"light\"\n [style.--gn-ui-button-padding]=\"0\"\n [style.--gn-ui-button-width]=\"'24px'\"\n [style.--gn-ui-button-height]=\"'24px'\"\n [attr.aria-expanded]=\"expandedBound === bound\"\n [attr.data-test]=\"bound + '-date-toggle'\"\n (buttonClick)=\"toggleBound(bound)\"\n >\n <ng-icon\n [name]=\"expandedBound === bound ? 'matExpandLess' : 'matExpandMore'\"\n ></ng-icon>\n </gn-ui-button>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-calendar{width:100%}.calendar{display:grid;grid-template-rows:1fr}.calendar>mat-calendar{min-height:0;overflow:hidden}.calendar.expand{animation:open .2s ease-out}.calendar.collapse{animation:open .2s ease-in reverse}@keyframes open{0%{grid-template-rows:0fr;opacity:0}to{grid-template-rows:1fr;opacity:1}}@media (prefers-reduced-motion: reduce){.calendar.expand,.calendar.collapse{animation-duration:1ms}}\n"] }]
|
|
24848
|
+
}], ctorParameters: () => [], propDecorators: { title: [{
|
|
24588
24849
|
type: Input
|
|
24589
|
-
}],
|
|
24850
|
+
}], dateRange: [{
|
|
24590
24851
|
type: Input
|
|
24591
|
-
}],
|
|
24592
|
-
type: Output
|
|
24593
|
-
}], endDateChange: [{
|
|
24852
|
+
}], dateRangeChange: [{
|
|
24594
24853
|
type: Output
|
|
24595
|
-
}],
|
|
24854
|
+
}], overlayOrigin: [{
|
|
24596
24855
|
type: ViewChild,
|
|
24597
|
-
args: ['
|
|
24856
|
+
args: ['overlayOrigin']
|
|
24598
24857
|
}] } });
|
|
24599
24858
|
|
|
24600
24859
|
class DateRangePickerComponent {
|
|
@@ -24608,20 +24867,17 @@ class DateRangePickerComponent {
|
|
|
24608
24867
|
provideNgIconsConfig({
|
|
24609
24868
|
size: '1.5rem',
|
|
24610
24869
|
}),
|
|
24611
|
-
|
|
24870
|
+
provideLocalizedDateAdapter(),
|
|
24871
|
+
], ngImport: i0, template: "<span class=\"w-full inline-block relative\">\n <mat-date-range-input [rangePicker]=\"picker\" class=\"gn-ui-text-input\">\n <input\n matStartDate\n placeholder=\"Start date\"\n [value]=\"startDate\"\n (dateInput)=\"startDateChange.emit($event.value)\"\n />\n <input\n matEndDate\n placeholder=\"End date\"\n [value]=\"endDate\"\n (dateInput)=\"endDateChange.emit($event.value)\"\n />\n </mat-date-range-input>\n\n <gn-ui-button\n type=\"light\"\n class=\"absolute inset-y-[var(--side-padding)] right-[var(--side-padding)] z-10\"\n (buttonClick)=\"picker.open()\"\n extraClass=\"h-full\"\n data-cy=\"date-picker-button\"\n >\n <ng-icon name=\"iconoirCalendar\" class=\"text-primary\"></ng-icon>\n </gn-ui-button>\n</span>\n<mat-date-range-picker #picker></mat-date-range-picker>\n", styles: [":host{--gn-ui-button-rounded: 8px;--gn-ui-button-width: 32px;--gn-ui-button-padding: 0;--side-padding: calc(var(--gn-ui-text-input-padding, .6em) - 6px);--text-padding: calc(var(--side-padding) + 40px)}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1$6.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i1$6.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i1$6.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i1$6.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24612
24872
|
}
|
|
24613
24873
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DateRangePickerComponent, decorators: [{
|
|
24614
24874
|
type: Component,
|
|
24615
|
-
args: [{ selector: 'gn-ui-date-range-picker', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
24616
|
-
MatNativeDateModule,
|
|
24617
|
-
MatDatepickerModule,
|
|
24618
|
-
ButtonComponent,
|
|
24619
|
-
NgIconComponent,
|
|
24620
|
-
], providers: [
|
|
24875
|
+
args: [{ selector: 'gn-ui-date-range-picker', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatDatepickerModule, ButtonComponent, NgIconComponent], providers: [
|
|
24621
24876
|
provideIcons({ iconoirCalendar }),
|
|
24622
24877
|
provideNgIconsConfig({
|
|
24623
24878
|
size: '1.5rem',
|
|
24624
24879
|
}),
|
|
24880
|
+
provideLocalizedDateAdapter(),
|
|
24625
24881
|
], template: "<span class=\"w-full inline-block relative\">\n <mat-date-range-input [rangePicker]=\"picker\" class=\"gn-ui-text-input\">\n <input\n matStartDate\n placeholder=\"Start date\"\n [value]=\"startDate\"\n (dateInput)=\"startDateChange.emit($event.value)\"\n />\n <input\n matEndDate\n placeholder=\"End date\"\n [value]=\"endDate\"\n (dateInput)=\"endDateChange.emit($event.value)\"\n />\n </mat-date-range-input>\n\n <gn-ui-button\n type=\"light\"\n class=\"absolute inset-y-[var(--side-padding)] right-[var(--side-padding)] z-10\"\n (buttonClick)=\"picker.open()\"\n extraClass=\"h-full\"\n data-cy=\"date-picker-button\"\n >\n <ng-icon name=\"iconoirCalendar\" class=\"text-primary\"></ng-icon>\n </gn-ui-button>\n</span>\n<mat-date-range-picker #picker></mat-date-range-picker>\n", styles: [":host{--gn-ui-button-rounded: 8px;--gn-ui-button-width: 32px;--gn-ui-button-padding: 0;--side-padding: calc(var(--gn-ui-text-input-padding, .6em) - 6px);--text-padding: calc(var(--side-padding) + 40px)}\n"] }]
|
|
24626
24882
|
}], propDecorators: { startDate: [{
|
|
24627
24883
|
type: Input
|
|
@@ -24639,28 +24895,68 @@ class DragAndDropFileInputComponent {
|
|
|
24639
24895
|
constructor() {
|
|
24640
24896
|
this.placeholder = placeholder;
|
|
24641
24897
|
this.accept = '*';
|
|
24898
|
+
this.maxFileSizeMb = null;
|
|
24899
|
+
this.icon = null;
|
|
24900
|
+
this.dropzoneBackgroundColor = null;
|
|
24901
|
+
this.textClass = '';
|
|
24902
|
+
this.extraClass = '';
|
|
24903
|
+
this.showFileName = true;
|
|
24642
24904
|
this.fileChange = new EventEmitter();
|
|
24905
|
+
this.errorChange = new EventEmitter();
|
|
24643
24906
|
this.selectedFile = null;
|
|
24644
24907
|
}
|
|
24645
24908
|
get fileName() {
|
|
24646
24909
|
return this.selectedFile && this.selectedFile.name;
|
|
24647
24910
|
}
|
|
24911
|
+
get maxFileSizeBytes() {
|
|
24912
|
+
return typeof this.maxFileSizeMb === 'number'
|
|
24913
|
+
? megabytesToBytes(this.maxFileSizeMb)
|
|
24914
|
+
: null;
|
|
24915
|
+
}
|
|
24648
24916
|
selectFile(event) {
|
|
24917
|
+
if (event.rejectedFiles?.length) {
|
|
24918
|
+
const reason = event.rejectedFiles[0].reason;
|
|
24919
|
+
this.errorChange.emit(reason === 'size' ? 'file-too-large' : 'invalid-extension');
|
|
24920
|
+
return;
|
|
24921
|
+
}
|
|
24649
24922
|
this.selectedFile = event.addedFiles[0];
|
|
24650
24923
|
this.fileChange.emit(this.selectedFile);
|
|
24651
24924
|
}
|
|
24925
|
+
openFileSelector() {
|
|
24926
|
+
this.dropzone.showFileSelector();
|
|
24927
|
+
}
|
|
24928
|
+
clear() {
|
|
24929
|
+
this.selectedFile = null;
|
|
24930
|
+
}
|
|
24652
24931
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DragAndDropFileInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24653
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DragAndDropFileInputComponent, isStandalone: true, selector: "gn-ui-drag-and-drop-file-input", inputs: { placeholder: "placeholder", accept: "accept" }, outputs: { fileChange: "fileChange" }, ngImport: i0, template: "<div
|
|
24932
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DragAndDropFileInputComponent, isStandalone: true, selector: "gn-ui-drag-and-drop-file-input", inputs: { placeholder: "placeholder", accept: "accept", maxFileSizeMb: "maxFileSizeMb", icon: "icon", dropzoneBackgroundColor: "dropzoneBackgroundColor", textClass: "textClass", extraClass: "extraClass", showFileName: "showFileName" }, outputs: { fileChange: "fileChange", errorChange: "errorChange" }, viewQueries: [{ propertyName: "dropzone", first: true, predicate: NgxDropzoneComponent, descendants: true }], ngImport: i0, template: "<div\n class=\"flex h-full items-center\"\n [class]=\"extraClass\"\n (click)=\"openFileSelector()\"\n>\n <ngx-dropzone\n class=\"flex-1 overflow-hidden\"\n [multiple]=\"false\"\n [disableClick]=\"true\"\n [accept]=\"accept\"\n [maxFileSize]=\"maxFileSizeBytes\"\n [style.background-color]=\"dropzoneBackgroundColor\"\n (change)=\"selectFile($event)\"\n >\n @if (!fileName || !showFileName) {\n <div [class]=\"textClass\">\n {{ placeholder }}\n </div>\n }\n\n @if (fileName && showFileName) {\n <div [class]=\"textClass\">\n {{ fileName }}\n </div>\n }\n </ngx-dropzone>\n\n @if (icon) {\n <ng-icon [name]=\"icon\" class=\"shrink-0 text-gray-950\"></ng-icon>\n }\n</div>\n", styles: ["ngx-dropzone{height:auto;border:none;overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: NgxDropzoneModule }, { kind: "component", type: i1$8.NgxDropzoneComponent, selector: "ngx-dropzone, [ngx-dropzone]", inputs: ["accept", "disabled", "multiple", "maxFileSize", "expandable", "disableClick", "processDirectoryDrop", "id", "aria-label", "aria-labelledby", "aria-describedby"], outputs: ["change"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }] }); }
|
|
24654
24933
|
}
|
|
24655
24934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DragAndDropFileInputComponent, decorators: [{
|
|
24656
24935
|
type: Component,
|
|
24657
|
-
args: [{ selector: 'gn-ui-drag-and-drop-file-input', standalone: true, imports: [NgxDropzoneModule], template: "<div
|
|
24936
|
+
args: [{ selector: 'gn-ui-drag-and-drop-file-input', standalone: true, imports: [NgxDropzoneModule, NgIcon], template: "<div\n class=\"flex h-full items-center\"\n [class]=\"extraClass\"\n (click)=\"openFileSelector()\"\n>\n <ngx-dropzone\n class=\"flex-1 overflow-hidden\"\n [multiple]=\"false\"\n [disableClick]=\"true\"\n [accept]=\"accept\"\n [maxFileSize]=\"maxFileSizeBytes\"\n [style.background-color]=\"dropzoneBackgroundColor\"\n (change)=\"selectFile($event)\"\n >\n @if (!fileName || !showFileName) {\n <div [class]=\"textClass\">\n {{ placeholder }}\n </div>\n }\n\n @if (fileName && showFileName) {\n <div [class]=\"textClass\">\n {{ fileName }}\n </div>\n }\n </ngx-dropzone>\n\n @if (icon) {\n <ng-icon [name]=\"icon\" class=\"shrink-0 text-gray-950\"></ng-icon>\n }\n</div>\n", styles: ["ngx-dropzone{height:auto;border:none;overflow:hidden}\n"] }]
|
|
24658
24937
|
}], propDecorators: { placeholder: [{
|
|
24659
24938
|
type: Input
|
|
24660
24939
|
}], accept: [{
|
|
24661
24940
|
type: Input
|
|
24941
|
+
}], maxFileSizeMb: [{
|
|
24942
|
+
type: Input
|
|
24943
|
+
}], icon: [{
|
|
24944
|
+
type: Input
|
|
24945
|
+
}], dropzoneBackgroundColor: [{
|
|
24946
|
+
type: Input
|
|
24947
|
+
}], textClass: [{
|
|
24948
|
+
type: Input
|
|
24949
|
+
}], extraClass: [{
|
|
24950
|
+
type: Input
|
|
24951
|
+
}], showFileName: [{
|
|
24952
|
+
type: Input
|
|
24662
24953
|
}], fileChange: [{
|
|
24663
24954
|
type: Output
|
|
24955
|
+
}], errorChange: [{
|
|
24956
|
+
type: Output
|
|
24957
|
+
}], dropzone: [{
|
|
24958
|
+
type: ViewChild,
|
|
24959
|
+
args: [NgxDropzoneComponent]
|
|
24664
24960
|
}] } });
|
|
24665
24961
|
|
|
24666
24962
|
class DropdownMultiselectComponent {
|
|
@@ -24815,7 +25111,7 @@ class DropdownMultiselectComponent {
|
|
|
24815
25111
|
matExpandMore,
|
|
24816
25112
|
matExpandLess,
|
|
24817
25113
|
}),
|
|
24818
|
-
], 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 class=\"h-6 w-6\" data-
|
|
25114
|
+
], 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 class=\"h-6 w-6\" data-test=\"dropdown-clear\">\n @if (hasSelectedChoices && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 mr-1.5 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-[2px] 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 mb-1\"\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 }); }
|
|
24819
25115
|
}
|
|
24820
25116
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DropdownMultiselectComponent, decorators: [{
|
|
24821
25117
|
type: Component,
|
|
@@ -24825,7 +25121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
24825
25121
|
matExpandMore,
|
|
24826
25122
|
matExpandLess,
|
|
24827
25123
|
}),
|
|
24828
|
-
], 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 class=\"h-6 w-6\" data-
|
|
25124
|
+
], 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 class=\"h-6 w-6\" data-test=\"dropdown-clear\">\n @if (hasSelectedChoices && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 mr-1.5 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-[2px] 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 mb-1\"\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" }]
|
|
24829
25125
|
}], propDecorators: { title: [{
|
|
24830
25126
|
type: Input
|
|
24831
25127
|
}], choices: [{
|
|
@@ -24997,7 +25293,7 @@ class DropdownSelectorComponent {
|
|
|
24997
25293
|
provideNgIconsConfig({
|
|
24998
25294
|
size: '1.5em',
|
|
24999
25295
|
}),
|
|
25000
|
-
], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: ["overlayOrigin"], descendants: true }, { propertyName: "overlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "choiceInputs", predicate: ["choiceInputs"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"flex flex-col sm:flex-row sm:items-center relative w-full\">\n @if (showTitle) {\n <span\n class=\"tracking-wide text-sm mb-2 sm:mb-0 sm:mr-2 whitespace-nowrap\"\n [attr.for]=\"id\"\n >\n {{ title }}\n </span>\n }\n <gn-ui-button\n type=\"outline\"\n class=\"grow min-w-0\"\n [style.--gn-ui-button-padding]=\"'8px 8px 8px 16px'\"\n extraClass=\"bg-background flex flex-row w-full {{ extraBtnClass }}\"\n [title]=\"title\"\n [attr.aria-owns]=\"id\"\n (buttonClick)=\"openOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n (keydown)=\"handleTriggerKeydown($event)\"\n [disabled]=\"disabled\"\n >\n <div class=\"grow truncate py-1 mr-2 text-left\">\n {{ getChoiceLabel() | translate }}\n </div>\n <ng-icon\n [name]=\"overlayOpen ? 'matExpandLess' : 'matExpandMore'\"\n class=\"shrink-0 opacity-40\"\n >\n </ng-icon>\n </gn-ui-button>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\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]=\"overlayWidth\"\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 >\n @for (choice of choices; track choice) {\n <button\n #choiceInputs\n type=\"button\"\n [title]=\"choice.label | translate\"\n class=\"flex px-5 py-1 w-full text-start cursor-pointer transition-colors\"\n [ngClass]=\"\n isSelected(choice)\n ? 'text-white bg-primary hover:text-white hover:bg-primary-darker focus:text-white focus:bg-primary-darker'\n : 'text-gray-900 hover:text-primary-darkest hover:bg-gray-50 focus:text-primary-darkest focus:bg-gray-50'\n \"\n (click)=\"onSelectValue(choice)\"\n (keydown)=\"selectIfEnter($event, choice)\"\n [attr.data-cy-value]=\"choice.value.toString()\"\n [attr.data-cy-active]=\"isSelected(choice) ? 'true' : undefined\"\n >\n <span class=\"text-[14px]\">\n {{ choice.label | translate }}\n </span>\n </button>\n }\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$
|
|
25296
|
+
], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: ["overlayOrigin"], descendants: true }, { propertyName: "overlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "choiceInputs", predicate: ["choiceInputs"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"flex flex-col sm:flex-row sm:items-center relative w-full\">\n @if (showTitle) {\n <span\n class=\"tracking-wide text-sm mb-2 sm:mb-0 sm:mr-2 whitespace-nowrap\"\n [attr.for]=\"id\"\n >\n {{ title }}\n </span>\n }\n <gn-ui-button\n type=\"outline\"\n class=\"grow min-w-0\"\n [style.--gn-ui-button-padding]=\"'8px 8px 8px 16px'\"\n extraClass=\"bg-background flex flex-row w-full {{ extraBtnClass }}\"\n [title]=\"title\"\n [attr.aria-owns]=\"id\"\n (buttonClick)=\"openOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n (keydown)=\"handleTriggerKeydown($event)\"\n [disabled]=\"disabled\"\n >\n <div class=\"grow truncate py-1 mr-2 text-left\">\n {{ getChoiceLabel() | translate }}\n </div>\n <ng-icon\n [name]=\"overlayOpen ? 'matExpandLess' : 'matExpandMore'\"\n class=\"shrink-0 opacity-40\"\n >\n </ng-icon>\n </gn-ui-button>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\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]=\"overlayWidth\"\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 >\n @for (choice of choices; track choice) {\n <button\n #choiceInputs\n type=\"button\"\n [title]=\"choice.label | translate\"\n class=\"flex px-5 py-1 w-full text-start cursor-pointer transition-colors\"\n [ngClass]=\"\n isSelected(choice)\n ? 'text-white bg-primary hover:text-white hover:bg-primary-darker focus:text-white focus:bg-primary-darker'\n : 'text-gray-900 hover:text-primary-darkest hover:bg-gray-50 focus:text-primary-darkest focus:bg-gray-50'\n \"\n (click)=\"onSelectValue(choice)\"\n (keydown)=\"selectIfEnter($event, choice)\"\n [attr.data-cy-value]=\"choice.value.toString()\"\n [attr.data-cy-active]=\"isSelected(choice) ? 'true' : undefined\"\n >\n <span class=\"text-[14px]\">\n {{ choice.label | translate }}\n </span>\n </button>\n }\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { 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: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25001
25297
|
}
|
|
25002
25298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DropdownSelectorComponent, decorators: [{
|
|
25003
25299
|
type: Component,
|
|
@@ -25737,6 +26033,175 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
25737
26033
|
type: Output
|
|
25738
26034
|
}] } });
|
|
25739
26035
|
|
|
26036
|
+
marker('search.filters.spatialExtent.import');
|
|
26037
|
+
marker('search.filters.spatialExtent.helpText');
|
|
26038
|
+
marker('search.filters.spatialExtent.error.title');
|
|
26039
|
+
const LABEL_FROM_FILE = marker('search.filters.spatialExtent.bboxFromFile');
|
|
26040
|
+
const LABEL_FROM_FILE_DELETE = marker('search.filters.spatialExtent.bboxFromFileDelete');
|
|
26041
|
+
const LABEL_INITIAL = marker('search.filters.spatialExtent.bboxInitial');
|
|
26042
|
+
const LABEL_INITIAL_DELETE = marker('search.filters.spatialExtent.bboxInitialDelete');
|
|
26043
|
+
class SpatialExtentDropdownComponent {
|
|
26044
|
+
constructor() {
|
|
26045
|
+
this.cd = inject(ChangeDetectorRef);
|
|
26046
|
+
this.scrollStrategies = inject(ScrollStrategyOptions);
|
|
26047
|
+
this.maxFileSizeMb = null;
|
|
26048
|
+
this.bboxChange = new EventEmitter();
|
|
26049
|
+
this.errorChange = new EventEmitter();
|
|
26050
|
+
this.bbox = null;
|
|
26051
|
+
this.fileName = '';
|
|
26052
|
+
this.overlayPositions = [
|
|
26053
|
+
{
|
|
26054
|
+
originX: 'start',
|
|
26055
|
+
originY: 'bottom',
|
|
26056
|
+
overlayX: 'start',
|
|
26057
|
+
overlayY: 'top',
|
|
26058
|
+
offsetY: 8,
|
|
26059
|
+
},
|
|
26060
|
+
{
|
|
26061
|
+
originX: 'start',
|
|
26062
|
+
originY: 'top',
|
|
26063
|
+
overlayX: 'start',
|
|
26064
|
+
overlayY: 'bottom',
|
|
26065
|
+
offsetY: -8,
|
|
26066
|
+
},
|
|
26067
|
+
];
|
|
26068
|
+
this.scrollStrategy = this.scrollStrategies.reposition();
|
|
26069
|
+
this.overlayOpen = false;
|
|
26070
|
+
this.overlayMinWidth = 'none';
|
|
26071
|
+
this.errorKey = null;
|
|
26072
|
+
}
|
|
26073
|
+
set initialBbox(value) {
|
|
26074
|
+
if (!this.bbox && value) {
|
|
26075
|
+
this.bbox = value;
|
|
26076
|
+
}
|
|
26077
|
+
}
|
|
26078
|
+
get hasSelection() {
|
|
26079
|
+
return !!this.bbox;
|
|
26080
|
+
}
|
|
26081
|
+
get selectionLabelKey() {
|
|
26082
|
+
return this.fileName ? LABEL_FROM_FILE : LABEL_INITIAL;
|
|
26083
|
+
}
|
|
26084
|
+
get selectionDeleteLabelKey() {
|
|
26085
|
+
return this.fileName ? LABEL_FROM_FILE_DELETE : LABEL_INITIAL_DELETE;
|
|
26086
|
+
}
|
|
26087
|
+
get selectionLabelParams() {
|
|
26088
|
+
return { fileName: this.fileName };
|
|
26089
|
+
}
|
|
26090
|
+
openOverlay() {
|
|
26091
|
+
this.overlayMinWidth =
|
|
26092
|
+
this.overlayOrigin.elementRef.nativeElement.getBoundingClientRect()
|
|
26093
|
+
.width + 'px';
|
|
26094
|
+
this.overlayOpen = true;
|
|
26095
|
+
}
|
|
26096
|
+
closeOverlay() {
|
|
26097
|
+
this.overlayOpen = false;
|
|
26098
|
+
}
|
|
26099
|
+
toggleOverlay() {
|
|
26100
|
+
if (this.overlayOpen) {
|
|
26101
|
+
this.closeOverlay();
|
|
26102
|
+
}
|
|
26103
|
+
else {
|
|
26104
|
+
this.openOverlay();
|
|
26105
|
+
}
|
|
26106
|
+
}
|
|
26107
|
+
async handleFileSelected(file) {
|
|
26108
|
+
this.errorKey = null;
|
|
26109
|
+
let content;
|
|
26110
|
+
try {
|
|
26111
|
+
content = await readFileAsText(file);
|
|
26112
|
+
const parsed = JSON.parse(content);
|
|
26113
|
+
const geometry = getGeometryFromGeoJSON(parsed);
|
|
26114
|
+
if (!geometry) {
|
|
26115
|
+
this.setError(marker('search.filters.spatialExtent.error.noGeometry'));
|
|
26116
|
+
return;
|
|
26117
|
+
}
|
|
26118
|
+
const bbox = getGeometryBoundingBox(geometry);
|
|
26119
|
+
this.bbox = bbox;
|
|
26120
|
+
this.fileName = file.name;
|
|
26121
|
+
this.bboxChange.emit(bbox);
|
|
26122
|
+
this.cd.markForCheck();
|
|
26123
|
+
}
|
|
26124
|
+
catch {
|
|
26125
|
+
this.setError(marker('search.filters.spatialExtent.error.invalidFormat'));
|
|
26126
|
+
return;
|
|
26127
|
+
}
|
|
26128
|
+
}
|
|
26129
|
+
handleFileError(error) {
|
|
26130
|
+
if (error === 'file-too-large') {
|
|
26131
|
+
this.setError(marker('search.filters.spatialExtent.error.fileTooLarge'), {
|
|
26132
|
+
maxSize: this.maxFileSizeMb,
|
|
26133
|
+
});
|
|
26134
|
+
}
|
|
26135
|
+
else {
|
|
26136
|
+
this.setError(marker('search.filters.spatialExtent.error.invalidFormat'));
|
|
26137
|
+
}
|
|
26138
|
+
}
|
|
26139
|
+
setError(errorKey, params) {
|
|
26140
|
+
this.errorKey = errorKey;
|
|
26141
|
+
this.errorChange.emit({ key: errorKey, params });
|
|
26142
|
+
this.cd.markForCheck();
|
|
26143
|
+
}
|
|
26144
|
+
removeSelection(event) {
|
|
26145
|
+
this.bbox = null;
|
|
26146
|
+
this.fileName = '';
|
|
26147
|
+
this.errorKey = null;
|
|
26148
|
+
this.fileInput?.clear();
|
|
26149
|
+
this.bboxChange.emit(null);
|
|
26150
|
+
propagateToDocumentOnly(event);
|
|
26151
|
+
}
|
|
26152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpatialExtentDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26153
|
+
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: [
|
|
26154
|
+
provideIcons({
|
|
26155
|
+
iconoirCheckCircle,
|
|
26156
|
+
iconoirImport,
|
|
26157
|
+
iconoirSquareDashed,
|
|
26158
|
+
iconoirTrash,
|
|
26159
|
+
matClose,
|
|
26160
|
+
matExpandLess,
|
|
26161
|
+
matExpandMore,
|
|
26162
|
+
}),
|
|
26163
|
+
], 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-[8px]') + ' 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=\"iconoirImport\"\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 }); }
|
|
26164
|
+
}
|
|
26165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpatialExtentDropdownComponent, decorators: [{
|
|
26166
|
+
type: Component,
|
|
26167
|
+
args: [{ selector: 'gn-ui-spatial-extent-dropdown', standalone: true, imports: [
|
|
26168
|
+
ButtonComponent,
|
|
26169
|
+
NgIcon,
|
|
26170
|
+
OverlayModule,
|
|
26171
|
+
TranslatePipe,
|
|
26172
|
+
DragAndDropFileInputComponent,
|
|
26173
|
+
], providers: [
|
|
26174
|
+
provideIcons({
|
|
26175
|
+
iconoirCheckCircle,
|
|
26176
|
+
iconoirImport,
|
|
26177
|
+
iconoirSquareDashed,
|
|
26178
|
+
iconoirTrash,
|
|
26179
|
+
matClose,
|
|
26180
|
+
matExpandLess,
|
|
26181
|
+
matExpandMore,
|
|
26182
|
+
}),
|
|
26183
|
+
], 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-[8px]') + ' 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=\"iconoirImport\"\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" }]
|
|
26184
|
+
}], propDecorators: { title: [{
|
|
26185
|
+
type: Input
|
|
26186
|
+
}], maxFileSizeMb: [{
|
|
26187
|
+
type: Input
|
|
26188
|
+
}], initialBbox: [{
|
|
26189
|
+
type: Input
|
|
26190
|
+
}], bboxChange: [{
|
|
26191
|
+
type: Output
|
|
26192
|
+
}], errorChange: [{
|
|
26193
|
+
type: Output
|
|
26194
|
+
}], overlayOrigin: [{
|
|
26195
|
+
type: ViewChild,
|
|
26196
|
+
args: ['overlayOrigin']
|
|
26197
|
+
}], overlay: [{
|
|
26198
|
+
type: ViewChild,
|
|
26199
|
+
args: [CdkConnectedOverlay]
|
|
26200
|
+
}], fileInput: [{
|
|
26201
|
+
type: ViewChild,
|
|
26202
|
+
args: [DragAndDropFileInputComponent]
|
|
26203
|
+
}] } });
|
|
26204
|
+
|
|
25740
26205
|
class CellPopinComponent {
|
|
25741
26206
|
constructor() {
|
|
25742
26207
|
this.scrollDispatcher = inject(ScrollDispatcher);
|
|
@@ -25813,7 +26278,7 @@ class CellPopinComponent {
|
|
|
25813
26278
|
this.isOpen = false;
|
|
25814
26279
|
}
|
|
25815
26280
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: CellPopinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25816
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: CellPopinComponent, isStandalone: true, selector: "gn-ui-cell-popin", inputs: { extraClass: "extraClass", cdkScrollContainer: "cdkScrollContainer", scrollContainer: "scrollContainer", activePopin: "activePopin" }, providers: [provideIcons({ iconoirReduce })], viewQueries: [{ propertyName: "anchorRef", first: true, predicate: ["anchorRef"], descendants: true }], ngImport: i0, template: "<div\n class=\"h-full flex items-center justify-center\"\n cdkOverlayOrigin\n #anchorRef\n #trigger=\"cdkOverlayOrigin\"\n [class]=\"extraClass\"\n data-cy=\"cell-popin\"\n>\n <ng-content select=\"[cellContent]\"></ng-content>\n @if (activePopin) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayPush]=\"false\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"'auto'\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\n (detach)=\"closeOverlay()\"\n >\n @if (activePopin && isVisible) {\n <div\n class=\"bg-white shadow-lg border border-gray-300 relative\"\n data-cy=\"cell-popin-content\"\n >\n <ng-content select=\"[popinContent]\"></ng-content>\n <gn-ui-button\n data-cy=\"cell-popin-close\"\n [style.--gn-ui-button-background]=\"'bg-transparent'\"\n class=\"absolute top-2 right-2\"\n type=\"light\"\n (buttonClick)=\"closeOverlay()\"\n extraClass=\"w-10 h-8 px-1\"\n >\n <ng-icon name=\"iconoirReduce\" size=\"24\"></ng-icon>\n </gn-ui-button>\n </div>\n }\n </ng-template>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$
|
|
26281
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: CellPopinComponent, isStandalone: true, selector: "gn-ui-cell-popin", inputs: { extraClass: "extraClass", cdkScrollContainer: "cdkScrollContainer", scrollContainer: "scrollContainer", activePopin: "activePopin" }, providers: [provideIcons({ iconoirReduce })], viewQueries: [{ propertyName: "anchorRef", first: true, predicate: ["anchorRef"], descendants: true }], ngImport: i0, template: "<div\n class=\"h-full flex items-center justify-center\"\n cdkOverlayOrigin\n #anchorRef\n #trigger=\"cdkOverlayOrigin\"\n [class]=\"extraClass\"\n data-cy=\"cell-popin\"\n>\n <ng-content select=\"[cellContent]\"></ng-content>\n @if (activePopin) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayPush]=\"false\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"'auto'\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\n (detach)=\"closeOverlay()\"\n >\n @if (activePopin && isVisible) {\n <div\n class=\"bg-white shadow-lg border border-gray-300 relative\"\n data-cy=\"cell-popin-content\"\n >\n <ng-content select=\"[popinContent]\"></ng-content>\n <gn-ui-button\n data-cy=\"cell-popin-close\"\n [style.--gn-ui-button-background]=\"'bg-transparent'\"\n class=\"absolute top-2 right-2\"\n type=\"light\"\n (buttonClick)=\"closeOverlay()\"\n extraClass=\"w-10 h-8 px-1\"\n >\n <ng-icon name=\"iconoirReduce\" size=\"24\"></ng-icon>\n </gn-ui-button>\n </div>\n }\n </ng-template>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { 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: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }] }); }
|
|
25817
26282
|
}
|
|
25818
26283
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: CellPopinComponent, decorators: [{
|
|
25819
26284
|
type: Component,
|
|
@@ -27903,6 +28368,34 @@ class DateRangeSearchField extends SimpleSearchField {
|
|
|
27903
28368
|
return 'dateRange';
|
|
27904
28369
|
}
|
|
27905
28370
|
}
|
|
28371
|
+
class ResourceCreationRevisionDateSearchField extends DateRangeSearchField {
|
|
28372
|
+
constructor(injector, order = 'desc') {
|
|
28373
|
+
super('resourceCreationRevisionDate', injector, order);
|
|
28374
|
+
this.esService.registerRuntimeField('resourceCreationRevisionDate', `if (doc.containsKey('creationDateForResource') && doc['creationDateForResource'].size() > 0) {
|
|
28375
|
+
for (def date : doc['creationDateForResource']) { emit(date.millis); }
|
|
28376
|
+
}
|
|
28377
|
+
if (doc.containsKey('revisionDateForResource') && doc['revisionDateForResource'].size() > 0) {
|
|
28378
|
+
for (def date : doc['revisionDateForResource']) { emit(date.millis); }
|
|
28379
|
+
}`, 'date');
|
|
28380
|
+
}
|
|
28381
|
+
}
|
|
28382
|
+
class BoundingBoxSearchField extends SimpleSearchField {
|
|
28383
|
+
getAvailableValues() {
|
|
28384
|
+
return of([]);
|
|
28385
|
+
}
|
|
28386
|
+
getFiltersForValues(values) {
|
|
28387
|
+
return of({
|
|
28388
|
+
[this.esFieldName]: values.map(Number),
|
|
28389
|
+
});
|
|
28390
|
+
}
|
|
28391
|
+
getValuesForFilter(filters) {
|
|
28392
|
+
const filter = filters[this.esFieldName];
|
|
28393
|
+
return of(isBoundingBox(filter) ? filter : []);
|
|
28394
|
+
}
|
|
28395
|
+
getType() {
|
|
28396
|
+
return 'spatialExtent';
|
|
28397
|
+
}
|
|
28398
|
+
}
|
|
27906
28399
|
marker('search.filters.availableServices.view');
|
|
27907
28400
|
marker('search.filters.availableServices.download');
|
|
27908
28401
|
class AvailableServicesField extends SimpleSearchField {
|
|
@@ -28047,6 +28540,8 @@ marker('search.filters.producerOrg');
|
|
|
28047
28540
|
marker('search.filters.publisherOrg');
|
|
28048
28541
|
marker('search.filters.user');
|
|
28049
28542
|
marker('search.filters.changeDate');
|
|
28543
|
+
marker('search.filters.resourceCreationRevisionDate');
|
|
28544
|
+
marker('search.filters.spatialExtent');
|
|
28050
28545
|
class FieldsService {
|
|
28051
28546
|
constructor() {
|
|
28052
28547
|
this.injector = inject(Injector);
|
|
@@ -28069,7 +28564,9 @@ class FieldsService {
|
|
|
28069
28564
|
publisherOrg: new MultilingualSearchField('distributorOrgForResourceObject', this.injector, 'asc', 'key'),
|
|
28070
28565
|
user: new UserSearchField(this.injector),
|
|
28071
28566
|
changeDate: new DateRangeSearchField('changeDate', this.injector, 'desc'),
|
|
28567
|
+
resourceCreationRevisionDate: new ResourceCreationRevisionDateSearchField(this.injector, 'desc'),
|
|
28072
28568
|
availableServices: new AvailableServicesField(this.injector),
|
|
28569
|
+
spatialExtent: new BoundingBoxSearchField('spatialExtent', this.injector),
|
|
28073
28570
|
};
|
|
28074
28571
|
}
|
|
28075
28572
|
get supportedFields() {
|
|
@@ -29332,7 +29829,7 @@ class ContactPillComponent {
|
|
|
29332
29829
|
this.overlayOpen = false;
|
|
29333
29830
|
}
|
|
29334
29831
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContactPillComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29335
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContactPillComponent, isStandalone: true, selector: "gn-ui-contact-pill", inputs: { contact: "contact" }, ngImport: i0, template: "<gn-ui-button\n [type]=\"overlayOpen ? 'gray-light' : 'primary-light'\"\n extraClass=\"group w-full min-h-12 gap-3 justify-between py-2 pl-5 pr-4 rounded\"\n data-test=\"contact-pill\"\n (buttonClick)=\"toggleOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n>\n <span\n class=\"font-title font-medium text-base leading-tight truncate\"\n [class]=\"!overlayOpen ? 'text-primary-black group-hover:text-white' : ''\"\n [title]=\"displayName\"\n >{{ displayName }}</span\n >\n <div\n class=\"gn-ui-card-icon items-center justify-center w-10 h-8\"\n [class]=\"\n !overlayOpen ? 'group-hover:border-white group-hover:text-white' : ''\n \"\n >\n @if (overlayOpen) {\n <ng-icon class=\"!w-6 !h-6 !text-[24px]\" name=\"matClose\"></ng-icon>\n } @else {\n <ng-icon class=\"!w-6 !h-6 !text-[24px]\" name=\"matInfoOutline\"></ng-icon>\n }\n </div>\n</gn-ui-button>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayOffsetX]=\"overlayOffsetX\"\n (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div [style.width.px]=\"overlayWidth\">\n <gn-ui-contact-details [contact]=\"contact\"></gn-ui-contact-details>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$
|
|
29832
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContactPillComponent, isStandalone: true, selector: "gn-ui-contact-pill", inputs: { contact: "contact" }, ngImport: i0, template: "<gn-ui-button\n [type]=\"overlayOpen ? 'gray-light' : 'primary-light'\"\n extraClass=\"group w-full min-h-12 gap-3 justify-between py-2 pl-5 pr-4 rounded\"\n data-test=\"contact-pill\"\n (buttonClick)=\"toggleOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n>\n <span\n class=\"font-title font-medium text-base leading-tight truncate\"\n [class]=\"!overlayOpen ? 'text-primary-black group-hover:text-white' : ''\"\n [title]=\"displayName\"\n >{{ displayName }}</span\n >\n <div\n class=\"gn-ui-card-icon items-center justify-center w-10 h-8\"\n [class]=\"\n !overlayOpen ? 'group-hover:border-white group-hover:text-white' : ''\n \"\n >\n @if (overlayOpen) {\n <ng-icon class=\"!w-6 !h-6 !text-[24px]\" name=\"matClose\"></ng-icon>\n } @else {\n <ng-icon class=\"!w-6 !h-6 !text-[24px]\" name=\"matInfoOutline\"></ng-icon>\n }\n </div>\n</gn-ui-button>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayOffsetX]=\"overlayOffsetX\"\n (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div [style.width.px]=\"overlayWidth\">\n <gn-ui-contact-details [contact]=\"contact\"></gn-ui-contact-details>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { 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: ContactDetailsComponent, selector: "gn-ui-contact-details", inputs: ["contact"] }], viewProviders: [provideIcons({ matClose, matInfoOutline })], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
29336
29833
|
}
|
|
29337
29834
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContactPillComponent, decorators: [{
|
|
29338
29835
|
type: Component,
|
|
@@ -30058,7 +30555,7 @@ class ServiceCapabilitiesComponent {
|
|
|
30058
30555
|
if (this.apiLinks.length > 0 &&
|
|
30059
30556
|
this.apiLinks[0].accessServiceProtocol !== 'ogcFeatures') {
|
|
30060
30557
|
this.loading = true;
|
|
30061
|
-
this.availableLayers = await getLayers(this.apiLinks[0].url.href, this.apiLinks[0].accessServiceProtocol);
|
|
30558
|
+
this.availableLayers = await getLayers(this.apiLinks[0].url.href, this.apiLinks[0].accessServiceProtocol, true);
|
|
30062
30559
|
this.loading = false;
|
|
30063
30560
|
this.cdr.detectChanges();
|
|
30064
30561
|
this.filteredLayers = this.availableLayers;
|
|
@@ -31254,19 +31751,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
31254
31751
|
type: Output
|
|
31255
31752
|
}] } });
|
|
31256
31753
|
|
|
31754
|
+
class NotificationsService {
|
|
31755
|
+
constructor() {
|
|
31756
|
+
this.notifications$ = new BehaviorSubject([]);
|
|
31757
|
+
}
|
|
31758
|
+
showNotification(content, timeoutMs, error) {
|
|
31759
|
+
error && console.error(error);
|
|
31760
|
+
const id = Math.floor(Math.random() * 1000000);
|
|
31761
|
+
this.notifications$.next([...this.notifications$.value, { ...content, id }]);
|
|
31762
|
+
if (typeof timeoutMs !== 'undefined') {
|
|
31763
|
+
setTimeout(() => {
|
|
31764
|
+
this.removeNotificationById(id);
|
|
31765
|
+
}, timeoutMs);
|
|
31766
|
+
}
|
|
31767
|
+
return id;
|
|
31768
|
+
}
|
|
31769
|
+
removeNotificationById(id) {
|
|
31770
|
+
this.notifications$.next(this.notifications$.value.filter((n) => n.id !== id));
|
|
31771
|
+
}
|
|
31772
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
31773
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsService, providedIn: 'root' }); }
|
|
31774
|
+
}
|
|
31775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsService, decorators: [{
|
|
31776
|
+
type: Injectable,
|
|
31777
|
+
args: [{
|
|
31778
|
+
providedIn: 'root',
|
|
31779
|
+
}]
|
|
31780
|
+
}] });
|
|
31781
|
+
|
|
31782
|
+
class NotificationsContainerComponent {
|
|
31783
|
+
constructor() {
|
|
31784
|
+
this.notificationsService = inject(NotificationsService);
|
|
31785
|
+
}
|
|
31786
|
+
trackById(index, notification) {
|
|
31787
|
+
return notification.id;
|
|
31788
|
+
}
|
|
31789
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31790
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NotificationsContainerComponent, isStandalone: true, selector: "gn-ui-notifications-container", ngImport: i0, 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", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NotificationComponent, selector: "gn-ui-notification", inputs: ["type", "title", "text", "closeMessage"], outputs: ["notificationClose"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], animations: [
|
|
31791
|
+
trigger('enterExit', [
|
|
31792
|
+
transition(':enter', [
|
|
31793
|
+
animate('150ms', keyframes([
|
|
31794
|
+
style({ transform: 'scale(1)', opacity: 0 }),
|
|
31795
|
+
style({ transform: 'scale(1.03)', opacity: 0.5 }),
|
|
31796
|
+
style({ transform: 'scale(1)', opacity: 1 }),
|
|
31797
|
+
])),
|
|
31798
|
+
]),
|
|
31799
|
+
transition(':leave', [
|
|
31800
|
+
animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
|
|
31801
|
+
]),
|
|
31802
|
+
]),
|
|
31803
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31804
|
+
}
|
|
31805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsContainerComponent, decorators: [{
|
|
31806
|
+
type: Component,
|
|
31807
|
+
args: [{ selector: 'gn-ui-notifications-container', standalone: true, imports: [CommonModule, NotificationComponent], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
31808
|
+
trigger('enterExit', [
|
|
31809
|
+
transition(':enter', [
|
|
31810
|
+
animate('150ms', keyframes([
|
|
31811
|
+
style({ transform: 'scale(1)', opacity: 0 }),
|
|
31812
|
+
style({ transform: 'scale(1.03)', opacity: 0.5 }),
|
|
31813
|
+
style({ transform: 'scale(1)', opacity: 1 }),
|
|
31814
|
+
])),
|
|
31815
|
+
]),
|
|
31816
|
+
transition(':leave', [
|
|
31817
|
+
animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
|
|
31818
|
+
]),
|
|
31819
|
+
]),
|
|
31820
|
+
], 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" }]
|
|
31821
|
+
}] });
|
|
31822
|
+
|
|
31257
31823
|
class FilterDropdownComponent {
|
|
31258
31824
|
constructor() {
|
|
31259
31825
|
this.searchFacade = inject(SearchFacade);
|
|
31260
31826
|
this.searchService = inject(SearchService);
|
|
31261
31827
|
this.fieldsService = inject(FieldsService);
|
|
31828
|
+
this.notificationsService = inject(NotificationsService);
|
|
31829
|
+
this.translateService = inject(TranslateService);
|
|
31830
|
+
this.spatialExtentMaxFileSize = getOptionalSearchConfig()?.SPATIAL_EXTENT_MAX_FILE_SIZE;
|
|
31262
31831
|
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([])));
|
|
31263
|
-
this.selectedDateRange$ = this.selected$.pipe(map$1((
|
|
31832
|
+
this.selectedDateRange$ = this.selected$.pipe(map$1((selected) => (Array.isArray(selected) ? {} : selected)));
|
|
31833
|
+
this.selectedBoundingBox$ = this.selected$.pipe(map$1((selected) => Array.isArray(selected) && selected.length > 0
|
|
31834
|
+
? selected
|
|
31835
|
+
: null));
|
|
31836
|
+
this.spatialExtentErrorNotificationId = null;
|
|
31264
31837
|
}
|
|
31265
31838
|
onSelectedValues(values) {
|
|
31266
31839
|
this.fieldsService
|
|
31267
31840
|
.buildFiltersFromFieldValues({ [this.fieldName]: values })
|
|
31268
31841
|
.subscribe((filters) => this.searchService.updateFilters(filters));
|
|
31269
31842
|
}
|
|
31843
|
+
onBboxChange(bbox) {
|
|
31844
|
+
this.fieldsService
|
|
31845
|
+
.buildFiltersFromFieldValues({
|
|
31846
|
+
[this.fieldName]: bbox,
|
|
31847
|
+
})
|
|
31848
|
+
.subscribe((filters) => this.searchService.updateFilters(filters));
|
|
31849
|
+
this.clearSpatialExtentErrorNotification();
|
|
31850
|
+
}
|
|
31851
|
+
onSpatialExtentError(error) {
|
|
31852
|
+
this.clearSpatialExtentErrorNotification();
|
|
31853
|
+
this.spatialExtentErrorNotificationId =
|
|
31854
|
+
this.notificationsService.showNotification({
|
|
31855
|
+
type: 'error',
|
|
31856
|
+
title: this.translateService.instant('search.filters.spatialExtent.error.title'),
|
|
31857
|
+
text: this.translateService.instant(error.key, error.params),
|
|
31858
|
+
});
|
|
31859
|
+
}
|
|
31860
|
+
clearSpatialExtentErrorNotification() {
|
|
31861
|
+
if (this.spatialExtentErrorNotificationId === null)
|
|
31862
|
+
return;
|
|
31863
|
+
this.notificationsService.removeNotificationById(this.spatialExtentErrorNotificationId);
|
|
31864
|
+
this.spatialExtentErrorNotificationId = null;
|
|
31865
|
+
}
|
|
31270
31866
|
ngOnInit() {
|
|
31271
31867
|
this.fieldType = this.fieldsService.getFieldType(this.fieldName);
|
|
31272
31868
|
this.choices$ = this.fieldsService.getAvailableValues(this.fieldName).pipe(startWith$1([]), map$1((values) => values.map((v) => ({
|
|
@@ -31274,27 +31870,15 @@ class FilterDropdownComponent {
|
|
|
31274
31870
|
value: v.value.toString(), // converting to string for the dropdown
|
|
31275
31871
|
}))), catchError(() => of([])));
|
|
31276
31872
|
}
|
|
31277
|
-
|
|
31278
|
-
|
|
31279
|
-
|
|
31280
|
-
|
|
31281
|
-
|
|
31282
|
-
|
|
31283
|
-
if (!end)
|
|
31284
|
-
return;
|
|
31285
|
-
this.dateRange = { ...this.dateRange, end };
|
|
31286
|
-
if (this.dateRange.start && this.dateRange.end) {
|
|
31287
|
-
this.fieldsService
|
|
31288
|
-
.buildFiltersFromFieldValues({
|
|
31289
|
-
[this.fieldName]: this.dateRange,
|
|
31290
|
-
})
|
|
31291
|
-
.subscribe((filters) => {
|
|
31292
|
-
return this.searchService.updateFilters(filters);
|
|
31293
|
-
});
|
|
31294
|
-
}
|
|
31873
|
+
onDateRangeChange(dateRange) {
|
|
31874
|
+
this.fieldsService
|
|
31875
|
+
.buildFiltersFromFieldValues({
|
|
31876
|
+
[this.fieldName]: dateRange,
|
|
31877
|
+
})
|
|
31878
|
+
.subscribe((filters) => this.searchService.updateFilters(filters));
|
|
31295
31879
|
}
|
|
31296
31880
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FilterDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31297
|
-
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 [
|
|
31881
|
+
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 }); }
|
|
31298
31882
|
}
|
|
31299
31883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FilterDropdownComponent, decorators: [{
|
|
31300
31884
|
type: Component,
|
|
@@ -31302,7 +31886,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
31302
31886
|
CommonModule,
|
|
31303
31887
|
DateRangeDropdownComponent,
|
|
31304
31888
|
DropdownMultiselectComponent,
|
|
31305
|
-
|
|
31889
|
+
SpatialExtentDropdownComponent,
|
|
31890
|
+
], 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" }]
|
|
31306
31891
|
}], propDecorators: { fieldName: [{
|
|
31307
31892
|
type: Input
|
|
31308
31893
|
}], title: [{
|
|
@@ -31772,11 +32357,7 @@ const SortByEnum = {
|
|
|
31772
32357
|
RELEVANCY: ['desc', '_score'],
|
|
31773
32358
|
QUALITY_SCORE: ['desc', 'qualityScore'],
|
|
31774
32359
|
CHANGE_DATE: ['desc', 'changeDate'],
|
|
31775
|
-
|
|
31776
|
-
['desc', 'revisionDateForResource'],
|
|
31777
|
-
['desc', 'publicationDateForResource'],
|
|
31778
|
-
['desc', 'creationDateForResource'],
|
|
31779
|
-
],
|
|
32360
|
+
RESOURCE_DATE: ['desc', 'resourceDate.date'],
|
|
31780
32361
|
};
|
|
31781
32362
|
|
|
31782
32363
|
class SortByComponent {
|
|
@@ -31790,7 +32371,7 @@ class SortByComponent {
|
|
|
31790
32371
|
},
|
|
31791
32372
|
{
|
|
31792
32373
|
label: marker('results.sortBy.dateStamp'),
|
|
31793
|
-
value: SortByEnum.
|
|
32374
|
+
value: SortByEnum.RESOURCE_DATE,
|
|
31794
32375
|
},
|
|
31795
32376
|
{
|
|
31796
32377
|
label: marker('results.sortBy.popularity'),
|
|
@@ -31842,74 +32423,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
31842
32423
|
args: ['gnUiSearchStateContainer']
|
|
31843
32424
|
}] } });
|
|
31844
32425
|
|
|
31845
|
-
class NotificationsService {
|
|
31846
|
-
constructor() {
|
|
31847
|
-
this.notifications$ = new BehaviorSubject([]);
|
|
31848
|
-
}
|
|
31849
|
-
showNotification(content, timeoutMs, error) {
|
|
31850
|
-
error && console.error(error);
|
|
31851
|
-
const id = Math.floor(Math.random() * 1000000);
|
|
31852
|
-
this.notifications$.next([...this.notifications$.value, { ...content, id }]);
|
|
31853
|
-
if (typeof timeoutMs === 'undefined')
|
|
31854
|
-
return;
|
|
31855
|
-
setTimeout(() => {
|
|
31856
|
-
this.removeNotificationById(id);
|
|
31857
|
-
}, timeoutMs);
|
|
31858
|
-
}
|
|
31859
|
-
removeNotificationById(id) {
|
|
31860
|
-
this.notifications$.next(this.notifications$.value.filter((n) => n.id !== id));
|
|
31861
|
-
}
|
|
31862
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
31863
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsService, providedIn: 'root' }); }
|
|
31864
|
-
}
|
|
31865
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsService, decorators: [{
|
|
31866
|
-
type: Injectable,
|
|
31867
|
-
args: [{
|
|
31868
|
-
providedIn: 'root',
|
|
31869
|
-
}]
|
|
31870
|
-
}] });
|
|
31871
|
-
|
|
31872
|
-
class NotificationsContainerComponent {
|
|
31873
|
-
constructor() {
|
|
31874
|
-
this.notificationsService = inject(NotificationsService);
|
|
31875
|
-
}
|
|
31876
|
-
trackById(index, notification) {
|
|
31877
|
-
return notification.id;
|
|
31878
|
-
}
|
|
31879
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31880
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NotificationsContainerComponent, isStandalone: true, selector: "gn-ui-notifications-container", ngImport: i0, 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", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NotificationComponent, selector: "gn-ui-notification", inputs: ["type", "title", "text", "closeMessage"], outputs: ["notificationClose"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], animations: [
|
|
31881
|
-
trigger('enterExit', [
|
|
31882
|
-
transition(':enter', [
|
|
31883
|
-
animate('150ms', keyframes([
|
|
31884
|
-
style({ transform: 'scale(1)', opacity: 0 }),
|
|
31885
|
-
style({ transform: 'scale(1.03)', opacity: 0.5 }),
|
|
31886
|
-
style({ transform: 'scale(1)', opacity: 1 }),
|
|
31887
|
-
])),
|
|
31888
|
-
]),
|
|
31889
|
-
transition(':leave', [
|
|
31890
|
-
animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
|
|
31891
|
-
]),
|
|
31892
|
-
]),
|
|
31893
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31894
|
-
}
|
|
31895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NotificationsContainerComponent, decorators: [{
|
|
31896
|
-
type: Component,
|
|
31897
|
-
args: [{ selector: 'gn-ui-notifications-container', standalone: true, imports: [CommonModule, NotificationComponent], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
31898
|
-
trigger('enterExit', [
|
|
31899
|
-
transition(':enter', [
|
|
31900
|
-
animate('150ms', keyframes([
|
|
31901
|
-
style({ transform: 'scale(1)', opacity: 0 }),
|
|
31902
|
-
style({ transform: 'scale(1.03)', opacity: 0.5 }),
|
|
31903
|
-
style({ transform: 'scale(1)', opacity: 1 }),
|
|
31904
|
-
])),
|
|
31905
|
-
]),
|
|
31906
|
-
transition(':leave', [
|
|
31907
|
-
animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
|
|
31908
|
-
]),
|
|
31909
|
-
]),
|
|
31910
|
-
], 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" }]
|
|
31911
|
-
}] });
|
|
31912
|
-
|
|
31913
32426
|
class ResultsTableContainerComponent {
|
|
31914
32427
|
constructor() {
|
|
31915
32428
|
this.searchFacade = inject(SearchFacade);
|
|
@@ -31994,12 +32507,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
31994
32507
|
|
|
31995
32508
|
marker('search.filters.summaryLabel.user');
|
|
31996
32509
|
marker('search.filters.summaryLabel.changeDate');
|
|
32510
|
+
marker('search.filters.summaryLabel.resourceCreationRevisionDate');
|
|
32511
|
+
const OPEN_BOUND = '…';
|
|
31997
32512
|
class SearchFiltersSummaryItemComponent {
|
|
31998
32513
|
constructor() {
|
|
31999
32514
|
this.searchFacade = inject(SearchFacade);
|
|
32000
32515
|
this.searchService = inject(SearchService);
|
|
32001
32516
|
this.fieldsService = inject(FieldsService);
|
|
32002
|
-
this.
|
|
32517
|
+
this.dateService = inject(DateService);
|
|
32003
32518
|
this.translate = inject(TranslateService);
|
|
32004
32519
|
this.fieldValues$ = this.searchFacade.searchFilters$.pipe(switchMap((filters) => this.fieldsService.readFieldValuesFromFilters(filters)), map$2((fieldValues) => Array.isArray(fieldValues[this.fieldName])
|
|
32005
32520
|
? fieldValues[this.fieldName]
|
|
@@ -32026,9 +32541,10 @@ class SearchFiltersSummaryItemComponent {
|
|
|
32026
32541
|
getReadableValues(fieldValues) {
|
|
32027
32542
|
return fieldValues.map((value) => {
|
|
32028
32543
|
if (this.fieldType === 'dateRange') {
|
|
32544
|
+
const { start, end } = value;
|
|
32029
32545
|
return {
|
|
32030
32546
|
value,
|
|
32031
|
-
label: `${this.
|
|
32547
|
+
label: `${this.formatBound(start)} - ${this.formatBound(end)}`,
|
|
32032
32548
|
};
|
|
32033
32549
|
}
|
|
32034
32550
|
else if (this.fieldName === 'user') {
|
|
@@ -32039,6 +32555,15 @@ class SearchFiltersSummaryItemComponent {
|
|
|
32039
32555
|
}
|
|
32040
32556
|
});
|
|
32041
32557
|
}
|
|
32558
|
+
formatBound(date) {
|
|
32559
|
+
return date
|
|
32560
|
+
? this.dateService.formatDate(date, {
|
|
32561
|
+
day: '2-digit',
|
|
32562
|
+
month: '2-digit',
|
|
32563
|
+
year: 'numeric',
|
|
32564
|
+
})
|
|
32565
|
+
: OPEN_BOUND;
|
|
32566
|
+
}
|
|
32042
32567
|
async removeFilterValue(fieldValue) {
|
|
32043
32568
|
const currentFieldValues = await firstValueFrom(this.fieldValues$);
|
|
32044
32569
|
const updatedFieldValues = currentFieldValues
|
|
@@ -32051,11 +32576,11 @@ class SearchFiltersSummaryItemComponent {
|
|
|
32051
32576
|
.subscribe((filters) => this.searchService.updateFilters(filters));
|
|
32052
32577
|
}
|
|
32053
32578
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SearchFiltersSummaryItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32054
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SearchFiltersSummaryItemComponent, isStandalone: true, selector: "gn-ui-search-filters-summary-item", inputs: { fieldName: "fieldName" },
|
|
32579
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SearchFiltersSummaryItemComponent, isStandalone: true, selector: "gn-ui-search-filters-summary-item", inputs: { fieldName: "fieldName" }, ngImport: i0, template: "@if ((fieldValues$ | async)?.length > 0) {\n <div class=\"flex flex-row items-center gap-2\">\n <span class=\"text-gray-800\" data-cy=\"filterSummaryLabel\">{{\n translatedLabel\n }}</span>\n @for (fieldValue of fieldValues$ | async; track fieldValue) {\n <gn-ui-badge\n class=\"gn-ui-badge\"\n [style.--gn-ui-badge-rounded]=\"'8px'\"\n [style.--gn-ui-badge-padding]=\"'3px 4px'\"\n [style.--gn-ui-badge-text-color]=\"'black'\"\n [style.--gn-ui-badge-background-color]=\"'#F2F2F2'\"\n [style.--gn-ui-badge-font-weight]=\"'700'\"\n [removable]=\"true\"\n (badgeRemoveClicked)=\"removeFilterValue(fieldValue.value)\"\n >{{ fieldValue.label }}</gn-ui-badge\n >\n }\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BadgeComponent, selector: "gn-ui-badge", inputs: ["clickable", "removable"], outputs: ["badgeRemoveClicked", "badgeClicked"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
|
|
32055
32580
|
}
|
|
32056
32581
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SearchFiltersSummaryItemComponent, decorators: [{
|
|
32057
32582
|
type: Component,
|
|
32058
|
-
args: [{ selector: 'gn-ui-search-filters-summary-item', standalone: true, imports: [CommonModule, BadgeComponent],
|
|
32583
|
+
args: [{ selector: 'gn-ui-search-filters-summary-item', standalone: true, imports: [CommonModule, BadgeComponent], template: "@if ((fieldValues$ | async)?.length > 0) {\n <div class=\"flex flex-row items-center gap-2\">\n <span class=\"text-gray-800\" data-cy=\"filterSummaryLabel\">{{\n translatedLabel\n }}</span>\n @for (fieldValue of fieldValues$ | async; track fieldValue) {\n <gn-ui-badge\n class=\"gn-ui-badge\"\n [style.--gn-ui-badge-rounded]=\"'8px'\"\n [style.--gn-ui-badge-padding]=\"'3px 4px'\"\n [style.--gn-ui-badge-text-color]=\"'black'\"\n [style.--gn-ui-badge-background-color]=\"'#F2F2F2'\"\n [style.--gn-ui-badge-font-weight]=\"'700'\"\n [removable]=\"true\"\n (badgeRemoveClicked)=\"removeFilterValue(fieldValue.value)\"\n >{{ fieldValue.label }}</gn-ui-badge\n >\n }\n </div>\n}\n" }]
|
|
32059
32584
|
}], propDecorators: { fieldName: [{
|
|
32060
32585
|
type: Input
|
|
32061
32586
|
}] } });
|
|
@@ -32299,11 +32824,11 @@ class AddLayerFromFileComponent {
|
|
|
32299
32824
|
}, 5000);
|
|
32300
32825
|
}
|
|
32301
32826
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AddLayerFromFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32302
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AddLayerFromFileComponent, isStandalone: true, selector: "gn-ui-add-layer-from-file", ngImport: i0, template: "<div class=\"flex flex-col gap-2 my-2\">\n <div class=\"flex items-center gap-4\">\n <div class=\"grow rounded-md border-2 border-gray-200\">\n <gn-ui-drag-and-drop-file-input\n (fileChange)=\"handleFileChange($event)\"\n [accept]=\"acceptedMimeType.join(',')\"\n [placeholder]=\"'map.addFromFile.placeholder' | translate\"\n class=\"placeholder-grey\"\n ></gn-ui-drag-and-drop-file-input>\n </div>\n </div>\n <p class=\"text-sm text-gray-600\" translate>map.help.addFromFile</p>\n</div>\n\n@if (errorMessage) {\n <div class=\"text-red-500 mt-2\">\n {{ errorMessage }}\n </div>\n}\n\n@if (successMessage) {\n <div class=\"text-green-500 mt-2\">\n {{ successMessage }}\n </div>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: DragAndDropFileInputComponent, selector: "gn-ui-drag-and-drop-file-input", inputs: ["placeholder", "accept"], outputs: ["fileChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
32827
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AddLayerFromFileComponent, isStandalone: true, selector: "gn-ui-add-layer-from-file", ngImport: i0, template: "<div class=\"flex flex-col gap-2 my-2\">\n <div class=\"flex items-center gap-4\">\n <div class=\"grow rounded-md border-2 border-gray-200\">\n <gn-ui-drag-and-drop-file-input\n (fileChange)=\"handleFileChange($event)\"\n [accept]=\"acceptedMimeType.join(',')\"\n [placeholder]=\"'map.addFromFile.placeholder' | translate\"\n textClass=\"text-gray-900 pl-2 py-2\"\n class=\"placeholder-grey\"\n ></gn-ui-drag-and-drop-file-input>\n </div>\n </div>\n <p class=\"text-sm text-gray-600\" translate>map.help.addFromFile</p>\n</div>\n\n@if (errorMessage) {\n <div class=\"text-red-500 mt-2\">\n {{ errorMessage }}\n </div>\n}\n\n@if (successMessage) {\n <div class=\"text-green-500 mt-2\">\n {{ successMessage }}\n </div>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { 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" }] }); }
|
|
32303
32828
|
}
|
|
32304
32829
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AddLayerFromFileComponent, decorators: [{
|
|
32305
32830
|
type: Component,
|
|
32306
|
-
args: [{ selector: 'gn-ui-add-layer-from-file', standalone: true, imports: [TranslateDirective, TranslatePipe, DragAndDropFileInputComponent], template: "<div class=\"flex flex-col gap-2 my-2\">\n <div class=\"flex items-center gap-4\">\n <div class=\"grow rounded-md border-2 border-gray-200\">\n <gn-ui-drag-and-drop-file-input\n (fileChange)=\"handleFileChange($event)\"\n [accept]=\"acceptedMimeType.join(',')\"\n [placeholder]=\"'map.addFromFile.placeholder' | translate\"\n class=\"placeholder-grey\"\n ></gn-ui-drag-and-drop-file-input>\n </div>\n </div>\n <p class=\"text-sm text-gray-600\" translate>map.help.addFromFile</p>\n</div>\n\n@if (errorMessage) {\n <div class=\"text-red-500 mt-2\">\n {{ errorMessage }}\n </div>\n}\n\n@if (successMessage) {\n <div class=\"text-green-500 mt-2\">\n {{ successMessage }}\n </div>\n}\n" }]
|
|
32831
|
+
args: [{ selector: 'gn-ui-add-layer-from-file', standalone: true, imports: [TranslateDirective, TranslatePipe, DragAndDropFileInputComponent], template: "<div class=\"flex flex-col gap-2 my-2\">\n <div class=\"flex items-center gap-4\">\n <div class=\"grow rounded-md border-2 border-gray-200\">\n <gn-ui-drag-and-drop-file-input\n (fileChange)=\"handleFileChange($event)\"\n [accept]=\"acceptedMimeType.join(',')\"\n [placeholder]=\"'map.addFromFile.placeholder' | translate\"\n textClass=\"text-gray-900 pl-2 py-2\"\n class=\"placeholder-grey\"\n ></gn-ui-drag-and-drop-file-input>\n </div>\n </div>\n <p class=\"text-sm text-gray-600\" translate>map.help.addFromFile</p>\n</div>\n\n@if (errorMessage) {\n <div class=\"text-red-500 mt-2\">\n {{ errorMessage }}\n </div>\n}\n\n@if (successMessage) {\n <div class=\"text-green-500 mt-2\">\n {{ successMessage }}\n </div>\n}\n" }]
|
|
32307
32832
|
}] });
|
|
32308
32833
|
|
|
32309
32834
|
class LayersPanelComponent {
|
|
@@ -32468,8 +32993,7 @@ const closeMetadata = createAction('[Metadata view] close');
|
|
|
32468
32993
|
Related actions
|
|
32469
32994
|
*/
|
|
32470
32995
|
const setRelated = createAction('[Metadata view] Set related records', props());
|
|
32471
|
-
const
|
|
32472
|
-
const setSourceOf = createAction('[Metadata view] Set has sources', props());
|
|
32996
|
+
const setLinkedRecords = createAction('[Metadata view] Set associated records', props());
|
|
32473
32997
|
/*
|
|
32474
32998
|
ChartConfig actions
|
|
32475
32999
|
*/
|
|
@@ -32501,9 +33025,8 @@ var mdview_actions = /*#__PURE__*/Object.freeze({
|
|
|
32501
33025
|
loadUserFeedbacksSuccess: loadUserFeedbacksSuccess,
|
|
32502
33026
|
setChartConfig: setChartConfig,
|
|
32503
33027
|
setIncompleteMetadata: setIncompleteMetadata,
|
|
32504
|
-
|
|
32505
|
-
|
|
32506
|
-
setSources: setSources
|
|
33028
|
+
setLinkedRecords: setLinkedRecords,
|
|
33029
|
+
setRelated: setRelated
|
|
32507
33030
|
});
|
|
32508
33031
|
|
|
32509
33032
|
const METADATA_VIEW_FEATURE_STATE_KEY = 'metadataView';
|
|
@@ -32546,12 +33069,9 @@ on(loadFullMetadata, (state) => ({
|
|
|
32546
33069
|
on(setRelated, (state, { related }) => ({
|
|
32547
33070
|
...state,
|
|
32548
33071
|
related,
|
|
32549
|
-
})), on(
|
|
33072
|
+
})), on(setLinkedRecords, (state, { linkedRecords }) => ({
|
|
32550
33073
|
...state,
|
|
32551
|
-
|
|
32552
|
-
})), on(setSourceOf, (state, { sourceOf }) => ({
|
|
32553
|
-
...state,
|
|
32554
|
-
sourceOf,
|
|
33074
|
+
linkedRecords,
|
|
32555
33075
|
})),
|
|
32556
33076
|
/*
|
|
32557
33077
|
ChartConfig reducers
|
|
@@ -32613,8 +33133,7 @@ const getMetadataError = createSelector(getMdViewState, (state) => state.error);
|
|
|
32613
33133
|
Related selectors
|
|
32614
33134
|
*/
|
|
32615
33135
|
const getRelated = createSelector(getMdViewState, (state) => state.related);
|
|
32616
|
-
const
|
|
32617
|
-
const getSourceOf = createSelector(getMdViewState, (state) => state.sourceOf);
|
|
33136
|
+
const getLinkedRecords = createSelector(getMdViewState, (state) => state.linkedRecords);
|
|
32618
33137
|
/*
|
|
32619
33138
|
Metadata selectors
|
|
32620
33139
|
*/
|
|
@@ -32715,212 +33234,10 @@ function parseHeaders(httpHeaders) {
|
|
|
32715
33234
|
return result;
|
|
32716
33235
|
}
|
|
32717
33236
|
|
|
32718
|
-
|
|
32719
|
-
|
|
32720
|
-
|
|
32721
|
-
? fileExtensionMatches[1].toLowerCase()
|
|
32722
|
-
: null;
|
|
32723
|
-
// 1. type hint
|
|
32724
|
-
if (typeHint)
|
|
32725
|
-
return Promise.resolve(typeHint);
|
|
32726
|
-
// 2. content-type header
|
|
32727
|
-
const headers = await fetchHeaders(url);
|
|
32728
|
-
if ('supportedType' in headers)
|
|
32729
|
-
return headers.supportedType;
|
|
32730
|
-
// 3. file extension from url
|
|
32731
|
-
else if (SupportedTypes.indexOf(fileExtension) > -1)
|
|
32732
|
-
return fileExtension;
|
|
32733
|
-
// no type inferred or hinted
|
|
32734
|
-
if ('mimeType' in headers)
|
|
32735
|
-
throw FetchError.unsupportedType(headers.mimeType);
|
|
32736
|
-
else
|
|
32737
|
-
throw FetchError.unknownType();
|
|
32738
|
-
}
|
|
32739
|
-
function fetchHeaders(url) {
|
|
32740
|
-
return sharedFetch(url, 'HEAD')
|
|
32741
|
-
.catch((error) => {
|
|
32742
|
-
throw FetchError.corsOrNetwork(error.message);
|
|
32743
|
-
})
|
|
32744
|
-
.then((response) => {
|
|
32745
|
-
if (!response.ok) {
|
|
32746
|
-
throw FetchError.http(response.status);
|
|
32747
|
-
}
|
|
32748
|
-
return parseHeaders(response.headers);
|
|
32749
|
-
});
|
|
33237
|
+
const GEOMETRY_COLUMN_ALIAS = '__geometry__';
|
|
33238
|
+
function fieldToSql(name) {
|
|
33239
|
+
return `"${name.replace(/"/g, '""')}"`; // escape double quotes in field names
|
|
32750
33240
|
}
|
|
32751
|
-
function fetchDataAsText(url, cacheActive) {
|
|
32752
|
-
const fetchFactory = () => sharedFetch(url)
|
|
32753
|
-
.catch((error) => {
|
|
32754
|
-
throw FetchError.corsOrNetwork(error.message);
|
|
32755
|
-
})
|
|
32756
|
-
.then(async (response) => {
|
|
32757
|
-
if (!response.ok) {
|
|
32758
|
-
const clonedResponse = response.clone();
|
|
32759
|
-
throw FetchError.http(response.status, await clonedResponse.text());
|
|
32760
|
-
}
|
|
32761
|
-
const clonedResponse = response.clone();
|
|
32762
|
-
return clonedResponse.text();
|
|
32763
|
-
});
|
|
32764
|
-
return cacheActive ? useCache(fetchFactory, url, 'asText') : fetchFactory();
|
|
32765
|
-
}
|
|
32766
|
-
function fetchDataAsArrayBuffer(url, cacheActive) {
|
|
32767
|
-
const fetchFactory = () => sharedFetch(url)
|
|
32768
|
-
.catch((error) => {
|
|
32769
|
-
throw FetchError.corsOrNetwork(error.message);
|
|
32770
|
-
})
|
|
32771
|
-
.then(async (response) => {
|
|
32772
|
-
if (!response.ok) {
|
|
32773
|
-
throw FetchError.http(response.status, await response.text());
|
|
32774
|
-
}
|
|
32775
|
-
// convert to a numeric array so that we can store the response in cache
|
|
32776
|
-
return Array.from(new Uint8Array(await response.arrayBuffer()));
|
|
32777
|
-
});
|
|
32778
|
-
return (cacheActive ? useCache(fetchFactory, url, 'asArrayBuffer') : fetchFactory()).then((array) => {
|
|
32779
|
-
return new Uint8Array(array).buffer;
|
|
32780
|
-
});
|
|
32781
|
-
}
|
|
32782
|
-
function tryParseDate(input) {
|
|
32783
|
-
if (typeof input !== 'string')
|
|
32784
|
-
return null;
|
|
32785
|
-
function tryIso(value) {
|
|
32786
|
-
const parsed = parseISO(value);
|
|
32787
|
-
return isNaN(parsed.getDate()) ? null : parsed;
|
|
32788
|
-
}
|
|
32789
|
-
function tryFormat(value, format) {
|
|
32790
|
-
const parsed = parse$4(value, format, new Date());
|
|
32791
|
-
return isNaN(parsed.getDate()) ? null : parsed;
|
|
32792
|
-
}
|
|
32793
|
-
return (tryIso(input) ||
|
|
32794
|
-
tryFormat(input, 'dd/MM/yyyy') ||
|
|
32795
|
-
tryFormat(input, 'dd.MM.yyyy') ||
|
|
32796
|
-
tryFormat(input, 'MM/dd/yyyy') ||
|
|
32797
|
-
null);
|
|
32798
|
-
}
|
|
32799
|
-
function tryParseNumber(input) {
|
|
32800
|
-
if (isNaN(input))
|
|
32801
|
-
return null;
|
|
32802
|
-
const parsed = parseFloat(input);
|
|
32803
|
-
return isNaN(parsed) ? null : parsed;
|
|
32804
|
-
}
|
|
32805
|
-
function jsonToGeojsonFeature(object) {
|
|
32806
|
-
const { id, properties } = Object.keys(object)
|
|
32807
|
-
.map((property) => (property ? property : 'unknown')) //prevent empty strings
|
|
32808
|
-
.reduce((prev, curr) => curr.toLowerCase().endsWith('id')
|
|
32809
|
-
? {
|
|
32810
|
-
...prev,
|
|
32811
|
-
id: object[curr],
|
|
32812
|
-
}
|
|
32813
|
-
: {
|
|
32814
|
-
...prev,
|
|
32815
|
-
properties: { ...prev.properties, [curr]: object[curr] },
|
|
32816
|
-
}, { id: undefined, properties: {} });
|
|
32817
|
-
return {
|
|
32818
|
-
type: 'Feature',
|
|
32819
|
-
geometry: null,
|
|
32820
|
-
properties,
|
|
32821
|
-
...(id !== undefined && { id }),
|
|
32822
|
-
};
|
|
32823
|
-
}
|
|
32824
|
-
function mutateProperties(items, mutators) {
|
|
32825
|
-
const mutatorKeys = Object.keys(mutators);
|
|
32826
|
-
for (let i = 0, ii = items.length; i < ii; i++) {
|
|
32827
|
-
const item = items[i];
|
|
32828
|
-
for (const mutatorField of mutatorKeys) {
|
|
32829
|
-
if (!(mutatorField in item.properties))
|
|
32830
|
-
continue;
|
|
32831
|
-
item.properties[mutatorField] = mutators[mutatorField](item.properties[mutatorField]);
|
|
32832
|
-
}
|
|
32833
|
-
}
|
|
32834
|
-
return items;
|
|
32835
|
-
}
|
|
32836
|
-
const SAMPLE_SIZE = 20;
|
|
32837
|
-
/**
|
|
32838
|
-
* This will infer field types from a list of data items and cast the values accordingly
|
|
32839
|
-
* @param items
|
|
32840
|
-
* @param inferTypes
|
|
32841
|
-
*/
|
|
32842
|
-
function processItemProperties(items, inferTypes = false) {
|
|
32843
|
-
const foundFields = {};
|
|
32844
|
-
for (let i = 0, ii = Math.min(SAMPLE_SIZE, items.length); i < ii; i++) {
|
|
32845
|
-
const item = items[i];
|
|
32846
|
-
const fields = Object.keys(item.properties);
|
|
32847
|
-
for (const field of fields) {
|
|
32848
|
-
if (!(field in foundFields)) {
|
|
32849
|
-
foundFields[field] = {
|
|
32850
|
-
label: field,
|
|
32851
|
-
name: field,
|
|
32852
|
-
type: null,
|
|
32853
|
-
};
|
|
32854
|
-
}
|
|
32855
|
-
const value = item.properties[field];
|
|
32856
|
-
const info = foundFields[field];
|
|
32857
|
-
if (value === undefined || value === '' || value === null)
|
|
32858
|
-
continue;
|
|
32859
|
-
if (!inferTypes) {
|
|
32860
|
-
if (info.type === null && typeof value === 'number') {
|
|
32861
|
-
info.type = 'number';
|
|
32862
|
-
}
|
|
32863
|
-
else if (info.type === 'number' && typeof value !== 'number') {
|
|
32864
|
-
info.type = 'string';
|
|
32865
|
-
}
|
|
32866
|
-
continue;
|
|
32867
|
-
}
|
|
32868
|
-
const parsedNumber = tryParseNumber(value);
|
|
32869
|
-
if (info.type === null && parsedNumber !== null) {
|
|
32870
|
-
info.type = 'number';
|
|
32871
|
-
continue;
|
|
32872
|
-
}
|
|
32873
|
-
else if (info.type === 'number' && parsedNumber === null) {
|
|
32874
|
-
info.type = 'string';
|
|
32875
|
-
continue;
|
|
32876
|
-
}
|
|
32877
|
-
const parsedDate = tryParseDate(value);
|
|
32878
|
-
if (info.type === null && parsedDate !== null) {
|
|
32879
|
-
info.type = 'date';
|
|
32880
|
-
}
|
|
32881
|
-
else if (info.type === 'date' && parsedDate === null) {
|
|
32882
|
-
info.type = 'string';
|
|
32883
|
-
}
|
|
32884
|
-
}
|
|
32885
|
-
}
|
|
32886
|
-
const properties = [];
|
|
32887
|
-
const mutators = {};
|
|
32888
|
-
for (const field in foundFields) {
|
|
32889
|
-
const info = foundFields[field];
|
|
32890
|
-
if (info.type === 'number') {
|
|
32891
|
-
mutators[field] = tryParseNumber;
|
|
32892
|
-
}
|
|
32893
|
-
else if (info.type === 'date') {
|
|
32894
|
-
mutators[field] = tryParseDate;
|
|
32895
|
-
}
|
|
32896
|
-
properties.push({ ...info, type: info.type || 'string' });
|
|
32897
|
-
}
|
|
32898
|
-
if (inferTypes) {
|
|
32899
|
-
mutateProperties(items, mutators);
|
|
32900
|
-
}
|
|
32901
|
-
return { items, properties };
|
|
32902
|
-
}
|
|
32903
|
-
/**
|
|
32904
|
-
* This creates a Proxy that allows reading and writing to the data item properties
|
|
32905
|
-
* as if it was a simple array of JSON objects
|
|
32906
|
-
* @param items
|
|
32907
|
-
*/
|
|
32908
|
-
function getJsonDataItemsProxy(items) {
|
|
32909
|
-
return new Proxy(items, {
|
|
32910
|
-
get(target, p) {
|
|
32911
|
-
if (typeof p === 'string' &&
|
|
32912
|
-
!Number.isNaN(parseInt(p)) &&
|
|
32913
|
-
target[p]?.properties) {
|
|
32914
|
-
return target[p].properties;
|
|
32915
|
-
}
|
|
32916
|
-
return target[p];
|
|
32917
|
-
},
|
|
32918
|
-
set() {
|
|
32919
|
-
throw new Error('This object is read-only');
|
|
32920
|
-
},
|
|
32921
|
-
});
|
|
32922
|
-
}
|
|
32923
|
-
|
|
32924
33241
|
function filterToSql(filter) {
|
|
32925
33242
|
const operator = filter[0];
|
|
32926
33243
|
const args = filter.slice(1);
|
|
@@ -32935,10 +33252,10 @@ function filterToSql(filter) {
|
|
|
32935
33252
|
case '=':
|
|
32936
33253
|
case '!=':
|
|
32937
33254
|
case 'like':
|
|
32938
|
-
return
|
|
33255
|
+
return `${fieldToSql(args[0])} ${operator.toUpperCase()} ${valueToSql(args[1])}`;
|
|
32939
33256
|
case 'in': {
|
|
32940
33257
|
const values = args.slice(1);
|
|
32941
|
-
return
|
|
33258
|
+
return `${fieldToSql(args[0])} IN (${values.map(valueToSql).join(', ')})`;
|
|
32942
33259
|
}
|
|
32943
33260
|
case 'and':
|
|
32944
33261
|
case 'or': {
|
|
@@ -32957,17 +33274,18 @@ function aggregationToSql(aggregation) {
|
|
|
32957
33274
|
const field = aggregation[1];
|
|
32958
33275
|
switch (operation) {
|
|
32959
33276
|
case 'average':
|
|
32960
|
-
return `AVG(
|
|
33277
|
+
return `CAST(AVG(${fieldToSql(field)}) AS DOUBLE) as ${fieldToSql(`average(${field})`)}`;
|
|
32961
33278
|
case 'sum':
|
|
32962
33279
|
case 'max':
|
|
32963
33280
|
case 'min':
|
|
32964
|
-
return
|
|
33281
|
+
return `CAST(${operation.toUpperCase()}(${fieldToSql(field)}) AS DOUBLE) as ${fieldToSql(`${operation}(${field})`)}`;
|
|
32965
33282
|
case 'count':
|
|
32966
|
-
return 'COUNT(*) as
|
|
33283
|
+
return 'CAST(COUNT(*) AS INTEGER) as "count()"'; // we don't need Bigint precision here
|
|
32967
33284
|
}
|
|
32968
33285
|
}
|
|
32969
33286
|
/**
|
|
32970
33287
|
* Leave arguments at null if not used
|
|
33288
|
+
* @param tableName
|
|
32971
33289
|
* @param selected
|
|
32972
33290
|
* @param filter
|
|
32973
33291
|
* @param sort
|
|
@@ -32976,22 +33294,25 @@ function aggregationToSql(aggregation) {
|
|
|
32976
33294
|
* @param groupBy
|
|
32977
33295
|
* @param aggregations
|
|
32978
33296
|
*/
|
|
32979
|
-
function generateSqlQuery(selected = null, filter = null, sort = null, startIndex = null, count = null, groupBy = null, aggregations = null) {
|
|
33297
|
+
function generateSqlQuery(tableName, selected = null, filter = null, sort = null, startIndex = null, count = null, groupBy = null, aggregations = null, geometryColumn = null) {
|
|
32980
33298
|
let sqlSelect = 'SELECT *';
|
|
32981
|
-
const sqlFrom =
|
|
33299
|
+
const sqlFrom = ` FROM ${tableName}`;
|
|
32982
33300
|
let sqlOrderBy = '';
|
|
32983
33301
|
let sqlWhere = '';
|
|
32984
33302
|
let sqlLimit = '';
|
|
32985
33303
|
let sqlGroupBy = '';
|
|
32986
33304
|
if (selected !== null) {
|
|
32987
|
-
sqlSelect = `SELECT ${selected.map(
|
|
33305
|
+
sqlSelect = `SELECT ${selected.map(fieldToSql).join(', ')}`;
|
|
33306
|
+
}
|
|
33307
|
+
if (geometryColumn !== null) {
|
|
33308
|
+
sqlSelect += `, ST_AsGeoJSON(${fieldToSql(geometryColumn)}) as ${GEOMETRY_COLUMN_ALIAS}`;
|
|
32988
33309
|
}
|
|
32989
33310
|
if (filter !== null) {
|
|
32990
33311
|
sqlWhere = ` WHERE ${filterToSql(filter)}`;
|
|
32991
33312
|
}
|
|
32992
33313
|
if (sort?.length) {
|
|
32993
33314
|
sqlOrderBy = ` ORDER BY ${sort
|
|
32994
|
-
.map((sort) =>
|
|
33315
|
+
.map((sort) => `${fieldToSql(sort[1])} ${sort[0].toUpperCase()}`)
|
|
32995
33316
|
.join(', ')}`;
|
|
32996
33317
|
}
|
|
32997
33318
|
if (startIndex !== null && count !== null) {
|
|
@@ -33001,17 +33322,212 @@ function generateSqlQuery(selected = null, filter = null, sort = null, startInde
|
|
|
33001
33322
|
sqlSelect = `SELECT ${aggregations.map(aggregationToSql).join(', ')}`;
|
|
33002
33323
|
const groupedByDistinct = groupBy.filter((group) => group[0] === 'distinct');
|
|
33003
33324
|
const sqlGroupByFields = groupedByDistinct
|
|
33004
|
-
.map((group) =>
|
|
33325
|
+
.map((group) => fieldToSql(group[1]))
|
|
33005
33326
|
.join(', ');
|
|
33006
33327
|
const sqlGroupBySelect = groupedByDistinct
|
|
33007
|
-
.map((group) =>
|
|
33328
|
+
.map((group) => `${fieldToSql(group[1])} as ${fieldToSql(`distinct(${group[1]})`)}`)
|
|
33008
33329
|
.join(', ');
|
|
33009
33330
|
if (sqlGroupByFields && sqlGroupBySelect) {
|
|
33010
33331
|
sqlGroupBy = ` GROUP BY ${sqlGroupByFields}`;
|
|
33011
33332
|
sqlSelect += `, ${sqlGroupBySelect}`;
|
|
33012
33333
|
}
|
|
33013
33334
|
}
|
|
33014
|
-
return sqlSelect + sqlFrom + sqlGroupBy +
|
|
33335
|
+
return sqlSelect + sqlFrom + sqlGroupBy + sqlWhere + sqlOrderBy + sqlLimit;
|
|
33336
|
+
}
|
|
33337
|
+
|
|
33338
|
+
function arrowTableToDataItems(table) {
|
|
33339
|
+
const fields = table.schema.fields;
|
|
33340
|
+
return table.toArray().map((row) => {
|
|
33341
|
+
const rowJson = row.toJSON();
|
|
33342
|
+
const feature = {
|
|
33343
|
+
type: 'Feature',
|
|
33344
|
+
geometry: null,
|
|
33345
|
+
properties: {},
|
|
33346
|
+
};
|
|
33347
|
+
const keys = Object.keys(rowJson);
|
|
33348
|
+
for (let i = 0; i < keys.length; i++) {
|
|
33349
|
+
const key = keys[i];
|
|
33350
|
+
const dataType = fields[i].type;
|
|
33351
|
+
let value = rowJson[key];
|
|
33352
|
+
// this might happen if we get an array inside a field
|
|
33353
|
+
if (value instanceof Vector) {
|
|
33354
|
+
value = Array.from(value);
|
|
33355
|
+
}
|
|
33356
|
+
// cast bigints to ints
|
|
33357
|
+
if (typeof value === 'bigint') {
|
|
33358
|
+
value = Number(value);
|
|
33359
|
+
}
|
|
33360
|
+
// rename columns with empty name
|
|
33361
|
+
if (!key) {
|
|
33362
|
+
feature.properties['unknown'] = value;
|
|
33363
|
+
continue;
|
|
33364
|
+
}
|
|
33365
|
+
// assign properties that look like an id to the geojson `id` field
|
|
33366
|
+
if (/^(object|feature)?_?id$/.test(key.toLowerCase()) &&
|
|
33367
|
+
(typeof value == 'string' || typeof value === 'number')) {
|
|
33368
|
+
feature.id = value;
|
|
33369
|
+
}
|
|
33370
|
+
// if a date is in timestamp (number) format, convert it to native
|
|
33371
|
+
if (typeof value === 'number' &&
|
|
33372
|
+
(DataType.isTimestamp(dataType) || DataType.isDate(dataType))) {
|
|
33373
|
+
value = new Date(value);
|
|
33374
|
+
}
|
|
33375
|
+
// if a binary field (most likely a geometry column): skip
|
|
33376
|
+
if (DataType.isBinary(dataType)) {
|
|
33377
|
+
continue;
|
|
33378
|
+
}
|
|
33379
|
+
// geometry column
|
|
33380
|
+
if (key === GEOMETRY_COLUMN_ALIAS && DataType.isUtf8(dataType)) {
|
|
33381
|
+
feature.geometry = JSON.parse(value);
|
|
33382
|
+
continue;
|
|
33383
|
+
}
|
|
33384
|
+
feature.properties[key] = value;
|
|
33385
|
+
}
|
|
33386
|
+
return feature;
|
|
33387
|
+
});
|
|
33388
|
+
}
|
|
33389
|
+
|
|
33390
|
+
// init code taken from https://github.com/duckdb/duckdb-wasm/blob/main/packages/duckdb-wasm/README.md
|
|
33391
|
+
const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles();
|
|
33392
|
+
// from https://duckdb.org/docs/current/sql/data_types/overview
|
|
33393
|
+
const typesMapping = {
|
|
33394
|
+
INTEGER: 'number',
|
|
33395
|
+
SMALLINT: 'number',
|
|
33396
|
+
TINYINT: 'number',
|
|
33397
|
+
BIGINT: 'number',
|
|
33398
|
+
HUGEINT: 'number',
|
|
33399
|
+
UINTEGER: 'number',
|
|
33400
|
+
USMALLINT: 'number',
|
|
33401
|
+
UTINYINT: 'number',
|
|
33402
|
+
UBIGINT: 'number',
|
|
33403
|
+
UHUGEINT: 'number',
|
|
33404
|
+
DOUBLE: 'number',
|
|
33405
|
+
BIGNUM: 'number',
|
|
33406
|
+
DECIMAL: 'number',
|
|
33407
|
+
NUMERIC: 'number',
|
|
33408
|
+
FLOAT: 'number',
|
|
33409
|
+
REAL: 'number',
|
|
33410
|
+
'TIMESTAMP WITH TIME ZONE': 'date',
|
|
33411
|
+
TIMESTAMP: 'date',
|
|
33412
|
+
DATE: 'date',
|
|
33413
|
+
CHAR: 'string',
|
|
33414
|
+
VARCHAR: 'string',
|
|
33415
|
+
TEXT: 'string',
|
|
33416
|
+
UUID: 'string',
|
|
33417
|
+
BLOB: 'string',
|
|
33418
|
+
BIT: 'string',
|
|
33419
|
+
INTERVAL: 'string',
|
|
33420
|
+
LIST: 'string',
|
|
33421
|
+
BOOLEAN: 'boolean',
|
|
33422
|
+
};
|
|
33423
|
+
class Engine {
|
|
33424
|
+
async makeInit() {
|
|
33425
|
+
const bundle = await duckdb.selectBundle(JSDELIVR_BUNDLES);
|
|
33426
|
+
let worker_url = bundle.mainWorker;
|
|
33427
|
+
// this is necessary to let browsers execute WASM code coming from a cross-origin host
|
|
33428
|
+
if (worker_url.startsWith('https://')) {
|
|
33429
|
+
worker_url = URL.createObjectURL(new Blob([`importScripts("${worker_url}");`], {
|
|
33430
|
+
type: 'text/javascript',
|
|
33431
|
+
}));
|
|
33432
|
+
}
|
|
33433
|
+
const worker = new Worker(worker_url);
|
|
33434
|
+
const logger = new duckdb.ConsoleLogger(duckdb.LogLevel.WARNING);
|
|
33435
|
+
this.db = new duckdb.AsyncDuckDB(logger, worker);
|
|
33436
|
+
await this.db.instantiate(bundle.mainModule, bundle.pthreadWorker);
|
|
33437
|
+
// setup duckdb options
|
|
33438
|
+
const conn = await this.db.connect();
|
|
33439
|
+
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
33440
|
+
await conn.query(`INSTALL spatial; LOAD spatial;`);
|
|
33441
|
+
await conn.query(`SET TimeZone = '${timezone}';`);
|
|
33442
|
+
await conn.query(`SET threads = 1;`);
|
|
33443
|
+
// await conn.query(`SET memory_limit = '2GB';`) // used for experimenting when we encounter memory issues
|
|
33444
|
+
await conn.query(`SET preserve_insertion_order = false;`); // this reduces memory usage when loading a dataset
|
|
33445
|
+
conn.close();
|
|
33446
|
+
return this;
|
|
33447
|
+
}
|
|
33448
|
+
isReady() {
|
|
33449
|
+
if (!this.init_) {
|
|
33450
|
+
this.init_ = this.makeInit();
|
|
33451
|
+
}
|
|
33452
|
+
return this.init_;
|
|
33453
|
+
}
|
|
33454
|
+
/**
|
|
33455
|
+
* Returns information about a dataset once it's loaded:
|
|
33456
|
+
* - a list of properties description
|
|
33457
|
+
* - the name of the dataset geometry column (null if no geometry present)
|
|
33458
|
+
* @param datasetId name of the table under which the dataset will be stored
|
|
33459
|
+
* @param loadQuery duckdb-specific query for creating a table out of the data
|
|
33460
|
+
* @param forceReload if true, any existing data will be dropped and redownloaded
|
|
33461
|
+
*/
|
|
33462
|
+
async loadFile(datasetId, loadQuery, forceReload = false) {
|
|
33463
|
+
const conn = await this.db.connect();
|
|
33464
|
+
let results;
|
|
33465
|
+
// either we want to recreate the table, or we keep it if it already exists
|
|
33466
|
+
const safeLoadQuery = forceReload
|
|
33467
|
+
? `DROP TABLE IF EXISTS ${datasetId};
|
|
33468
|
+
${loadQuery}`
|
|
33469
|
+
: loadQuery.replace(/CREATE TABLE(?! IF NOT EXISTS)/gi, 'CREATE TABLE IF NOT EXISTS');
|
|
33470
|
+
// create the table
|
|
33471
|
+
try {
|
|
33472
|
+
results = await conn.query(safeLoadQuery);
|
|
33473
|
+
}
|
|
33474
|
+
catch (e) {
|
|
33475
|
+
throw new FetchError('parse', `DuckDB encountered an error when loading the data: ${e.message}`);
|
|
33476
|
+
}
|
|
33477
|
+
// read rows count
|
|
33478
|
+
results = await conn.query(`SELECT count(*) FROM ${datasetId}`);
|
|
33479
|
+
const { 'count_star()': recordsCount } = results.toArray()[0].toJSON();
|
|
33480
|
+
// read columns
|
|
33481
|
+
results = await conn.query(`SELECT * FROM information_schema.columns WHERE table_name = '${datasetId}';`);
|
|
33482
|
+
let geometryColumn = null;
|
|
33483
|
+
const properties = results
|
|
33484
|
+
.toArray()
|
|
33485
|
+
.map((row) => {
|
|
33486
|
+
const rowObj = row.toJSON();
|
|
33487
|
+
if (rowObj['data_type'] === 'GEOMETRY') {
|
|
33488
|
+
// the geometry is not part of the properties
|
|
33489
|
+
// note: right now we only keep one geometry column name, but if there are multiple they will
|
|
33490
|
+
// all get discarded
|
|
33491
|
+
geometryColumn = rowObj['column_name'];
|
|
33492
|
+
return null;
|
|
33493
|
+
}
|
|
33494
|
+
return {
|
|
33495
|
+
name: rowObj['column_name'],
|
|
33496
|
+
label: rowObj['column_name'],
|
|
33497
|
+
type: typesMapping[rowObj['data_type']] ?? 'other',
|
|
33498
|
+
};
|
|
33499
|
+
})
|
|
33500
|
+
.filter((prop) => prop !== null);
|
|
33501
|
+
conn.close();
|
|
33502
|
+
return {
|
|
33503
|
+
properties,
|
|
33504
|
+
geometryColumn,
|
|
33505
|
+
rowsCount: Number(recordsCount),
|
|
33506
|
+
};
|
|
33507
|
+
}
|
|
33508
|
+
// register a Uint8 buffer using a handle in the duckdb instance
|
|
33509
|
+
async registerData(name, buffer) {
|
|
33510
|
+
return this.db.registerFileBuffer(name, buffer);
|
|
33511
|
+
}
|
|
33512
|
+
/**
|
|
33513
|
+
* @param query duckdb-specific query for fetching items
|
|
33514
|
+
*/
|
|
33515
|
+
async queryItems(query) {
|
|
33516
|
+
const conn = await this.db.connect();
|
|
33517
|
+
const results = await conn.query(query);
|
|
33518
|
+
conn.close();
|
|
33519
|
+
return arrowTableToDataItems(results);
|
|
33520
|
+
}
|
|
33521
|
+
close() {
|
|
33522
|
+
this.db?.terminate();
|
|
33523
|
+
}
|
|
33524
|
+
}
|
|
33525
|
+
let engine = null;
|
|
33526
|
+
async function getEngine() {
|
|
33527
|
+
if (!engine) {
|
|
33528
|
+
engine = new Engine();
|
|
33529
|
+
}
|
|
33530
|
+
return engine.isReady();
|
|
33015
33531
|
}
|
|
33016
33532
|
|
|
33017
33533
|
class BaseReader {
|
|
@@ -33024,10 +33540,18 @@ class BaseReader {
|
|
|
33024
33540
|
this.sort = null;
|
|
33025
33541
|
this.startIndex = null;
|
|
33026
33542
|
this.count = null;
|
|
33543
|
+
this.loadPromise_ = Promise.resolve();
|
|
33544
|
+
this.cacheEnabled = false;
|
|
33545
|
+
}
|
|
33546
|
+
enableCache(enabled) {
|
|
33547
|
+
this.cacheEnabled = enabled;
|
|
33027
33548
|
}
|
|
33028
33549
|
load() {
|
|
33029
33550
|
throw new Error('not implemented');
|
|
33030
33551
|
}
|
|
33552
|
+
get isLoaded() {
|
|
33553
|
+
return this.loadPromise_;
|
|
33554
|
+
}
|
|
33031
33555
|
get properties() {
|
|
33032
33556
|
throw new Error('not implemented');
|
|
33033
33557
|
}
|
|
@@ -33076,178 +33600,237 @@ class BaseReader {
|
|
|
33076
33600
|
}
|
|
33077
33601
|
}
|
|
33078
33602
|
|
|
33079
|
-
|
|
33080
|
-
|
|
33081
|
-
|
|
33082
|
-
|
|
33083
|
-
|
|
33084
|
-
|
|
33085
|
-
|
|
33086
|
-
|
|
33087
|
-
|
|
33088
|
-
|
|
33089
|
-
|
|
33090
|
-
|
|
33091
|
-
|
|
33603
|
+
/**
|
|
33604
|
+
* This reader handles file formats supported natively by DuckDB
|
|
33605
|
+
*/
|
|
33606
|
+
class BaseFileReader extends BaseReader {
|
|
33607
|
+
// a table id should not exceed 63 chars
|
|
33608
|
+
generateDatasetId() {
|
|
33609
|
+
// generate a hash out of the url
|
|
33610
|
+
let hash = 0;
|
|
33611
|
+
for (const char of this.url) {
|
|
33612
|
+
hash = (hash << 5) - hash + char.charCodeAt(0);
|
|
33613
|
+
hash = hash >>> 0; // make it unsigned
|
|
33614
|
+
}
|
|
33615
|
+
return `datafetcher_${hash.toString(16)}`;
|
|
33616
|
+
}
|
|
33617
|
+
async getLoadQuery() {
|
|
33092
33618
|
throw new Error('not implemented');
|
|
33093
33619
|
}
|
|
33094
|
-
load() {
|
|
33095
|
-
this.
|
|
33620
|
+
async load() {
|
|
33621
|
+
this.datasetId = this.generateDatasetId();
|
|
33622
|
+
this.loadPromise_ = getEngine()
|
|
33623
|
+
.then((engine) => {
|
|
33624
|
+
this.engine = engine;
|
|
33625
|
+
return this.getLoadQuery();
|
|
33626
|
+
})
|
|
33627
|
+
.then((loadQuery) => this.engine.loadFile(this.datasetId, loadQuery, !this.cacheEnabled))
|
|
33628
|
+
.then((datasetInfo) => {
|
|
33629
|
+
this.properties_ = datasetInfo.properties;
|
|
33630
|
+
this.geometryColumn = datasetInfo.geometryColumn;
|
|
33631
|
+
this.rowsCount = datasetInfo.rowsCount;
|
|
33632
|
+
// returns void for the loaded promise
|
|
33633
|
+
});
|
|
33096
33634
|
}
|
|
33097
33635
|
get properties() {
|
|
33098
|
-
return this.
|
|
33636
|
+
return this.isLoaded.then(() => this.properties_);
|
|
33099
33637
|
}
|
|
33100
33638
|
get info() {
|
|
33101
|
-
return this.
|
|
33102
|
-
itemsCount:
|
|
33639
|
+
return this.isLoaded.then(() => ({
|
|
33640
|
+
itemsCount: this.rowsCount,
|
|
33641
|
+
hasGeometry: !!this.geometryColumn,
|
|
33103
33642
|
}));
|
|
33104
33643
|
}
|
|
33105
33644
|
async read() {
|
|
33106
|
-
|
|
33107
|
-
//
|
|
33108
|
-
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
this.sort == null &&
|
|
33112
|
-
this.filter == null &&
|
|
33113
|
-
this.startIndex == null &&
|
|
33114
|
-
this.count == null) {
|
|
33115
|
-
return items;
|
|
33116
|
-
}
|
|
33117
|
-
const jsonItems = getJsonDataItemsProxy(items);
|
|
33118
|
-
const query = generateSqlQuery(this.selected, this.filter, this.sort, this.startIndex, this.count, this.groupedBy, this.aggregations);
|
|
33119
|
-
const result = await import('alasql').then((module) => module.default(query, [jsonItems]));
|
|
33120
|
-
return result.map(jsonToGeojsonFeature);
|
|
33121
|
-
}
|
|
33122
|
-
}
|
|
33123
|
-
|
|
33124
|
-
function parseCsv(text) {
|
|
33125
|
-
// first parse the header to guess the delimiter
|
|
33126
|
-
// note that we do that to not rely on Papaparse logic for guessing delimiter
|
|
33127
|
-
let delimiter;
|
|
33128
|
-
try {
|
|
33129
|
-
const header = text.split('\n')[0];
|
|
33130
|
-
const result = Papa.parse(header, {
|
|
33131
|
-
header: false,
|
|
33132
|
-
});
|
|
33133
|
-
delimiter = result.meta.delimiter;
|
|
33134
|
-
}
|
|
33135
|
-
catch (e) {
|
|
33136
|
-
throw new Error('CSV parsing failed: the delimiter could not be guessed');
|
|
33137
|
-
}
|
|
33138
|
-
const parsed = Papa.parse(text, {
|
|
33139
|
-
header: true,
|
|
33140
|
-
skipEmptyLines: true,
|
|
33141
|
-
delimiter,
|
|
33142
|
-
});
|
|
33143
|
-
if (parsed.errors.length) {
|
|
33144
|
-
throw new Error('CSV parsing failed for the following reasons:\n' +
|
|
33145
|
-
parsed.errors
|
|
33146
|
-
.map((error) => `* ${error.message} at row ${error.row}, column ${error.index}`)
|
|
33147
|
-
.join('\n'));
|
|
33645
|
+
await this.isLoaded;
|
|
33646
|
+
// if only certain fields are selected, omit the geometry
|
|
33647
|
+
const geometryColumn = this.selected === null ? this.geometryColumn : null;
|
|
33648
|
+
const query = generateSqlQuery(this.datasetId, this.selected, this.filter, this.sort, this.startIndex, this.count, this.groupedBy, this.aggregations, geometryColumn);
|
|
33649
|
+
return this.engine.queryItems(query);
|
|
33148
33650
|
}
|
|
33149
|
-
const items = parsed.data.map(jsonToGeojsonFeature);
|
|
33150
|
-
return processItemProperties(items, true);
|
|
33151
33651
|
}
|
|
33652
|
+
|
|
33152
33653
|
class CsvReader extends BaseFileReader {
|
|
33153
|
-
|
|
33154
|
-
|
|
33654
|
+
async getLoadQuery() {
|
|
33655
|
+
// first we get a list of columns hich have a detected type of VARCHAR
|
|
33656
|
+
// then we make sure that for those columns, we don't cast an empty string to null; instead we want to keep the empty string
|
|
33657
|
+
return `
|
|
33658
|
+
SET VARIABLE strColumns = (SELECT list(name) FROM (SELECT unnest(Columns, recursive := true) FROM sniff_csv("${this.url}")) WHERE type = 'VARCHAR');
|
|
33659
|
+
CREATE TABLE ${this.datasetId} AS SELECT * FROM read_csv("${this.url}",
|
|
33660
|
+
force_not_null = getvariable('strColumns'),
|
|
33661
|
+
auto_type_candidates = ['NULL', 'BOOLEAN', 'INTEGER', 'DOUBLE', 'DATE', 'VARCHAR']
|
|
33662
|
+
);`;
|
|
33155
33663
|
}
|
|
33156
33664
|
}
|
|
33157
33665
|
|
|
33158
|
-
/**
|
|
33159
|
-
* This parser only supports arrays of simple flat objects with properties
|
|
33160
|
-
* @param text
|
|
33161
|
-
*/
|
|
33162
|
-
function parseJson(text) {
|
|
33163
|
-
const parsed = JSON.parse(text);
|
|
33164
|
-
if (!Array.isArray(parsed)) {
|
|
33165
|
-
throw new Error('Could not parse JSON, expected an array at root level');
|
|
33166
|
-
}
|
|
33167
|
-
return processItemProperties(parsed.map(jsonToGeojsonFeature));
|
|
33168
|
-
}
|
|
33169
33666
|
class JsonReader extends BaseFileReader {
|
|
33170
|
-
|
|
33171
|
-
return
|
|
33667
|
+
async getLoadQuery() {
|
|
33668
|
+
return `
|
|
33669
|
+
CREATE TABLE ${this.datasetId} AS SELECT * FROM read_json("${this.url}",
|
|
33670
|
+
maximum_object_size = 536870912 -- 500MB
|
|
33671
|
+
);`;
|
|
33172
33672
|
}
|
|
33173
33673
|
}
|
|
33174
33674
|
|
|
33175
|
-
/**
|
|
33176
|
-
* This parser supports both Geojson Feature collections or arrays
|
|
33177
|
-
* of Features
|
|
33178
|
-
* @param text
|
|
33179
|
-
*/
|
|
33180
|
-
function parseGeojson(text) {
|
|
33181
|
-
const parsed = JSON.parse(text);
|
|
33182
|
-
const features = parsed.type === 'FeatureCollection' ? parsed.features : parsed;
|
|
33183
|
-
if (!Array.isArray(features)) {
|
|
33184
|
-
throw new Error('Could not parse GeoJSON, expected a features collection or an array of features at root level');
|
|
33185
|
-
}
|
|
33186
|
-
return processItemProperties(features);
|
|
33187
|
-
}
|
|
33188
33675
|
class GeojsonReader extends BaseFileReader {
|
|
33189
|
-
|
|
33190
|
-
return
|
|
33676
|
+
async getLoadQuery() {
|
|
33677
|
+
return `
|
|
33678
|
+
CREATE TABLE ${this.datasetId} AS SELECT * FROM st_read("${this.url}",
|
|
33679
|
+
allowed_drivers = ['GeoJSON']
|
|
33680
|
+
);`;
|
|
33191
33681
|
}
|
|
33192
33682
|
}
|
|
33193
33683
|
|
|
33684
|
+
async function inferDatasetType(url, typeHint) {
|
|
33685
|
+
const fileExtensionMatches = new URL(url, typeof window !== 'undefined' ? window.location.toString() : undefined).pathname.match(/\.(.+)$/);
|
|
33686
|
+
const fileExtension = fileExtensionMatches && fileExtensionMatches.length
|
|
33687
|
+
? fileExtensionMatches[1].toLowerCase()
|
|
33688
|
+
: null;
|
|
33689
|
+
// 1. type hint
|
|
33690
|
+
if (typeHint)
|
|
33691
|
+
return Promise.resolve(typeHint);
|
|
33692
|
+
// 2. content-type header
|
|
33693
|
+
const headers = await fetchHeaders(url);
|
|
33694
|
+
if ('supportedType' in headers)
|
|
33695
|
+
return headers.supportedType;
|
|
33696
|
+
// 3. file extension from url
|
|
33697
|
+
else if (SupportedTypes.indexOf(fileExtension) > -1)
|
|
33698
|
+
return fileExtension;
|
|
33699
|
+
// no type inferred or hinted
|
|
33700
|
+
if ('mimeType' in headers)
|
|
33701
|
+
throw FetchError.unsupportedType(headers.mimeType);
|
|
33702
|
+
else
|
|
33703
|
+
throw FetchError.unknownType();
|
|
33704
|
+
}
|
|
33705
|
+
function fetchHeaders(url) {
|
|
33706
|
+
return sharedFetch(url, 'HEAD')
|
|
33707
|
+
.catch((error) => {
|
|
33708
|
+
throw FetchError.corsOrNetwork(error.message);
|
|
33709
|
+
})
|
|
33710
|
+
.then((response) => {
|
|
33711
|
+
if (!response.ok) {
|
|
33712
|
+
throw FetchError.http(response.status);
|
|
33713
|
+
}
|
|
33714
|
+
return parseHeaders(response.headers);
|
|
33715
|
+
});
|
|
33716
|
+
}
|
|
33717
|
+
function fetchDataAsText(url, cacheActive) {
|
|
33718
|
+
const fetchFactory = () => sharedFetch(url)
|
|
33719
|
+
.catch((error) => {
|
|
33720
|
+
throw FetchError.corsOrNetwork(error.message);
|
|
33721
|
+
})
|
|
33722
|
+
.then(async (response) => {
|
|
33723
|
+
if (!response.ok) {
|
|
33724
|
+
const clonedResponse = response.clone();
|
|
33725
|
+
throw FetchError.http(response.status, await clonedResponse.text());
|
|
33726
|
+
}
|
|
33727
|
+
const clonedResponse = response.clone();
|
|
33728
|
+
return clonedResponse.text();
|
|
33729
|
+
});
|
|
33730
|
+
return cacheActive ? useCache(fetchFactory, url, 'asText') : fetchFactory();
|
|
33731
|
+
}
|
|
33732
|
+
function fetchDataAsArrayBuffer(url, cacheActive) {
|
|
33733
|
+
const fetchFactory = () => sharedFetch(url)
|
|
33734
|
+
.catch((error) => {
|
|
33735
|
+
throw FetchError.corsOrNetwork(error.message);
|
|
33736
|
+
})
|
|
33737
|
+
.then(async (response) => {
|
|
33738
|
+
if (!response.ok) {
|
|
33739
|
+
throw FetchError.http(response.status, await response.text());
|
|
33740
|
+
}
|
|
33741
|
+
// convert to a numeric array so that we can store the response in cache
|
|
33742
|
+
return Array.from(new Uint8Array(await response.arrayBuffer()));
|
|
33743
|
+
});
|
|
33744
|
+
return (cacheActive ? useCache(fetchFactory, url, 'asArrayBuffer') : fetchFactory()).then((array) => {
|
|
33745
|
+
return new Uint8Array(array).buffer;
|
|
33746
|
+
});
|
|
33747
|
+
}
|
|
33194
33748
|
/**
|
|
33195
|
-
* This
|
|
33196
|
-
*
|
|
33197
|
-
* @param
|
|
33749
|
+
* This creates a Proxy that allows reading and writing to the data item properties
|
|
33750
|
+
* as if it was a simple array of JSON objects
|
|
33751
|
+
* @param items
|
|
33198
33752
|
*/
|
|
33199
|
-
function
|
|
33200
|
-
return
|
|
33201
|
-
|
|
33202
|
-
|
|
33203
|
-
|
|
33204
|
-
|
|
33205
|
-
|
|
33206
|
-
|
|
33207
|
-
|
|
33753
|
+
function getJsonDataItemsProxy(items) {
|
|
33754
|
+
return new Proxy(items, {
|
|
33755
|
+
get(target, p) {
|
|
33756
|
+
if (typeof p === 'string' &&
|
|
33757
|
+
!Number.isNaN(parseInt(p)) &&
|
|
33758
|
+
target[p]?.properties) {
|
|
33759
|
+
return target[p].properties;
|
|
33760
|
+
}
|
|
33761
|
+
return target[p];
|
|
33762
|
+
},
|
|
33763
|
+
set() {
|
|
33764
|
+
throw new Error('This object is read-only');
|
|
33765
|
+
},
|
|
33208
33766
|
});
|
|
33209
33767
|
}
|
|
33768
|
+
|
|
33210
33769
|
class ExcelReader extends BaseFileReader {
|
|
33211
|
-
|
|
33212
|
-
|
|
33770
|
+
async getLoadQuery() {
|
|
33771
|
+
// we download the file as an array buffer first, in order to be able to check if it's an XLS file
|
|
33772
|
+
let buffer = await fetchDataAsArrayBuffer(this.url, this.cacheEnabled);
|
|
33773
|
+
const bufferHandle = `B${this.datasetId}`;
|
|
33774
|
+
// checking against the magic number at the beginning of XLS files, see https://en.wikipedia.org/wiki/List_of_file_signatures
|
|
33775
|
+
const magicNumber = new Uint8Array(buffer, 0, 8); // first 8 bytes
|
|
33776
|
+
const isXls = Array.from(magicNumber)
|
|
33777
|
+
.map((n) => n.toString(16).toUpperCase())
|
|
33778
|
+
.join(' ') === 'D0 CF 11 E0 A1 B1 1A E1';
|
|
33779
|
+
// uh oh, this is an XLS file (not supported by duckdb); convert it to CSV using the xlsx package
|
|
33780
|
+
if (isXls) {
|
|
33781
|
+
buffer = await import('xlsx').then(({ read, utils }) => {
|
|
33782
|
+
const workbook = read(buffer);
|
|
33783
|
+
const json = utils.sheet_to_json(workbook.Sheets[workbook.SheetNames[0]]);
|
|
33784
|
+
return new TextEncoder().encode(JSON.stringify(json)).buffer;
|
|
33785
|
+
});
|
|
33786
|
+
}
|
|
33787
|
+
const duckDbFn = isXls ? 'read_json' : 'read_xlsx';
|
|
33788
|
+
await this.engine.registerData(bufferHandle, new Uint8Array(buffer));
|
|
33789
|
+
return `
|
|
33790
|
+
CREATE TABLE ${this.datasetId} AS SELECT * FROM ${duckDbFn}("${bufferHandle}", ignore_errors = true);`;
|
|
33213
33791
|
}
|
|
33214
33792
|
}
|
|
33215
33793
|
|
|
33216
|
-
|
|
33217
|
-
|
|
33218
|
-
|
|
33794
|
+
class GmlReader extends BaseFileReader {
|
|
33795
|
+
async getLoadQuery() {
|
|
33796
|
+
return `
|
|
33797
|
+
CREATE TABLE ${this.datasetId} AS SELECT * FROM st_read("${this.url}",
|
|
33798
|
+
allowed_drivers = ['GML']
|
|
33799
|
+
);`;
|
|
33800
|
+
}
|
|
33801
|
+
}
|
|
33802
|
+
|
|
33803
|
+
const formatGeojson = new GeoJSON$1();
|
|
33804
|
+
function parseGeojson(text) {
|
|
33805
|
+
const parsed = JSON.parse(text);
|
|
33806
|
+
const features = parsed.type === 'FeatureCollection' ? parsed.features : parsed;
|
|
33807
|
+
if (!Array.isArray(features)) {
|
|
33808
|
+
throw new Error('Could not parse GeoJSON, expected a features collection or an array of features at root level');
|
|
33809
|
+
}
|
|
33810
|
+
return features;
|
|
33811
|
+
}
|
|
33812
|
+
function parseGml(text, featureType, version) {
|
|
33813
|
+
const parts = featureType.split(':');
|
|
33814
|
+
const regex = new RegExp(`xmlns:${parts[0]}=["']([^'"]*)["']`);
|
|
33219
33815
|
const match = regex.exec(text);
|
|
33220
33816
|
if (match && match.length >= 2) {
|
|
33221
|
-
const
|
|
33817
|
+
const wfs = new WFS({
|
|
33222
33818
|
featureNS: match[1],
|
|
33223
|
-
featureType:
|
|
33819
|
+
featureType: parts[1],
|
|
33224
33820
|
version: version,
|
|
33225
33821
|
});
|
|
33226
33822
|
let features;
|
|
33227
33823
|
try {
|
|
33228
|
-
features =
|
|
33824
|
+
features = wfs.readFeatures(text);
|
|
33229
33825
|
}
|
|
33230
33826
|
catch (e) {
|
|
33231
|
-
throw Error(
|
|
33827
|
+
throw Error(`Couldn't parse WFS with GML features: ${e.message}`);
|
|
33232
33828
|
}
|
|
33233
|
-
const geojsonItem =
|
|
33234
|
-
return
|
|
33829
|
+
const geojsonItem = formatGeojson.writeFeaturesObject(features);
|
|
33830
|
+
return geojsonItem.features;
|
|
33235
33831
|
}
|
|
33236
33832
|
throw Error("Couldn't retrieve namespace url");
|
|
33237
33833
|
}
|
|
33238
|
-
class GmlReader extends BaseFileReader {
|
|
33239
|
-
constructor(url, namespace, version, cacheActive = true) {
|
|
33240
|
-
super(url);
|
|
33241
|
-
this.url = url;
|
|
33242
|
-
this.namespace = namespace;
|
|
33243
|
-
this.version = version;
|
|
33244
|
-
this.cacheActive = cacheActive;
|
|
33245
|
-
}
|
|
33246
|
-
getData() {
|
|
33247
|
-
return fetchDataAsText(this.url, this.cacheActive).then((text) => parseGml(text, this.namespace, this.version));
|
|
33248
|
-
}
|
|
33249
|
-
}
|
|
33250
|
-
|
|
33251
33834
|
async function getWfsEndpoint(wfsUrl) {
|
|
33252
33835
|
try {
|
|
33253
33836
|
return await new WfsEndpoint(wfsUrl).isReady();
|
|
@@ -33275,21 +33858,65 @@ async function getWfsEndpoint(wfsUrl) {
|
|
|
33275
33858
|
}
|
|
33276
33859
|
}
|
|
33277
33860
|
}
|
|
33278
|
-
class WfsReader extends
|
|
33279
|
-
constructor(url,
|
|
33280
|
-
super(url
|
|
33281
|
-
this.endpoint =
|
|
33282
|
-
this.
|
|
33283
|
-
|
|
33861
|
+
class WfsReader extends BaseReader {
|
|
33862
|
+
constructor(url, featureTypeName) {
|
|
33863
|
+
super(url);
|
|
33864
|
+
this.endpoint = getWfsEndpoint(url);
|
|
33865
|
+
this.featureType = this.endpoint
|
|
33866
|
+
.then((endpoint) => {
|
|
33867
|
+
const featureTypes = endpoint.getFeatureTypes();
|
|
33868
|
+
return endpoint.getFeatureTypeFull(featureTypes.length === 1 && !featureTypeName
|
|
33869
|
+
? featureTypes[0].name
|
|
33870
|
+
: featureTypeName);
|
|
33871
|
+
})
|
|
33872
|
+
.then((featureType) => {
|
|
33873
|
+
if (!featureType) {
|
|
33874
|
+
throw new Error('wfs.featuretype.notfound');
|
|
33875
|
+
}
|
|
33876
|
+
return featureType;
|
|
33877
|
+
});
|
|
33878
|
+
}
|
|
33879
|
+
get backupReader() {
|
|
33880
|
+
if (this.backupReader_) {
|
|
33881
|
+
return this.backupReader_;
|
|
33882
|
+
}
|
|
33883
|
+
this.backupReader_ = Promise.all([this.endpoint, this.featureType]).then(([endpoint, featureType]) => {
|
|
33884
|
+
let reader;
|
|
33885
|
+
if (endpoint.supportsJson(featureType.name)) {
|
|
33886
|
+
reader = new GeojsonReader(endpoint.getFeatureUrl(featureType.name, {
|
|
33887
|
+
asJson: true,
|
|
33888
|
+
outputCrs: 'EPSG:4326',
|
|
33889
|
+
}));
|
|
33890
|
+
}
|
|
33891
|
+
else {
|
|
33892
|
+
if (featureType.outputFormats.find((f) => f.toLowerCase().includes('gml')) &&
|
|
33893
|
+
(featureType.defaultCrs === 'EPSG:4326' ||
|
|
33894
|
+
featureType.otherCrs?.includes('EPSG:4326'))) {
|
|
33895
|
+
reader = new GmlReader(endpoint.getFeatureUrl(featureType.name, {
|
|
33896
|
+
outputFormat: featureType.outputFormats.find((f) => f.toLowerCase().includes('gml')),
|
|
33897
|
+
outputCrs: 'EPSG:4326',
|
|
33898
|
+
}));
|
|
33899
|
+
}
|
|
33900
|
+
}
|
|
33901
|
+
reader.enableCache(this.cacheEnabled);
|
|
33902
|
+
reader.load();
|
|
33903
|
+
return reader;
|
|
33904
|
+
});
|
|
33905
|
+
return this.backupReader_;
|
|
33284
33906
|
}
|
|
33285
33907
|
get properties() {
|
|
33286
|
-
return this.
|
|
33287
|
-
.getFeatureTypeFull(this.featureTypeName)
|
|
33288
|
-
.then((featureType) => Object.keys(featureType.properties).map((prop) => {
|
|
33908
|
+
return this.featureType.then((featureType) => Object.keys(featureType.properties).map((prop) => {
|
|
33289
33909
|
const originalType = featureType.properties[prop];
|
|
33290
|
-
|
|
33291
|
-
|
|
33292
|
-
|
|
33910
|
+
let type;
|
|
33911
|
+
if (originalType === 'float' || originalType === 'integer') {
|
|
33912
|
+
type = 'number';
|
|
33913
|
+
}
|
|
33914
|
+
else if (originalType === 'boolean') {
|
|
33915
|
+
type = 'string'; // we don't handle booleans yet in the data fetcher
|
|
33916
|
+
}
|
|
33917
|
+
else {
|
|
33918
|
+
type = originalType;
|
|
33919
|
+
}
|
|
33293
33920
|
return {
|
|
33294
33921
|
name: prop,
|
|
33295
33922
|
label: prop,
|
|
@@ -33298,83 +33925,63 @@ class WfsReader extends BaseCacheReader {
|
|
|
33298
33925
|
}));
|
|
33299
33926
|
}
|
|
33300
33927
|
get info() {
|
|
33301
|
-
return this.
|
|
33928
|
+
return this.featureType.then((result) => ({
|
|
33302
33929
|
itemsCount: result.objectCount,
|
|
33930
|
+
hasGeometry: !!result.geometryName,
|
|
33303
33931
|
}));
|
|
33304
33932
|
}
|
|
33305
|
-
|
|
33306
|
-
|
|
33307
|
-
const featureTypes = wfsEndpoint.getFeatureTypes();
|
|
33308
|
-
const featureType = wfsEndpoint.getFeatureTypeSummary(featureTypes.length === 1 && !featureTypeName
|
|
33309
|
-
? featureTypes[0].name
|
|
33310
|
-
: featureTypeName);
|
|
33311
|
-
if (!featureType) {
|
|
33312
|
-
throw new Error('wfs.featuretype.notfound');
|
|
33313
|
-
}
|
|
33314
|
-
if (wfsEndpoint.supportsStartIndex()) {
|
|
33315
|
-
return new WfsReader(wfsUrlEndpoint, wfsEndpoint, featureType.name);
|
|
33316
|
-
}
|
|
33317
|
-
else if (wfsEndpoint.supportsJson(featureType.name)) {
|
|
33318
|
-
return new GeojsonReader(wfsEndpoint.getFeatureUrl(featureType.name, {
|
|
33319
|
-
asJson: true,
|
|
33320
|
-
outputCrs: 'EPSG:4326',
|
|
33321
|
-
}));
|
|
33322
|
-
}
|
|
33323
|
-
else {
|
|
33324
|
-
if (featureType.outputFormats.find((f) => f.toLowerCase().includes('gml')) &&
|
|
33325
|
-
(featureType.defaultCrs === 'EPSG:4326' ||
|
|
33326
|
-
featureType.otherCrs?.includes('EPSG:4326'))) {
|
|
33327
|
-
return new GmlReader(wfsEndpoint.getFeatureUrl(featureType.name, {
|
|
33328
|
-
outputFormat: featureType.outputFormats.find((f) => f.toLowerCase().includes('gml')),
|
|
33329
|
-
outputCrs: 'EPSG:4326',
|
|
33330
|
-
}), featureType.name, wfsEndpoint.getVersion());
|
|
33331
|
-
}
|
|
33332
|
-
throw new Error('wfs.geojsongml.notsupported');
|
|
33333
|
-
}
|
|
33933
|
+
load() {
|
|
33934
|
+
// Nothing to load for Wfs
|
|
33334
33935
|
}
|
|
33335
|
-
async
|
|
33336
|
-
|
|
33337
|
-
|
|
33936
|
+
async read() {
|
|
33937
|
+
const endpoint = await this.endpoint;
|
|
33938
|
+
const featureType = await this.featureType;
|
|
33939
|
+
// if we can't use the WFS protocol we fall back to the backup reader
|
|
33940
|
+
if (this.aggregations || this.groupedBy || !endpoint.supportsStartIndex()) {
|
|
33941
|
+
const backupReader = await this.backupReader;
|
|
33942
|
+
backupReader.selectAll();
|
|
33943
|
+
if (this.selected) {
|
|
33944
|
+
backupReader.select(...this.selected);
|
|
33945
|
+
}
|
|
33946
|
+
if (this.aggregations) {
|
|
33947
|
+
backupReader.aggregate(...this.aggregations);
|
|
33948
|
+
}
|
|
33949
|
+
if (this.groupedBy) {
|
|
33950
|
+
backupReader.groupBy(...this.groupedBy);
|
|
33951
|
+
}
|
|
33952
|
+
if (this.sort) {
|
|
33953
|
+
backupReader.orderBy(...this.sort);
|
|
33954
|
+
}
|
|
33955
|
+
if (this.startIndex !== null && this.count !== null) {
|
|
33956
|
+
backupReader.limit(this.startIndex, this.count);
|
|
33957
|
+
}
|
|
33958
|
+
return backupReader.read();
|
|
33338
33959
|
}
|
|
33339
|
-
const asJson =
|
|
33960
|
+
const asJson = endpoint.supportsJson(featureType.name);
|
|
33340
33961
|
const attributes = this.selected ?? undefined;
|
|
33341
|
-
let
|
|
33962
|
+
let sortBy = null;
|
|
33963
|
+
if (this.sort) {
|
|
33964
|
+
const mapSort = (s) => [s[0] === 'desc' ? 'D' : 'A', s[1]];
|
|
33965
|
+
sortBy = Array.isArray(this.sort[0])
|
|
33966
|
+
? this.sort.map(mapSort)
|
|
33967
|
+
: mapSort(this.sort);
|
|
33968
|
+
}
|
|
33969
|
+
const url = endpoint.getFeatureUrl(featureType.name, {
|
|
33342
33970
|
...(this.startIndex !== null && { startIndex: this.startIndex }),
|
|
33343
33971
|
...(this.count !== null && { maxFeatures: this.count }),
|
|
33344
33972
|
asJson,
|
|
33345
33973
|
outputCrs: 'EPSG:4326',
|
|
33346
33974
|
attributes,
|
|
33347
|
-
|
|
33975
|
+
sortBy,
|
|
33348
33976
|
});
|
|
33349
|
-
|
|
33350
|
-
const finalUrl = new URL(url);
|
|
33351
|
-
const sorts = this.sort
|
|
33352
|
-
.map((fieldSort) => `${fieldSort[1]}+${fieldSort[0] === 'asc' ? 'A' : 'D'}`)
|
|
33353
|
-
.join(',');
|
|
33354
|
-
// Direct update on string url to prevent encoding of +A and +D
|
|
33355
|
-
url = `${url}${finalUrl.search ? '&' : ''}SORTBY=${sorts}`;
|
|
33356
|
-
}
|
|
33357
|
-
return fetchDataAsText(url, this.cacheActive).then((text) => asJson
|
|
33977
|
+
return fetchDataAsText(url, this.cacheEnabled).then((text) => asJson
|
|
33358
33978
|
? parseGeojson(text)
|
|
33359
|
-
: parseGml(text,
|
|
33360
|
-
}
|
|
33361
|
-
async getQueryData() {
|
|
33362
|
-
const items = (await this.getData()).items;
|
|
33363
|
-
const jsonItems = getJsonDataItemsProxy(items);
|
|
33364
|
-
const query = generateSqlQuery(this.selected, this.filter, this.sort, this.startIndex, this.count, this.groupedBy, this.aggregations);
|
|
33365
|
-
const result = await import('alasql').then((module) => module.default(query, [jsonItems]));
|
|
33366
|
-
return result.map(jsonToGeojsonFeature);
|
|
33367
|
-
}
|
|
33368
|
-
load() {
|
|
33369
|
-
// Nothing to load for Wfs
|
|
33370
|
-
}
|
|
33371
|
-
async read() {
|
|
33372
|
-
return (await this.getData(this.aggregations, this.groupedBy)).items;
|
|
33979
|
+
: parseGml(text, featureType.name, endpoint.getVersion()));
|
|
33373
33980
|
}
|
|
33374
33981
|
}
|
|
33375
33982
|
|
|
33376
|
-
async function openDataset(url,
|
|
33377
|
-
const fileType = await inferDatasetType(url, typeHint);
|
|
33983
|
+
async function openDataset(url, options) {
|
|
33984
|
+
const fileType = await inferDatasetType(url, options?.typeHint);
|
|
33378
33985
|
let reader;
|
|
33379
33986
|
try {
|
|
33380
33987
|
switch (fileType) {
|
|
@@ -33391,18 +33998,18 @@ async function openDataset(url, typeHint, options, cacheActive) {
|
|
|
33391
33998
|
reader = new ExcelReader(url);
|
|
33392
33999
|
break;
|
|
33393
34000
|
case 'gml':
|
|
33394
|
-
reader = new GmlReader(url
|
|
34001
|
+
reader = new GmlReader(url);
|
|
33395
34002
|
break;
|
|
33396
34003
|
case 'wfs':
|
|
33397
|
-
reader =
|
|
34004
|
+
reader = new WfsReader(url, options?.wfsFeatureType);
|
|
33398
34005
|
break;
|
|
33399
34006
|
}
|
|
33400
|
-
reader.
|
|
34007
|
+
reader.enableCache(options?.enableCache ?? true);
|
|
33401
34008
|
reader.load();
|
|
33402
34009
|
return reader;
|
|
33403
34010
|
}
|
|
33404
34011
|
catch (e) {
|
|
33405
|
-
//WfsReader may already raise a FetchError
|
|
34012
|
+
// WfsReader may already raise a FetchError
|
|
33406
34013
|
if (e instanceof FetchError)
|
|
33407
34014
|
throw e;
|
|
33408
34015
|
else
|
|
@@ -33413,13 +34020,13 @@ async function openDataset(url, typeHint, options, cacheActive) {
|
|
|
33413
34020
|
* This fetches the full dataset at the given URL and parses it according to its mime type.
|
|
33414
34021
|
* All items in the dataset are converted to GeoJSON features, even if they do not bear any spatial geometry.
|
|
33415
34022
|
* File type can be either inferred (from the HTTP headers or the URL), or hinted using the 2nd argument
|
|
33416
|
-
* File type is determined
|
|
34023
|
+
* File type is determined like so:
|
|
33417
34024
|
* 1. if a type hint is given, use it
|
|
33418
34025
|
* 2. otherwise, look for a Content-Type header in the response with a supported mime type
|
|
33419
34026
|
* 3. if no valid mime type was found, look for an explicit file extension in the url (.csv, .geojson etc.)
|
|
33420
34027
|
*/
|
|
33421
|
-
async function readDataset(url,
|
|
33422
|
-
const reader = await openDataset(url,
|
|
34028
|
+
async function readDataset(url, options) {
|
|
34029
|
+
const reader = await openDataset(url, options);
|
|
33423
34030
|
try {
|
|
33424
34031
|
return await reader.read();
|
|
33425
34032
|
}
|
|
@@ -33650,9 +34257,11 @@ class DataService {
|
|
|
33650
34257
|
getDataset(link, cacheActive) {
|
|
33651
34258
|
if (link.type === 'service' && link.accessServiceProtocol === 'wfs') {
|
|
33652
34259
|
const wfsUrlEndpoint = this.proxy.getProxiedUrl(link.url.toString());
|
|
33653
|
-
return from(openDataset(wfsUrlEndpoint,
|
|
34260
|
+
return from(openDataset(wfsUrlEndpoint, {
|
|
34261
|
+
typeHint: 'wfs',
|
|
33654
34262
|
wfsFeatureType: link.name,
|
|
33655
|
-
|
|
34263
|
+
enableCache: cacheActive,
|
|
34264
|
+
}));
|
|
33656
34265
|
}
|
|
33657
34266
|
else if (link.type === 'download') {
|
|
33658
34267
|
const linkProxifiedUrl = this.proxy.getProxiedUrl(link.url.toString());
|
|
@@ -33660,12 +34269,15 @@ class DataService {
|
|
|
33660
34269
|
const supportedType = SupportedTypes.indexOf(format) > -1
|
|
33661
34270
|
? format
|
|
33662
34271
|
: undefined;
|
|
33663
|
-
return from(openDataset(linkProxifiedUrl,
|
|
34272
|
+
return from(openDataset(linkProxifiedUrl, {
|
|
34273
|
+
typeHint: supportedType,
|
|
34274
|
+
enableCache: cacheActive,
|
|
34275
|
+
})).pipe();
|
|
33664
34276
|
}
|
|
33665
34277
|
else if (link.type === 'service' &&
|
|
33666
34278
|
link.accessServiceProtocol === 'esriRest') {
|
|
33667
34279
|
const url = this.getDownloadUrlFromEsriRest(link.url.toString(), 'geojson');
|
|
33668
|
-
return from(openDataset(url, 'geojson',
|
|
34280
|
+
return from(openDataset(url, { typeHint: 'geojson', enableCache: cacheActive })).pipe();
|
|
33669
34281
|
}
|
|
33670
34282
|
else if (link.type === 'service' &&
|
|
33671
34283
|
link.accessServiceProtocol === 'ogcFeatures') {
|
|
@@ -33679,7 +34291,10 @@ class DataService {
|
|
|
33679
34291
|
}
|
|
33680
34292
|
const urlWithoutLimit = new URL(geojsonUrl);
|
|
33681
34293
|
urlWithoutLimit.searchParams.delete('limit');
|
|
33682
|
-
return openDataset(urlWithoutLimit.toString(),
|
|
34294
|
+
return openDataset(urlWithoutLimit.toString(), {
|
|
34295
|
+
typeHint: 'geojson',
|
|
34296
|
+
enableCache: cacheActive,
|
|
34297
|
+
});
|
|
33683
34298
|
}));
|
|
33684
34299
|
}
|
|
33685
34300
|
return throwError(() => 'protocol not supported');
|
|
@@ -33931,20 +34546,31 @@ class DataTableComponent {
|
|
|
33931
34546
|
this.eltRef = inject(ElementRef);
|
|
33932
34547
|
this.cdr = inject(ChangeDetectorRef);
|
|
33933
34548
|
this.translateService = inject(TranslateService);
|
|
33934
|
-
this.
|
|
34549
|
+
this.columnsFromFeatureCatalog = null;
|
|
34550
|
+
this.columnsFromDataset = [];
|
|
33935
34551
|
this.selected = new EventEmitter();
|
|
33936
|
-
this.properties$ = new BehaviorSubject(null);
|
|
33937
34552
|
this.loading$ = new BehaviorSubject(false);
|
|
33938
34553
|
this.error = null;
|
|
33939
34554
|
}
|
|
33940
34555
|
set featureAttributes(value) {
|
|
33941
|
-
this.
|
|
33942
|
-
|
|
34556
|
+
this.columnsFromFeatureCatalog = value.map((attrs) => ({
|
|
34557
|
+
name: attrs.value,
|
|
34558
|
+
label: attrs.label,
|
|
34559
|
+
}));
|
|
33943
34560
|
}
|
|
33944
34561
|
set dataset(value) {
|
|
33945
34562
|
this.dataset_ = value;
|
|
33946
34563
|
this.dataset_.load();
|
|
33947
|
-
this.dataset_.info.then((info) =>
|
|
34564
|
+
this.dataset_.info.then((info) => {
|
|
34565
|
+
this.count = info.itemsCount;
|
|
34566
|
+
this.cdr.detectChanges();
|
|
34567
|
+
});
|
|
34568
|
+
}
|
|
34569
|
+
get columns() {
|
|
34570
|
+
return this.columnsFromFeatureCatalog ?? this.columnsFromDataset;
|
|
34571
|
+
}
|
|
34572
|
+
get columnNames() {
|
|
34573
|
+
return this.columns.map((c) => c.name);
|
|
33948
34574
|
}
|
|
33949
34575
|
ngOnInit() {
|
|
33950
34576
|
this.dataSource = new DataTableDataSource();
|
|
@@ -33979,11 +34605,12 @@ class DataTableComponent {
|
|
|
33979
34605
|
}
|
|
33980
34606
|
async readData() {
|
|
33981
34607
|
this.loading$.next(true);
|
|
33982
|
-
// wait for properties to be read
|
|
33983
|
-
const properties = await firstValueFrom(this.properties$.pipe(filter((p) => !!p)));
|
|
33984
|
-
const propsWithoutGeom = properties.filter((p) => !p.toLowerCase().startsWith('geom'));
|
|
33985
|
-
this.dataset_.select(...propsWithoutGeom);
|
|
33986
34608
|
try {
|
|
34609
|
+
// wait for properties to be read
|
|
34610
|
+
if (!this.columnsFromFeatureCatalog) {
|
|
34611
|
+
this.columnsFromDataset = await this.dataset_.properties;
|
|
34612
|
+
}
|
|
34613
|
+
this.dataset_.select(...this.columnNames);
|
|
33987
34614
|
await this.dataSource.showData(this.dataset_.read());
|
|
33988
34615
|
this.error = null;
|
|
33989
34616
|
}
|
|
@@ -34013,7 +34640,7 @@ class DataTableComponent {
|
|
|
34013
34640
|
}
|
|
34014
34641
|
}
|
|
34015
34642
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34016
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DataTableComponent, isStandalone: true, selector: "gn-ui-data-table", inputs: { featureAttributes: "featureAttributes", dataset: "dataset", activeId: "activeId" }, outputs: { selected: "selected" }, providers: [{ provide: MatPaginatorIntl, useClass: CustomMatPaginatorIntl }], viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-col border border-gray-300 rounded-lg bg-white h-full\">\n <div class=\"flex-1 overflow-y-hidden overflow-x-auto rounded-lg relative\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"setSort($event)\"\n [matSortDisableClear]=\"true\"\n
|
|
34643
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DataTableComponent, isStandalone: true, selector: "gn-ui-data-table", inputs: { featureAttributes: "featureAttributes", dataset: "dataset", activeId: "activeId" }, outputs: { selected: "selected" }, providers: [{ provide: MatPaginatorIntl, useClass: CustomMatPaginatorIntl }], viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-col border border-gray-300 rounded-lg bg-white h-full\">\n <div class=\"flex-1 overflow-y-hidden overflow-x-auto rounded-lg relative\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"setSort($event)\"\n [matSortDisableClear]=\"true\"\n >\n @for (column of columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n class=\"text-sm text-black bg-white\"\n >\n {{ column.label }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"whitespace-nowrap pr-1 truncate\"\n >\n {{ element[column.name] }}\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"columnNames; sticky: true\"></tr>\n <tr\n [id]=\"getRowEltId(row.id)\"\n mat-row\n *matRowDef=\"let row; columns: columnNames\"\n (click)=\"selected.emit(row)\"\n [class.active]=\"\n activeId !== undefined && activeId !== null && row.id === activeId\n \"\n ></tr>\n </table>\n @if (loading$ | async) {\n <gn-ui-loading-mask\n class=\"sticky inset-0\"\n [message]=\"'table.loading.data' | translate\"\n ></gn-ui-loading-mask>\n }\n @if (error) {\n <gn-ui-popup-alert\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0 z-[100]\"\n >\n <span translate>{{ error }}</span>\n </gn-ui-popup-alert>\n }\n </div>\n <div class=\"flex justify-between items-center overflow-hidden\">\n <div class=\"text-gray-900 px-4 py-2 text-sm\">\n <span class=\"count font-extrabold text-primary\">{{ count }}</span\n > <span translate>table.object.count</span>.\n </div>\n\n <mat-paginator\n class=\"my-[-16px]\"\n (page)=\"setPagination()\"\n [length]=\"count\"\n [pageSize]=\"10\"\n [showFirstLastButtons]=\"true\"\n [hidePageSize]=\"true\"\n ></mat-paginator>\n </div>\n</div>\n", styles: ["table{width:100%;background:#fff}th.mat-mdc-header-cell,td.mat-mdc-cell,td.mat-mdc-footer-cell{padding-right:20px}tr.mat-mdc-row,tr.mat-mdc-footer-row{height:36px}tr:hover{background:#f5f5f5}tr.mat-mdc-header-row{height:48px}[mat-header-cell]{color:#0000008a;font-size:12px;font-weight:500}tr{cursor:pointer}.active .mat-mdc-cell{color:var(--color-primary)}.mat-mdc-paginator{background:none}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$b.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$b.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$b.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$b.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$b.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$b.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$b.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$b.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$b.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$b.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i2$4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2$4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: LoadingMaskComponent, selector: "gn-ui-loading-mask", inputs: ["message"] }, { kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
34017
34644
|
}
|
|
34018
34645
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DataTableComponent, decorators: [{
|
|
34019
34646
|
type: Component,
|
|
@@ -34025,10 +34652,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
34025
34652
|
CommonModule,
|
|
34026
34653
|
LoadingMaskComponent,
|
|
34027
34654
|
PopupAlertComponent,
|
|
34028
|
-
LetDirective,
|
|
34029
34655
|
TranslatePipe,
|
|
34030
34656
|
TranslateDirective,
|
|
34031
|
-
], providers: [{ provide: MatPaginatorIntl, useClass: CustomMatPaginatorIntl }], selector: 'gn-ui-data-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col border border-gray-300 rounded-lg bg-white h-full\">\n <div class=\"flex-1 overflow-y-hidden overflow-x-auto rounded-lg relative\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"setSort($event)\"\n [matSortDisableClear]=\"true\"\n
|
|
34657
|
+
], providers: [{ provide: MatPaginatorIntl, useClass: CustomMatPaginatorIntl }], selector: 'gn-ui-data-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col border border-gray-300 rounded-lg bg-white h-full\">\n <div class=\"flex-1 overflow-y-hidden overflow-x-auto rounded-lg relative\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"setSort($event)\"\n [matSortDisableClear]=\"true\"\n >\n @for (column of columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n class=\"text-sm text-black bg-white\"\n >\n {{ column.label }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"whitespace-nowrap pr-1 truncate\"\n >\n {{ element[column.name] }}\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"columnNames; sticky: true\"></tr>\n <tr\n [id]=\"getRowEltId(row.id)\"\n mat-row\n *matRowDef=\"let row; columns: columnNames\"\n (click)=\"selected.emit(row)\"\n [class.active]=\"\n activeId !== undefined && activeId !== null && row.id === activeId\n \"\n ></tr>\n </table>\n @if (loading$ | async) {\n <gn-ui-loading-mask\n class=\"sticky inset-0\"\n [message]=\"'table.loading.data' | translate\"\n ></gn-ui-loading-mask>\n }\n @if (error) {\n <gn-ui-popup-alert\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0 z-[100]\"\n >\n <span translate>{{ error }}</span>\n </gn-ui-popup-alert>\n }\n </div>\n <div class=\"flex justify-between items-center overflow-hidden\">\n <div class=\"text-gray-900 px-4 py-2 text-sm\">\n <span class=\"count font-extrabold text-primary\">{{ count }}</span\n > <span translate>table.object.count</span>.\n </div>\n\n <mat-paginator\n class=\"my-[-16px]\"\n (page)=\"setPagination()\"\n [length]=\"count\"\n [pageSize]=\"10\"\n [showFirstLastButtons]=\"true\"\n [hidePageSize]=\"true\"\n ></mat-paginator>\n </div>\n</div>\n", styles: ["table{width:100%;background:#fff}th.mat-mdc-header-cell,td.mat-mdc-cell,td.mat-mdc-footer-cell{padding-right:20px}tr.mat-mdc-row,tr.mat-mdc-footer-row{height:36px}tr:hover{background:#f5f5f5}tr.mat-mdc-header-row{height:48px}[mat-header-cell]{color:#0000008a;font-size:12px;font-weight:500}tr{cursor:pointer}.active .mat-mdc-cell{color:var(--color-primary)}.mat-mdc-paginator{background:none}\n"] }]
|
|
34032
34658
|
}], propDecorators: { featureAttributes: [{
|
|
34033
34659
|
type: Input
|
|
34034
34660
|
}], dataset: [{
|
|
@@ -34131,7 +34757,7 @@ class ChartViewComponent {
|
|
|
34131
34757
|
}), shareReplay$1(1));
|
|
34132
34758
|
this.properties$ = combineLatest([this.dataset$, this.featureCatalog$]).pipe(switchMap$1(([dataset, catalog]) => this.setProperties(dataset, catalog)), shareReplay$1(1));
|
|
34133
34759
|
this.yChoices$ = this.properties$.pipe(map$1((properties) => properties
|
|
34134
|
-
.filter((prop) => prop.type === 'number'
|
|
34760
|
+
.filter((prop) => prop.type === 'number')
|
|
34135
34761
|
.map((prop) => ({ value: prop.name, label: prop.label || prop.name }))), tap$1((choices) => {
|
|
34136
34762
|
if (!choices.find((choice) => choice.value === this.yProperty$.value)) {
|
|
34137
34763
|
const newProp = choices[0]?.value || '';
|
|
@@ -34158,6 +34784,7 @@ class ChartViewComponent {
|
|
|
34158
34784
|
this.aggregation$,
|
|
34159
34785
|
]).pipe(filter$1(([_, x, y]) => !!x || !!y), switchMap$1(([dataset, xProp, yProp, aggregation]) => {
|
|
34160
34786
|
const fieldAgg = aggregation === 'count' ? ['count'] : [aggregation, yProp];
|
|
34787
|
+
this.loading = true;
|
|
34161
34788
|
return dataset
|
|
34162
34789
|
.groupBy(['distinct', xProp])
|
|
34163
34790
|
.aggregate(fieldAgg)
|
|
@@ -34399,6 +35026,7 @@ class GeoTableViewComponent {
|
|
|
34399
35026
|
}));
|
|
34400
35027
|
}
|
|
34401
35028
|
async initMapContext() {
|
|
35029
|
+
this.dataset.load();
|
|
34402
35030
|
this.dataset.selectAll();
|
|
34403
35031
|
return {
|
|
34404
35032
|
layers: [
|
|
@@ -34572,8 +35200,7 @@ class MdViewFacade {
|
|
|
34572
35200
|
}));
|
|
34573
35201
|
this.error$ = this.store.pipe(select(getMetadataError));
|
|
34574
35202
|
this.related$ = this.store.pipe(select(getRelated));
|
|
34575
|
-
this.
|
|
34576
|
-
this.sourceOf$ = this.store.pipe(select(getSourceOf));
|
|
35203
|
+
this.linkedRecords$ = this.store.pipe(select(getLinkedRecords));
|
|
34577
35204
|
this.chartConfig$ = this.store.pipe(select(getChartConfig));
|
|
34578
35205
|
this.allLinks$ = this.metadata$.pipe(map$1((record) => 'onlineResources' in record ? record.onlineResources : []), shareReplay$1(1));
|
|
34579
35206
|
this.resourceDoi$ = this.metadata$.pipe(map$1((record) => {
|
|
@@ -34692,12 +35319,9 @@ class MdViewEffects {
|
|
|
34692
35319
|
this.loadRelatedRecords$ = createEffect(() => this.actions$.pipe(ofType(loadFullMetadataSuccess), switchMap$1(({ full }) => this.recordsRepository.getSimilarRecords(full)), map$1((related) => {
|
|
34693
35320
|
return setRelated({ related });
|
|
34694
35321
|
}), catchError(() => of(setRelated({ related: null })))));
|
|
34695
|
-
this.
|
|
34696
|
-
return
|
|
34697
|
-
}), catchError(() => of(
|
|
34698
|
-
this.loadSourceOf$ = createEffect(() => this.actions$.pipe(ofType(loadFullMetadataSuccess), switchMap$1(({ full }) => this.recordsRepository.getSourceOf(full)), map$1((sourceOf) => {
|
|
34699
|
-
return setSourceOf({ sourceOf });
|
|
34700
|
-
}), catchError(() => of(setSourceOf({ sourceOf: null })))));
|
|
35322
|
+
this.loadLinkedRecords$ = createEffect(() => this.actions$.pipe(ofType(loadFullMetadataSuccess), switchMap$1(({ full }) => this.recordsRepository.getLinkedRecords(full)), map$1((linkedRecords) => {
|
|
35323
|
+
return setLinkedRecords({ linkedRecords });
|
|
35324
|
+
}), catchError(() => of(setLinkedRecords({ linkedRecords: null })))));
|
|
34701
35325
|
/*
|
|
34702
35326
|
UserFeedback effects
|
|
34703
35327
|
*/
|
|
@@ -36431,6 +37055,11 @@ const DEFAULT_CONFIGURATION = {
|
|
|
36431
37055
|
},
|
|
36432
37056
|
hidden: '${record.kind == "service"}',
|
|
36433
37057
|
},
|
|
37058
|
+
{
|
|
37059
|
+
model: 'associatedRecords',
|
|
37060
|
+
formFieldConfig: {},
|
|
37061
|
+
hidden: '${record.kind == "service"}',
|
|
37062
|
+
},
|
|
36434
37063
|
],
|
|
36435
37064
|
},
|
|
36436
37065
|
// Section: Geographical coverage
|
|
@@ -37568,7 +38197,7 @@ class FormFieldTemporalExtentsComponent {
|
|
|
37568
38197
|
provideNgIconsConfig({
|
|
37569
38198
|
size: '1.5rem',
|
|
37570
38199
|
}),
|
|
37571
|
-
], ngImport: i0, template: "<div class=\"flex gap-2
|
|
38200
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n @for (addOption of addOptions$ | async; track addOption) {\n <gn-ui-button type=\"gray\" (buttonClick)=\"onAdd(addOption.eventName)\">\n <ng-icon name=\"iconoirPlus\" class=\"text-primary\"></ng-icon> {{\n addOption.buttonLabel\n }}</gn-ui-button\n >\n }\n </div>\n @if (extents.length) {\n <gn-ui-sortable-list\n [items]=\"extents\"\n (itemsOrderChange)=\"onItemsOrderChange($event)\"\n [elementTemplate]=\"template\"\n ></gn-ui-sortable-list>\n }\n</div>\n<ng-template #template let-extent let-index=\"index\">\n @if (extent.end === undefined) {\n <div class=\"border rounded-lg px-4 pb-4\">\n <p class=\"my-2\" translate>editor.record.form.temporalExtents.date</p>\n <gn-ui-date-picker\n [date]=\"extent.start\"\n (dateChange)=\"onExtentChange({ start: $event }, index)\"\n ></gn-ui-date-picker>\n </div>\n }\n @if (extent.end !== undefined) {\n <div class=\"border rounded-lg px-4 pb-4\">\n <p class=\"my-2\" translate>editor.record.form.temporalExtents.range</p>\n <gn-ui-date-range-picker\n [startDate]=\"extent.start\"\n [endDate]=\"extent.end\"\n (startDateChange)=\"onExtentChange({ start: $event }, index)\"\n (endDateChange)=\"onExtentChange({ end: $event }, index)\"\n ></gn-ui-date-range-picker>\n </div>\n }\n</ng-template>\n", styles: [":host{--gn-ui-button-padding: 8px 8px;--gn-ui-button-rounded: 8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: SortableListComponent, selector: "gn-ui-sortable-list", inputs: ["elementTemplate", "items"], outputs: ["itemsOrderChange"] }, { kind: "component", type: DatePickerComponent, selector: "gn-ui-date-picker", inputs: ["date"], outputs: ["dateChange"] }, { kind: "component", type: DateRangePickerComponent, selector: "gn-ui-date-range-picker", inputs: ["startDate", "endDate"], outputs: ["startDateChange", "endDateChange"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { 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 }); }
|
|
37572
38201
|
}
|
|
37573
38202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldTemporalExtentsComponent, decorators: [{
|
|
37574
38203
|
type: Component,
|
|
@@ -37585,7 +38214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
37585
38214
|
provideNgIconsConfig({
|
|
37586
38215
|
size: '1.5rem',
|
|
37587
38216
|
}),
|
|
37588
|
-
], template: "<div class=\"flex gap-2
|
|
38217
|
+
], template: "<div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n @for (addOption of addOptions$ | async; track addOption) {\n <gn-ui-button type=\"gray\" (buttonClick)=\"onAdd(addOption.eventName)\">\n <ng-icon name=\"iconoirPlus\" class=\"text-primary\"></ng-icon> {{\n addOption.buttonLabel\n }}</gn-ui-button\n >\n }\n </div>\n @if (extents.length) {\n <gn-ui-sortable-list\n [items]=\"extents\"\n (itemsOrderChange)=\"onItemsOrderChange($event)\"\n [elementTemplate]=\"template\"\n ></gn-ui-sortable-list>\n }\n</div>\n<ng-template #template let-extent let-index=\"index\">\n @if (extent.end === undefined) {\n <div class=\"border rounded-lg px-4 pb-4\">\n <p class=\"my-2\" translate>editor.record.form.temporalExtents.date</p>\n <gn-ui-date-picker\n [date]=\"extent.start\"\n (dateChange)=\"onExtentChange({ start: $event }, index)\"\n ></gn-ui-date-picker>\n </div>\n }\n @if (extent.end !== undefined) {\n <div class=\"border rounded-lg px-4 pb-4\">\n <p class=\"my-2\" translate>editor.record.form.temporalExtents.range</p>\n <gn-ui-date-range-picker\n [startDate]=\"extent.start\"\n [endDate]=\"extent.end\"\n (startDateChange)=\"onExtentChange({ start: $event }, index)\"\n (endDateChange)=\"onExtentChange({ end: $event }, index)\"\n ></gn-ui-date-range-picker>\n </div>\n }\n</ng-template>\n", styles: [":host{--gn-ui-button-padding: 8px 8px;--gn-ui-button-rounded: 8px}\n"] }]
|
|
37589
38218
|
}], propDecorators: { value: [{
|
|
37590
38219
|
type: Input
|
|
37591
38220
|
}], valueChange: [{
|
|
@@ -37801,6 +38430,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
37801
38430
|
], template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-generic-keywords\n [placeholder]=\"'editor.record.form.keywords.place.placeholder' | translate\"\n [keywords]=\"shownKeywords$ | async\"\n [keywordTypes]=\"['place']\"\n (deletedKeyword)=\"handleKeywordDelete($event)\"\n (addedKeyword)=\"handleKeywordAdd($event)\"\n >\n </gn-ui-generic-keywords>\n <div class=\"w-full h-96 mt-2\">\n <gn-ui-spatial-extent\n [spatialExtents]=\"spatialExtents$ | async\"\n ></gn-ui-spatial-extent>\n </div>\n</div>\n" }]
|
|
37802
38431
|
}] });
|
|
37803
38432
|
|
|
38433
|
+
class FormFieldAssociatedRecordsComponent {
|
|
38434
|
+
constructor() {
|
|
38435
|
+
this.valueChange = new EventEmitter();
|
|
38436
|
+
}
|
|
38437
|
+
get list() {
|
|
38438
|
+
return this.value ?? [];
|
|
38439
|
+
}
|
|
38440
|
+
get first() {
|
|
38441
|
+
return this.list[0];
|
|
38442
|
+
}
|
|
38443
|
+
get rest() {
|
|
38444
|
+
return this.list.slice(1);
|
|
38445
|
+
}
|
|
38446
|
+
get hasParentLink() {
|
|
38447
|
+
return this.list.length > 0;
|
|
38448
|
+
}
|
|
38449
|
+
get uniqueIdentifier() {
|
|
38450
|
+
return this.first?.uniqueIdentifier ?? '';
|
|
38451
|
+
}
|
|
38452
|
+
get selectedType() {
|
|
38453
|
+
return this.first?.associationType;
|
|
38454
|
+
}
|
|
38455
|
+
get choices() {
|
|
38456
|
+
return associationTypeValues.map((value) => ({
|
|
38457
|
+
value,
|
|
38458
|
+
label: `domain.record.associationType.${value}`,
|
|
38459
|
+
}));
|
|
38460
|
+
}
|
|
38461
|
+
onToggle(checked) {
|
|
38462
|
+
this.valueChange.emit(checked
|
|
38463
|
+
? [
|
|
38464
|
+
{
|
|
38465
|
+
uniqueIdentifier: '',
|
|
38466
|
+
associationType: associationTypeValues[0],
|
|
38467
|
+
},
|
|
38468
|
+
...this.rest,
|
|
38469
|
+
]
|
|
38470
|
+
: this.rest);
|
|
38471
|
+
}
|
|
38472
|
+
onUniqueIdentifierChange(uniqueIdentifier) {
|
|
38473
|
+
this.valueChange.emit(uniqueIdentifier
|
|
38474
|
+
? [{ ...this.first, uniqueIdentifier }, ...this.rest]
|
|
38475
|
+
: this.rest);
|
|
38476
|
+
}
|
|
38477
|
+
onTypeChange(associationType) {
|
|
38478
|
+
this.valueChange.emit([
|
|
38479
|
+
{ ...this.first, associationType: associationType },
|
|
38480
|
+
...this.rest,
|
|
38481
|
+
]);
|
|
38482
|
+
}
|
|
38483
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldAssociatedRecordsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38484
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FormFieldAssociatedRecordsComponent, isStandalone: true, selector: "gn-ui-form-field-associated-records", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n <gn-ui-check-toggle\n [label]=\"'editor.record.form.field.parentLink' | translate\"\n [value]=\"hasParentLink\"\n (toggled)=\"onToggle($event)\"\n data-cy=\"associated-record-toggle\"\n ></gn-ui-check-toggle>\n @if (hasParentLink) {\n <gn-ui-form-field-wrapper\n [label]=\"'editor.record.form.field.parentIdentifier' | translate\"\n >\n <gn-ui-text-input\n [value]=\"uniqueIdentifier\"\n (valueChange)=\"onUniqueIdentifierChange($event)\"\n placeholder=\"\"\n data-cy=\"associated-record-identifier\"\n ></gn-ui-text-input>\n </gn-ui-form-field-wrapper>\n <gn-ui-form-field-wrapper\n [label]=\"'editor.record.form.field.parentType' | translate\"\n >\n <gn-ui-dropdown-selector\n [title]=\"'editor.record.form.field.parentType' | translate\"\n [showTitle]=\"false\"\n [choices]=\"choices\"\n [selected]=\"selectedType\"\n (selectValue)=\"onTypeChange($event)\"\n [extraBtnClass]=\"'input-as-button gn-ui-text-input'\"\n data-cy=\"associated-record-type\"\n ></gn-ui-dropdown-selector>\n </gn-ui-form-field-wrapper>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: CheckToggleComponent, selector: "gn-ui-check-toggle", inputs: ["title", "label", "value", "color"], outputs: ["toggled"] }, { kind: "component", type: TextInputComponent, selector: "gn-ui-text-input", inputs: ["value", "extraClass", "placeholder", "required", "disabled", "type"], outputs: ["valueChange"] }, { kind: "component", type: DropdownSelectorComponent, selector: "gn-ui-dropdown-selector", inputs: ["title", "showTitle", "ariaName", "choices", "selected", "maxRows", "extraBtnClass", "minWidth", "disabled"], outputs: ["selectValue"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "gn-ui-form-field-wrapper", inputs: ["label", "hint"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38485
|
+
}
|
|
38486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldAssociatedRecordsComponent, decorators: [{
|
|
38487
|
+
type: Component,
|
|
38488
|
+
args: [{ selector: 'gn-ui-form-field-associated-records', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
38489
|
+
CheckToggleComponent,
|
|
38490
|
+
TextInputComponent,
|
|
38491
|
+
DropdownSelectorComponent,
|
|
38492
|
+
FormFieldWrapperComponent,
|
|
38493
|
+
TranslatePipe,
|
|
38494
|
+
], template: "<div class=\"flex flex-col gap-2\">\n <gn-ui-check-toggle\n [label]=\"'editor.record.form.field.parentLink' | translate\"\n [value]=\"hasParentLink\"\n (toggled)=\"onToggle($event)\"\n data-cy=\"associated-record-toggle\"\n ></gn-ui-check-toggle>\n @if (hasParentLink) {\n <gn-ui-form-field-wrapper\n [label]=\"'editor.record.form.field.parentIdentifier' | translate\"\n >\n <gn-ui-text-input\n [value]=\"uniqueIdentifier\"\n (valueChange)=\"onUniqueIdentifierChange($event)\"\n placeholder=\"\"\n data-cy=\"associated-record-identifier\"\n ></gn-ui-text-input>\n </gn-ui-form-field-wrapper>\n <gn-ui-form-field-wrapper\n [label]=\"'editor.record.form.field.parentType' | translate\"\n >\n <gn-ui-dropdown-selector\n [title]=\"'editor.record.form.field.parentType' | translate\"\n [showTitle]=\"false\"\n [choices]=\"choices\"\n [selected]=\"selectedType\"\n (selectValue)=\"onTypeChange($event)\"\n [extraBtnClass]=\"'input-as-button gn-ui-text-input'\"\n data-cy=\"associated-record-type\"\n ></gn-ui-dropdown-selector>\n </gn-ui-form-field-wrapper>\n }\n</div>\n" }]
|
|
38495
|
+
}], propDecorators: { value: [{
|
|
38496
|
+
type: Input
|
|
38497
|
+
}], valueChange: [{
|
|
38498
|
+
type: Output
|
|
38499
|
+
}] } });
|
|
38500
|
+
|
|
37804
38501
|
class ContactCardComponent {
|
|
37805
38502
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContactCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37806
38503
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: ContactCardComponent, isStandalone: true, selector: "gn-ui-contact-card", inputs: { contact: "contact" }, ngImport: i0, template: "<div class=\"gn-ui-card\">\n <gn-ui-thumbnail\n class=\"w-[56px] h-[56px] rounded-[4px] overflow-hidden shrink-0\"\n [thumbnailUrl]=\"contact.organization?.logoUrl?.href\"\n [fit]=\"'contain'\"\n ></gn-ui-thumbnail>\n <div class=\"flex flex-col w-full overflow-hidden leading-snug justify-center\">\n <div class=\"text-[16px] font-bold text-main\" data-test=\"contactCardName\">\n {{ contact.firstName }} {{ contact.lastName }}\n </div>\n <div class=\"text-[14px] text-gray-900\" data-test=\"contactCardEmail\">\n {{ contact.email }}\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ThumbnailComponent, selector: "gn-ui-thumbnail", inputs: ["thumbnailUrl", "fit"], outputs: ["placeholderShown"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -39186,6 +39883,9 @@ class FormFieldComponent {
|
|
|
39186
39883
|
get valueAsUpdateFrequency() {
|
|
39187
39884
|
return this.value;
|
|
39188
39885
|
}
|
|
39886
|
+
get valueAsAssociatedRecords() {
|
|
39887
|
+
return this.value;
|
|
39888
|
+
}
|
|
39189
39889
|
get valueAsTemporalExtents() {
|
|
39190
39890
|
return this.value;
|
|
39191
39891
|
}
|
|
@@ -39225,7 +39925,7 @@ class FormFieldComponent {
|
|
|
39225
39925
|
}
|
|
39226
39926
|
}
|
|
39227
39927
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39228
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: FormFieldComponent, isStandalone: true, selector: "gn-ui-form-field", inputs: { uniqueIdentifier: "uniqueIdentifier", recordKind: "recordKind", model: "model", modelSpecifier: "modelSpecifier", componentName: "componentName", config: "config", value: "value" }, outputs: { valueChange: "valueChange" }, providers: [provideIcons({ matEditOutline, matHelpOutline })], viewQueries: [{ propertyName: "titleInput", first: true, predicate: ["titleInput"], descendants: true }], hostDirectives: [{ directive: FieldFocusDirective }], ngImport: i0, template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container [ngSwitch]=\"model\">\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"flex flex-row flex-start items-center gap-3 mb-[12px]\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n <ng-icon\n *ngIf=\"config.hintKey\"\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'abstract'\">\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngSwitchCase=\"'overviews'\">\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceIdentifiers'\">\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceCreated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceUpdated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'updateFrequency'\">\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngSwitchCase=\"'temporalExtents'\">\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spatialExtents'\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngSwitchCase=\"'keywords'\">\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngSwitchCase=\"'topics'\">\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n </ng-container>\n <ng-container *ngSwitchCase=\"'licenses'\">\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'legalConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'securityConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otherConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container\n ></ng-container>\n <ng-template #formFieldConstraints>\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints\n ></ng-template>\n\n <ng-container *ngSwitchCase=\"'contactsForResource'\">\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n <ng-container *ngSwitchCase=\"'contacts'\">\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:!link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-link-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-single-link-resource\n *ngIf=\"modelSpecifier === 'onlineResourceType:singleLink'\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!model\">\n <ng-container [ngSwitch]=\"componentName\">\n <ng-container *ngSwitchCase=\"'form-field-constraints-shortcuts'\">\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form-field-spatial-toggle'\">\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "gn-ui-form-field-wrapper", inputs: ["label", "hint"] }, { kind: "component", type: FormFieldLicenseComponent, selector: "gn-ui-form-field-license", inputs: ["label", "recordLicences"], outputs: ["recordLicencesChange"] }, { kind: "component", type: FormFieldDateComponent, selector: "gn-ui-form-field-date", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldUpdateFrequencyComponent, selector: "gn-ui-form-field-update-frequency", inputs: ["value", "recordKind"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldTemporalExtentsComponent, selector: "gn-ui-form-field-temporal-extents", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSimpleComponent, selector: "gn-ui-form-field-simple", inputs: ["type", "readonly", "invalid", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldRichComponent, selector: "gn-ui-form-field-rich", inputs: ["label", "hint", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSpatialExtentComponent, selector: "gn-ui-form-field-spatial-extent" }, { kind: "component", type: FormFieldKeywordsComponent, selector: "gn-ui-form-field-keywords", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOverviewsComponent, selector: "gn-ui-form-field-overviews", inputs: ["metadataUuid", "recordKind", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsForResourceComponent, selector: "gn-ui-form-field-contacts-for-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineResourcesComponent, selector: "gn-ui-form-field-online-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineLinkResourcesComponent, selector: "gn-ui-form-field-online-link-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineSingleLinkResourceComponent, selector: "gn-ui-form-field-online-single-link-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsComponent, selector: "gn-ui-form-field-contacts", inputs: ["value", "modelSpecifier"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsComponent, selector: "gn-ui-form-field-constraints", inputs: ["label", "value", "constraintType"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsShortcutsComponent, selector: "gn-ui-form-field-constraints-shortcuts" }, { kind: "component", type: FormFieldSpatialToggleComponent, selector: "gn-ui-form-field-spatial-toggle" }, { kind: "component", type: FormFieldTopicsComponent, selector: "gn-ui-form-field-topics", inputs: ["value"], outputs: ["valueChange"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "directive", type: i4$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
39928
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: FormFieldComponent, isStandalone: true, selector: "gn-ui-form-field", inputs: { uniqueIdentifier: "uniqueIdentifier", recordKind: "recordKind", model: "model", modelSpecifier: "modelSpecifier", componentName: "componentName", config: "config", value: "value" }, outputs: { valueChange: "valueChange" }, providers: [provideIcons({ matEditOutline, matHelpOutline })], viewQueries: [{ propertyName: "titleInput", first: true, predicate: ["titleInput"], descendants: true }], hostDirectives: [{ directive: FieldFocusDirective }], ngImport: i0, template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container [ngSwitch]=\"model\">\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"flex flex-row flex-start items-center gap-3 mb-[12px]\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n <ng-icon\n *ngIf=\"config.hintKey\"\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'abstract'\">\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngSwitchCase=\"'overviews'\">\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceIdentifiers'\">\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceCreated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceUpdated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'updateFrequency'\">\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngSwitchCase=\"'associatedRecords'\">\n <gn-ui-form-field-associated-records\n [value]=\"valueAsAssociatedRecords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-associated-records>\n </ng-container>\n <ng-container *ngSwitchCase=\"'temporalExtents'\">\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spatialExtents'\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngSwitchCase=\"'keywords'\">\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngSwitchCase=\"'topics'\">\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n </ng-container>\n <ng-container *ngSwitchCase=\"'licenses'\">\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'legalConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'securityConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otherConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container\n ></ng-container>\n <ng-template #formFieldConstraints>\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints\n ></ng-template>\n\n <ng-container *ngSwitchCase=\"'contactsForResource'\">\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n <ng-container *ngSwitchCase=\"'contacts'\">\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:!link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-link-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-single-link-resource\n *ngIf=\"modelSpecifier === 'onlineResourceType:singleLink'\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!model\">\n <ng-container [ngSwitch]=\"componentName\">\n <ng-container *ngSwitchCase=\"'form-field-constraints-shortcuts'\">\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form-field-spatial-toggle'\">\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "gn-ui-form-field-wrapper", inputs: ["label", "hint"] }, { kind: "component", type: FormFieldLicenseComponent, selector: "gn-ui-form-field-license", inputs: ["label", "recordLicences"], outputs: ["recordLicencesChange"] }, { kind: "component", type: FormFieldDateComponent, selector: "gn-ui-form-field-date", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldUpdateFrequencyComponent, selector: "gn-ui-form-field-update-frequency", inputs: ["value", "recordKind"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldAssociatedRecordsComponent, selector: "gn-ui-form-field-associated-records", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldTemporalExtentsComponent, selector: "gn-ui-form-field-temporal-extents", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSimpleComponent, selector: "gn-ui-form-field-simple", inputs: ["type", "readonly", "invalid", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldRichComponent, selector: "gn-ui-form-field-rich", inputs: ["label", "hint", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSpatialExtentComponent, selector: "gn-ui-form-field-spatial-extent" }, { kind: "component", type: FormFieldKeywordsComponent, selector: "gn-ui-form-field-keywords", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOverviewsComponent, selector: "gn-ui-form-field-overviews", inputs: ["metadataUuid", "recordKind", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsForResourceComponent, selector: "gn-ui-form-field-contacts-for-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineResourcesComponent, selector: "gn-ui-form-field-online-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineLinkResourcesComponent, selector: "gn-ui-form-field-online-link-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineSingleLinkResourceComponent, selector: "gn-ui-form-field-online-single-link-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsComponent, selector: "gn-ui-form-field-contacts", inputs: ["value", "modelSpecifier"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsComponent, selector: "gn-ui-form-field-constraints", inputs: ["label", "value", "constraintType"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsShortcutsComponent, selector: "gn-ui-form-field-constraints-shortcuts" }, { kind: "component", type: FormFieldSpatialToggleComponent, selector: "gn-ui-form-field-spatial-toggle" }, { kind: "component", type: FormFieldTopicsComponent, selector: "gn-ui-form-field-topics", inputs: ["value"], outputs: ["valueChange"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "directive", type: i4$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
39229
39929
|
}
|
|
39230
39930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
39231
39931
|
type: Component,
|
|
@@ -39237,6 +39937,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
39237
39937
|
FormFieldLicenseComponent,
|
|
39238
39938
|
FormFieldDateComponent,
|
|
39239
39939
|
FormFieldUpdateFrequencyComponent,
|
|
39940
|
+
FormFieldAssociatedRecordsComponent,
|
|
39240
39941
|
FormFieldTemporalExtentsComponent,
|
|
39241
39942
|
FormFieldSimpleComponent,
|
|
39242
39943
|
FormFieldRichComponent,
|
|
@@ -39254,7 +39955,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
39254
39955
|
FormFieldTopicsComponent,
|
|
39255
39956
|
TextFieldModule,
|
|
39256
39957
|
NgIconComponent,
|
|
39257
|
-
], providers: [provideIcons({ matEditOutline, matHelpOutline })], hostDirectives: [FieldFocusDirective], template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container [ngSwitch]=\"model\">\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"flex flex-row flex-start items-center gap-3 mb-[12px]\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n <ng-icon\n *ngIf=\"config.hintKey\"\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'abstract'\">\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngSwitchCase=\"'overviews'\">\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceIdentifiers'\">\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceCreated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceUpdated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'updateFrequency'\">\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngSwitchCase=\"'temporalExtents'\">\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spatialExtents'\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngSwitchCase=\"'keywords'\">\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngSwitchCase=\"'topics'\">\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n </ng-container>\n <ng-container *ngSwitchCase=\"'licenses'\">\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'legalConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'securityConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otherConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container\n ></ng-container>\n <ng-template #formFieldConstraints>\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints\n ></ng-template>\n\n <ng-container *ngSwitchCase=\"'contactsForResource'\">\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n <ng-container *ngSwitchCase=\"'contacts'\">\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:!link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-link-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-single-link-resource\n *ngIf=\"modelSpecifier === 'onlineResourceType:singleLink'\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!model\">\n <ng-container [ngSwitch]=\"componentName\">\n <ng-container *ngSwitchCase=\"'form-field-constraints-shortcuts'\">\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form-field-spatial-toggle'\">\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"] }]
|
|
39958
|
+
], providers: [provideIcons({ matEditOutline, matHelpOutline })], hostDirectives: [FieldFocusDirective], template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container [ngSwitch]=\"model\">\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"flex flex-row flex-start items-center gap-3 mb-[12px]\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n <ng-icon\n *ngIf=\"config.hintKey\"\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'abstract'\">\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngSwitchCase=\"'overviews'\">\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceIdentifiers'\">\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceCreated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceUpdated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'updateFrequency'\">\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngSwitchCase=\"'associatedRecords'\">\n <gn-ui-form-field-associated-records\n [value]=\"valueAsAssociatedRecords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-associated-records>\n </ng-container>\n <ng-container *ngSwitchCase=\"'temporalExtents'\">\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spatialExtents'\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngSwitchCase=\"'keywords'\">\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngSwitchCase=\"'topics'\">\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n </ng-container>\n <ng-container *ngSwitchCase=\"'licenses'\">\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'legalConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'securityConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otherConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container\n ></ng-container>\n <ng-template #formFieldConstraints>\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints\n ></ng-template>\n\n <ng-container *ngSwitchCase=\"'contactsForResource'\">\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n <ng-container *ngSwitchCase=\"'contacts'\">\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:!link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-link-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-single-link-resource\n *ngIf=\"modelSpecifier === 'onlineResourceType:singleLink'\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!model\">\n <ng-container [ngSwitch]=\"componentName\">\n <ng-container *ngSwitchCase=\"'form-field-constraints-shortcuts'\">\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form-field-spatial-toggle'\">\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"] }]
|
|
39258
39959
|
}], propDecorators: { uniqueIdentifier: [{
|
|
39259
39960
|
type: Input
|
|
39260
39961
|
}], recordKind: [{
|
|
@@ -39839,7 +40540,7 @@ class RouterService {
|
|
|
39839
40540
|
return ROUTER_ROUTE_ORGANIZATION;
|
|
39840
40541
|
}
|
|
39841
40542
|
getDefaultSort() {
|
|
39842
|
-
return SortByEnum.
|
|
40543
|
+
return SortByEnum.RESOURCE_DATE;
|
|
39843
40544
|
}
|
|
39844
40545
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
39845
40546
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RouterService, providedIn: 'root' }); }
|
|
@@ -39899,7 +40600,7 @@ function flattenQueryParams(params) {
|
|
|
39899
40600
|
const start = flattened[key].start;
|
|
39900
40601
|
const end = flattened[key].end;
|
|
39901
40602
|
flattened[key] = [
|
|
39902
|
-
`${start ? formatDate(start) : ''}..${formatDate(end)
|
|
40603
|
+
`${start ? formatDate(start) : ''}..${end ? formatDate(end) : ''}`,
|
|
39903
40604
|
];
|
|
39904
40605
|
}
|
|
39905
40606
|
}
|
|
@@ -40256,5 +40957,5 @@ const CHART_TYPE_VALUES = [
|
|
|
40256
40957
|
* Generated bundle index. Do not edit.
|
|
40257
40958
|
*/
|
|
40258
40959
|
|
|
40259
|
-
export { ADD_RESULTS, ADD_SEARCH, AVAILABLE_LICENSES, AbstractAction, AbstractSearchField, ActionMenuComponent, AddLayerFromCatalogComponent, AddLayerRecordPreviewComponent, AddResults, AddSearch, AnchorLinkDirective, ApiCardComponent, ApplicationBannerComponent, AuthService, AutocompleteComponent, AvailableServicesField, AvatarComponent, AvatarServiceInterface, BASEMAP_LAYERS, BadgeComponent, BaseConverter, BaseFileReader, BaseReader, BlockListComponent, 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, 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, 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, isConfigLoaded, isDateRange, 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, provideRepositoryUrl, readAttribute, readDataset, readDatasetHeaders, 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 };
|
|
40960
|
+
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, ResourceCreationRevisionDateSearchField, ResourceTypeLegacyField, ResultsHitsContainerComponent, ResultsHitsNumberComponent, ResultsHitsSearchKindComponent, ResultsLayoutComponent, ResultsLayoutConfigItem, ResultsListComponent, ResultsListContainerComponent, ResultsListItemComponent, ResultsTableComponent, ResultsTableContainerComponent, ReusePresentationForms, RoleLabels, RoleValues, RouterEffects, RouterFacade, RouterService, SEARCH_FEATURE_KEY, SETTINGS_URL, SET_CONFIG_AGGREGATIONS, SET_CONFIG_FILTERS, SET_CONFIG_REQUEST_FIELDS, SET_ERROR, SET_FAVORITES_ONLY, SET_FILTERS, SET_INCLUDE_ON_AGGREGATION, SET_PAGE_SIZE, SET_RESULTS_AGGREGATIONS, SET_RESULTS_HITS, SET_RESULTS_LAYOUT, SET_SEARCH, SET_SORT_BY, SET_SPATIAL_FILTER_ENABLED, SPATIAL_SCOPES, SearchEffects, SearchFacade, SearchFeatureCatalogComponent, SearchFiltersSummaryComponent, SearchFiltersSummaryItemComponent, SearchInputComponent, SearchRouterContainerDirective, SearchService, SearchStateContainerDirective, SelectionService, ServiceCapabilitiesComponent, SetConfigAggregations, SetConfigFilters, SetConfigRequestFields, SetError, SetFavoritesOnly, SetFilters, SetIncludeOnAggregation, SetPageSize, SetResultsAggregations, SetResultsHits, SetResultsLayout, SetSearch, SetSortBy, SetSpatialFilterEnabled, SimpleSearchField, SiteTitleComponent, SortByComponent, SortByEnum, SortableListComponent, SourceLabelComponent, SourcesService, SpatialExtentComponent, SpatialExtentDropdownComponent, SpinningLoaderComponent, StacItemsResultGridComponent, StacViewComponent, StarToggleComponent, StickyHeaderComponent, SupportedTypes, SwitchToggleComponent, THUMBNAIL_PLACEHOLDER, TRANSLATE_DEBUG_CONFIG, TRANSLATE_DEFAULT_CONFIG, TRANSLATE_WITH_OVERRIDES_CONFIG, TableViewComponent, TextAreaComponent, TextInputComponent, ThemeService, ThumbnailComponent, TranslatedSearchField, TruncatedTextComponent, UPDATE_CONFIG_AGGREGATIONS, UPDATE_FILTERS, UPDATE_REQUEST_AGGREGATION_TERM, UpdateConfigAggregations, UpdateFilters, UrlInputComponent, UserFeedbackItemComponent, UserPreviewComponent, UserSearchField, VECTOR_STYLE_DEFAULT, ViewportIntersectorComponent, WEB_COMPONENT_EMBEDDER_URL, XmlParseError, _reset, allChildrenElement, appConfigWithTranslationFixture, appendChildTree, appendChildren, assertValidXml, associationTypeValues, bboxToPolygon, blockModelFixture, bytesToMegabytes, canEditRecord, checkFileFormat, clearSelectedFeatures, createChild, createDocument, createElement, createFuzzyFilter, createNestedChild, createNestedElement, createSpatialExtentLayer, currentPage, defaultMapStyleFixture, defaultMapStyleHlFixture, downgradeImage, downsizeImage, draftSaveSuccess, dragPanCondition, dropEmptyTranslations, editorReducer, emptyBlockModelFixture, findChildElement, findChildOrCreate, findChildrenElement, findConverterForDocument, findNestedChildOrCreate, findNestedElement, findNestedElements, findParent, firstChildElement, formatDate, formatUserInfo, getAddressLines, getAllKeysValidator, getArrayItem, getAsArray, getAsUrl, getBadgeColor, getCustomTranslations, getError, getFavoritesOnly, getFileFormat, getFileFormatFromServiceOutput, getFirstValue, getFormatPriority, getGeometryBoundingBox, getGeometryFromGeoJSON, getGlobalConfig, getIndividualDisplayName, getIsMobile, getJsonDataItemsProxy, getKeywordHierarchyPath, getLayers, getLinkId, getLinkLabel, getLinkPriority, getMapContext, getMapContextLayerFromConfig, getMapState, getMetadataQualityConfig, getMimeTypeForFormat, getNamespace, getOptionalEditorConfig, getOptionalMapConfig, getOptionalSearchConfig, getPageSize, getQualityValidators, getResourceType, getReusePresentationForm, getReuseType, getRootElement, getSearchConfigAggregations, getSearchFilters, getSearchResults, getSearchResultsAggregations, getSearchResultsHits, getSearchResultsLayout, getSearchResultsLoading, getSearchSortBy, getSearchState, getSearchStateSearch, getSelectedFeatures, getSpatialFilterEnabled, getTemporalRangeUnion, getThemeConfig, handleScrollOnNavigation, hasRecordChangedSinceDraft, hasRecordChangedSinceDraftSuccess, initSearch, initialEditorState, initialMapState, initialState, isBoundingBox, 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 };
|
|
40260
40961
|
//# sourceMappingURL=geonetwork-ui.mjs.map
|