@igo2/geo 21.0.0-next.21 → 21.0.0-next.23
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/igo2-geo.mjs +162 -107
- package/fesm2022/igo2-geo.mjs.map +1 -1
- package/package.json +4 -4
- package/types/igo2-geo.d.ts +19 -6
package/fesm2022/igo2-geo.mjs
CHANGED
|
@@ -4208,16 +4208,16 @@ class LayerBase {
|
|
|
4208
4208
|
return this.ol.getMinResolution();
|
|
4209
4209
|
}
|
|
4210
4210
|
set visible(value) {
|
|
4211
|
-
if (value === this.
|
|
4211
|
+
if (value === this._visible$.value) {
|
|
4212
4212
|
return;
|
|
4213
4213
|
}
|
|
4214
4214
|
this.ol.setVisible(value);
|
|
4215
4215
|
this._visible$.next(value);
|
|
4216
4216
|
}
|
|
4217
4217
|
get visible() {
|
|
4218
|
-
return this._visible$.value ??
|
|
4218
|
+
return this._visible$.value ?? true; // Default to true if undefined
|
|
4219
4219
|
}
|
|
4220
|
-
_visible$ = new BehaviorSubject(
|
|
4220
|
+
_visible$ = new BehaviorSubject(undefined);
|
|
4221
4221
|
visible$ = this._visible$.asObservable();
|
|
4222
4222
|
get parent() {
|
|
4223
4223
|
return this.parent$.value;
|
|
@@ -10885,7 +10885,6 @@ class DataSourceService {
|
|
|
10885
10885
|
ogcFilterService = inject(OGCFilterService);
|
|
10886
10886
|
languageService = inject(LanguageService);
|
|
10887
10887
|
messageService = inject(MessageService);
|
|
10888
|
-
xhrInterceptor = inject(XHR_INTERCEPTOR, { optional: true });
|
|
10889
10888
|
createAsyncDataSource(options, detailedContextUri) {
|
|
10890
10889
|
if (!options.type) {
|
|
10891
10890
|
console.error(options);
|
|
@@ -21616,22 +21615,22 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21616
21615
|
* Bind this strategy to a store and start watching for entities changes
|
|
21617
21616
|
* @param store Feature store
|
|
21618
21617
|
*/
|
|
21619
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21620
21618
|
bindStore(store) {
|
|
21621
21619
|
super.bindStore(store);
|
|
21620
|
+
const featureStore = store;
|
|
21622
21621
|
if (this.active === true) {
|
|
21623
|
-
this.watchStore(
|
|
21622
|
+
this.watchStore(featureStore);
|
|
21624
21623
|
}
|
|
21625
21624
|
}
|
|
21626
21625
|
/**
|
|
21627
21626
|
* Unbind this strategy from a store and stop watching for entities changes
|
|
21628
21627
|
* @param store Feature store
|
|
21629
21628
|
*/
|
|
21630
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21631
21629
|
unbindStore(store) {
|
|
21632
21630
|
super.unbindStore(store);
|
|
21631
|
+
const featureStore = store;
|
|
21633
21632
|
if (this.active === true) {
|
|
21634
|
-
this.unwatchStore(
|
|
21633
|
+
this.unwatchStore(featureStore);
|
|
21635
21634
|
}
|
|
21636
21635
|
}
|
|
21637
21636
|
/**
|
|
@@ -21648,32 +21647,147 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21648
21647
|
doDeactivate() {
|
|
21649
21648
|
this.unwatchAll();
|
|
21650
21649
|
}
|
|
21651
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21652
21650
|
initStoreSearchIndex(store) {
|
|
21653
|
-
store.searchDocument =
|
|
21651
|
+
store.searchDocument = this.createEmptySearchDocument();
|
|
21652
|
+
}
|
|
21653
|
+
createEmptySearchDocument() {
|
|
21654
|
+
return new FlexSearch.Document({ tokenize: 'full' });
|
|
21655
|
+
}
|
|
21656
|
+
createSearchDocument(indexFields) {
|
|
21657
|
+
return new FlexSearch.Document({
|
|
21658
|
+
document: {
|
|
21659
|
+
id: 'igoSearchID',
|
|
21660
|
+
index: indexFields
|
|
21661
|
+
}
|
|
21662
|
+
});
|
|
21663
|
+
}
|
|
21664
|
+
toSearchableValue(value) {
|
|
21665
|
+
if (value === null || value === undefined) {
|
|
21666
|
+
return undefined;
|
|
21667
|
+
}
|
|
21668
|
+
if (typeof value === 'string' ||
|
|
21669
|
+
typeof value === 'number' ||
|
|
21670
|
+
typeof value === 'boolean') {
|
|
21671
|
+
return String(value);
|
|
21672
|
+
}
|
|
21673
|
+
if (Array.isArray(value)) {
|
|
21674
|
+
const values = value
|
|
21675
|
+
.map((item) => this.toSearchableValue(item))
|
|
21676
|
+
.filter((item) => item !== undefined && item !== '');
|
|
21677
|
+
return values.length ? values.join(' ') : undefined;
|
|
21678
|
+
}
|
|
21679
|
+
return undefined;
|
|
21680
|
+
}
|
|
21681
|
+
toFieldName(value) {
|
|
21682
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
21683
|
+
}
|
|
21684
|
+
buildSearchDocument(properties, fieldNames, igoSearchID) {
|
|
21685
|
+
const searchDocument = { igoSearchID };
|
|
21686
|
+
fieldNames.forEach((fieldName) => {
|
|
21687
|
+
const value = this.toSearchableValue(properties[fieldName]);
|
|
21688
|
+
if (value !== undefined) {
|
|
21689
|
+
searchDocument[fieldName] = value;
|
|
21690
|
+
}
|
|
21691
|
+
});
|
|
21692
|
+
return searchDocument;
|
|
21693
|
+
}
|
|
21694
|
+
collectIndexedFeatures(store) {
|
|
21695
|
+
const indexedFeatures = [];
|
|
21696
|
+
store.index.forEach((value, key) => {
|
|
21697
|
+
indexedFeatures.push({
|
|
21698
|
+
igoSearchID: key,
|
|
21699
|
+
properties: value.properties
|
|
21700
|
+
});
|
|
21701
|
+
});
|
|
21702
|
+
return indexedFeatures;
|
|
21703
|
+
}
|
|
21704
|
+
resolveIndexFields(indexedFeatures) {
|
|
21705
|
+
return this.options.sourceFields?.length
|
|
21706
|
+
? this.resolveConfiguredIndexFields()
|
|
21707
|
+
: this.resolveInferredIndexFields(indexedFeatures);
|
|
21708
|
+
}
|
|
21709
|
+
resolveConfiguredIndexFields() {
|
|
21710
|
+
const indexFields = [];
|
|
21711
|
+
this.options.sourceFields
|
|
21712
|
+
?.filter((sourceField) => sourceField.searchIndex?.enabled)
|
|
21713
|
+
.forEach((sourceField) => {
|
|
21714
|
+
const fieldName = this.toFieldName(sourceField.name);
|
|
21715
|
+
if (fieldName === undefined) {
|
|
21716
|
+
return;
|
|
21717
|
+
}
|
|
21718
|
+
indexFields.push({
|
|
21719
|
+
...sourceField.searchIndex,
|
|
21720
|
+
field: fieldName,
|
|
21721
|
+
tokenize: sourceField.searchIndex?.tokenize ?? 'full'
|
|
21722
|
+
});
|
|
21723
|
+
});
|
|
21724
|
+
return indexFields;
|
|
21725
|
+
}
|
|
21726
|
+
resolveInferredIndexFields(indexedFeatures) {
|
|
21727
|
+
const sampleProperties = indexedFeatures[0]?.properties;
|
|
21728
|
+
if (sampleProperties === undefined) {
|
|
21729
|
+
return [];
|
|
21730
|
+
}
|
|
21731
|
+
return Object.keys(sampleProperties)
|
|
21732
|
+
.filter((fieldName) => fieldName !== 'igoSearchID')
|
|
21733
|
+
.filter((fieldName) => this.shouldIndexField(fieldName, indexedFeatures))
|
|
21734
|
+
.map((field) => ({ field, tokenize: 'full' }));
|
|
21735
|
+
}
|
|
21736
|
+
shouldIndexField(fieldName, indexedFeatures) {
|
|
21737
|
+
const values = indexedFeatures.map((feature) => feature.properties[fieldName]);
|
|
21738
|
+
const searchableValues = values
|
|
21739
|
+
.map((value) => this.toSearchableValue(value))
|
|
21740
|
+
.filter((value) => value !== undefined);
|
|
21741
|
+
if (searchableValues.length === 0) {
|
|
21742
|
+
return false;
|
|
21743
|
+
}
|
|
21744
|
+
const distinctValueRatio = (new Set(searchableValues).size / indexedFeatures.length) * 100;
|
|
21745
|
+
return !(distinctValueRatio <= this.getDistinctValueRatio() ||
|
|
21746
|
+
this.hasExclusiveFloatValues(values));
|
|
21747
|
+
}
|
|
21748
|
+
getDistinctValueRatio() {
|
|
21749
|
+
return this.options.percentDistinctValueRatio || 2;
|
|
21750
|
+
}
|
|
21751
|
+
hasExclusiveFloatValues(values) {
|
|
21752
|
+
return values.every((value) => typeof value === 'number' && !Number.isInteger(value));
|
|
21753
|
+
}
|
|
21754
|
+
buildSearchDocuments(indexedFeatures, indexFields) {
|
|
21755
|
+
const fieldNamesToIndex = indexFields.map((item) => item.field);
|
|
21756
|
+
return indexedFeatures
|
|
21757
|
+
.map((feature) => this.buildSearchDocument(feature.properties, fieldNamesToIndex, feature.igoSearchID))
|
|
21758
|
+
.filter((document) => Object.keys(document).length > 1);
|
|
21759
|
+
}
|
|
21760
|
+
rebuildSearchDocument(store, indexFields, documents) {
|
|
21761
|
+
if (indexFields.length === 0 || documents.length === 0) {
|
|
21762
|
+
this.initStoreSearchIndex(store);
|
|
21763
|
+
return;
|
|
21764
|
+
}
|
|
21765
|
+
const searchDocument = this.createSearchDocument(indexFields);
|
|
21766
|
+
documents.forEach((document) => searchDocument.add(document));
|
|
21767
|
+
store.searchDocument = searchDocument;
|
|
21654
21768
|
}
|
|
21655
21769
|
/**
|
|
21656
21770
|
* Watch for a store's entities changes
|
|
21657
21771
|
* @param store Feature store
|
|
21658
21772
|
*/
|
|
21659
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21660
21773
|
watchStore(store) {
|
|
21661
21774
|
if (this.stores$$.has(store)) {
|
|
21662
21775
|
return;
|
|
21663
21776
|
}
|
|
21664
21777
|
this.initStoreSearchIndex(store);
|
|
21665
|
-
store.entities$
|
|
21666
|
-
|
|
21667
|
-
.pipe(skipWhile((e) => !e.length))
|
|
21778
|
+
const subscription = store.entities$
|
|
21779
|
+
.pipe(skipWhile((entities) => entities.length === 0))
|
|
21668
21780
|
.subscribe(() => this.onEntitiesChanges(store));
|
|
21781
|
+
this.stores$$.set(store, subscription);
|
|
21669
21782
|
}
|
|
21670
21783
|
/**
|
|
21671
21784
|
* Stop watching for a store's entities changes
|
|
21672
21785
|
* @param store Feature store
|
|
21673
21786
|
*/
|
|
21674
21787
|
unwatchStore(store) {
|
|
21675
|
-
const
|
|
21676
|
-
if (
|
|
21788
|
+
const subscription = this.stores$$.get(store);
|
|
21789
|
+
if (subscription !== undefined) {
|
|
21790
|
+
subscription.unsubscribe();
|
|
21677
21791
|
store.searchDocument = undefined;
|
|
21678
21792
|
this.stores$$.delete(store);
|
|
21679
21793
|
}
|
|
@@ -21682,6 +21796,9 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21682
21796
|
* Stop watching for OL source changes in all stores.
|
|
21683
21797
|
*/
|
|
21684
21798
|
unwatchAll() {
|
|
21799
|
+
Array.from(this.stores$$.values()).forEach((subscription) => {
|
|
21800
|
+
subscription.unsubscribe();
|
|
21801
|
+
});
|
|
21685
21802
|
this.stores$$.clear();
|
|
21686
21803
|
}
|
|
21687
21804
|
/**
|
|
@@ -21689,75 +21806,10 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21689
21806
|
* @param store Feature store
|
|
21690
21807
|
*/
|
|
21691
21808
|
onEntitiesChanges(store) {
|
|
21692
|
-
const
|
|
21693
|
-
|
|
21694
|
-
const
|
|
21695
|
-
|
|
21696
|
-
const fp = value.properties;
|
|
21697
|
-
fp.igoSearchID = key;
|
|
21698
|
-
featuresProperties.push(fp);
|
|
21699
|
-
});
|
|
21700
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21701
|
-
const toIndex = [];
|
|
21702
|
-
let columnsToNotIndex = [];
|
|
21703
|
-
let contentToIndex = [];
|
|
21704
|
-
if (this.options.sourceFields) {
|
|
21705
|
-
columnsToNotIndex = this.options.sourceFields.filter((sf) => !sf.searchIndex?.enabled);
|
|
21706
|
-
contentToIndex = this.options.sourceFields
|
|
21707
|
-
.filter((sf) => sf.searchIndex?.enabled)
|
|
21708
|
-
.map((sf2) => {
|
|
21709
|
-
return Object.assign({}, { field: sf2.name, tokenize: 'full' }, sf2.searchIndex);
|
|
21710
|
-
});
|
|
21711
|
-
}
|
|
21712
|
-
else {
|
|
21713
|
-
if (featuresProperties.length) {
|
|
21714
|
-
// THIS METHOD COMPUTE COLUMN DISTINCT VALUE TO FILTER WHICH COLUMN TO INDEX BASED ON A RATIO or discard float columns
|
|
21715
|
-
const columns = Object.keys(featuresProperties[0]);
|
|
21716
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21717
|
-
const columnsToIndex = [];
|
|
21718
|
-
columnsToNotIndex = columns
|
|
21719
|
-
.map((column) => {
|
|
21720
|
-
const distinctValues = [
|
|
21721
|
-
...new Set(featuresProperties.map((item) => item[column]))
|
|
21722
|
-
];
|
|
21723
|
-
// identify column to not index based on a ratio distinctValues/nb of features OR discart exclusive float column (ex: lat, long)
|
|
21724
|
-
if ((distinctValues.length / featuresProperties.length) * 100 <=
|
|
21725
|
-
ratio ||
|
|
21726
|
-
distinctValues.every((n) => Number(n) === n && n % 1 !== 0)) {
|
|
21727
|
-
columnsToNotIndex.push(column);
|
|
21728
|
-
}
|
|
21729
|
-
else {
|
|
21730
|
-
columnsToIndex.push(column);
|
|
21731
|
-
}
|
|
21732
|
-
})
|
|
21733
|
-
.filter((f) => f);
|
|
21734
|
-
const keysToIndex = columnsToIndex.filter((f) => f !== 'igoSearchID');
|
|
21735
|
-
contentToIndex = keysToIndex.map((key) => {
|
|
21736
|
-
return { field: key, tokenize: 'full' };
|
|
21737
|
-
});
|
|
21738
|
-
}
|
|
21739
|
-
}
|
|
21740
|
-
store.index.forEach((value) => {
|
|
21741
|
-
const propertiesToIndex = JSON.parse(JSON.stringify(value.properties));
|
|
21742
|
-
columnsToNotIndex.map((c) => delete propertiesToIndex[c]);
|
|
21743
|
-
if (Object.keys(propertiesToIndex).length) {
|
|
21744
|
-
toIndex.push(propertiesToIndex);
|
|
21745
|
-
}
|
|
21746
|
-
});
|
|
21747
|
-
if (toIndex.length === 0) {
|
|
21748
|
-
this.initStoreSearchIndex(store);
|
|
21749
|
-
}
|
|
21750
|
-
else {
|
|
21751
|
-
store.searchDocument = new FlexSearch.Document({
|
|
21752
|
-
document: {
|
|
21753
|
-
id: 'igoSearchID',
|
|
21754
|
-
index: contentToIndex
|
|
21755
|
-
}
|
|
21756
|
-
});
|
|
21757
|
-
toIndex.map((i) => {
|
|
21758
|
-
store.searchDocument.add(i.igoSearchID, i);
|
|
21759
|
-
});
|
|
21760
|
-
}
|
|
21809
|
+
const indexedFeatures = this.collectIndexedFeatures(store);
|
|
21810
|
+
const indexFields = this.resolveIndexFields(indexedFeatures);
|
|
21811
|
+
const documents = this.buildSearchDocuments(indexedFeatures, indexFields);
|
|
21812
|
+
this.rebuildSearchDocument(store, indexFields, documents);
|
|
21761
21813
|
}
|
|
21762
21814
|
}
|
|
21763
21815
|
|
|
@@ -30008,7 +30060,7 @@ class ImportExportComponent {
|
|
|
30008
30060
|
layer.dataSource.ol.getFeatures().length === 0) {
|
|
30009
30061
|
previousSpecs.push({
|
|
30010
30062
|
id: layer.id,
|
|
30011
|
-
visible: layer.visible,
|
|
30063
|
+
visible: layer.visible ?? true,
|
|
30012
30064
|
opacity: layer.opacity,
|
|
30013
30065
|
queryable: layer.queryable
|
|
30014
30066
|
});
|
|
@@ -32304,7 +32356,7 @@ class SearchResultsItemComponent {
|
|
|
32304
32356
|
}
|
|
32305
32357
|
}
|
|
32306
32358
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32307
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchResultsItemComponent, isStandalone: true, selector: "igo-search-results-item", inputs: { result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: true, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null }, withZoomButton: { classPropertyName: "withZoomButton", publicName: "withZoomButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zoomEvent: "zoomEvent" }, ngImport: i0, template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon matListItemIcon>{{ showIcons() ? icon : 'blank' }}</mat-icon>\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [
|
|
32359
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchResultsItemComponent, isStandalone: true, selector: "igo-search-results-item", inputs: { result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: true, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null }, withZoomButton: { classPropertyName: "withZoomButton", publicName: "withZoomButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zoomEvent: "zoomEvent" }, ngImport: i0, template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon matListItemIcon>{{ showIcons() ? icon : 'blank' }}</mat-icon>\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [innerHTML]=\"titleHtml | sanitizeHtml\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"tooltipHtml\"\n matTooltipClass=\"search-result-tooltip\"\n ></span>\n } @else {\n <span\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"title\"\n >{{ title }}</span\n >\n }\n\n <div matListItemMeta>\n @if (withZoomButton()) {\n <button igoStopPropagation mat-icon-button (click)=\"onZoomHandler()\">\n <mat-icon>search</mat-icon>\n </button>\n }\n\n <ng-content select=\"[igoSearchItemToolbar]\" />\n </div>\n</mat-list-item>\n", styles: [":host ::ng-deep small{color:#8c8c8c}:host div[matlistitemmeta]:empty{display:none}:host ::ng-deep .search-result-tooltip{white-space:pre-line}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:#000}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#000000de}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32308
32360
|
}
|
|
32309
32361
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsItemComponent, decorators: [{
|
|
32310
32362
|
type: Component,
|
|
@@ -32313,8 +32365,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
32313
32365
|
MatIconModule,
|
|
32314
32366
|
MatTooltipModule,
|
|
32315
32367
|
MatButtonModule,
|
|
32368
|
+
SanitizeHtmlPipe,
|
|
32316
32369
|
StopPropagationDirective
|
|
32317
|
-
], template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon matListItemIcon>{{ showIcons() ? icon : 'blank' }}</mat-icon>\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [
|
|
32370
|
+
], template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon matListItemIcon>{{ showIcons() ? icon : 'blank' }}</mat-icon>\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [innerHTML]=\"titleHtml | sanitizeHtml\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"tooltipHtml\"\n matTooltipClass=\"search-result-tooltip\"\n ></span>\n } @else {\n <span\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"title\"\n >{{ title }}</span\n >\n }\n\n <div matListItemMeta>\n @if (withZoomButton()) {\n <button igoStopPropagation mat-icon-button (click)=\"onZoomHandler()\">\n <mat-icon>search</mat-icon>\n </button>\n }\n\n <ng-content select=\"[igoSearchItemToolbar]\" />\n </div>\n</mat-list-item>\n", styles: [":host ::ng-deep small{color:#8c8c8c}:host div[matlistitemmeta]:empty{display:none}:host ::ng-deep .search-result-tooltip{white-space:pre-line}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:#000}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#000000de}\n"] }]
|
|
32318
32371
|
}], propDecorators: { result: [{ type: i0.Input, args: [{ isSignal: true, alias: "result", required: true }] }], map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }], showIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcons", required: false }] }], withZoomButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "withZoomButton", required: false }] }], zoomEvent: [{ type: i0.Output, args: ["zoomEvent"] }] } });
|
|
32319
32372
|
|
|
32320
32373
|
class SaveFeatureDialogComponent {
|
|
@@ -32972,7 +33025,7 @@ class SearchResultsComponent {
|
|
|
32972
33025
|
return;
|
|
32973
33026
|
}
|
|
32974
33027
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32975
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchResultsComponent, isStandalone: true, selector: "igo-search-results", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: true, transformFunction: null }, showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, withZoomButton: { classPropertyName: "withZoomButton", publicName: "withZoomButton", isSignal: true, isRequired: false, transformFunction: null }, tabsMode: { classPropertyName: "tabsMode", publicName: "tabsMode", isSignal: true, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null }, termSplitter: { classPropertyName: "termSplitter", publicName: "termSplitter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resultFocus: "resultFocus", resultUnfocus: "resultUnfocus", resultSelect: "resultSelect", moreResults: "moreResults", resultMouseenter: "resultMouseenter", resultMouseleave: "resultMouseleave" }, queries: [{ propertyName: "templateSearchToolbar", first: true, predicate: ["igoSearchItemToolbar"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (tabsMode() === false) {\n <igo-list [navigation]=\"true\">\n @for (group of results$ | async; track group) {\n @if (mode() === searchResultMode.Grouped) {\n <igo-collapsible\n [class]=\"group.source.getId()\"\n [title]=\"computeGroupTitle(group)\"\n [collapsed]=\"collapsed[group.source.title]\"\n (toggle)=\"collapsed[group.source.title] = $event\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n </igo-collapsible>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n }\n\n <ng-template #storeItemTemplate let-results=\"results\">\n @for (result of results; track result) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n }\n </igo-list>\n}\n\n@if (tabsMode()) {\n <igo-list [navigation]=\"true\">\n @if (mode() === searchResultMode.Grouped) {\n <mat-tab-group class=\"custom-tabs-view\" dynamicHeight>\n @for (group of results$ | async; track group) {\n <mat-tab [label]=\"computeGroupTitle(group)\">\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplateGroup;\n context: { group: group }\n \"\n />\n </mat-tab>\n }\n </mat-tab-group>\n } @else {\n @for (group of results$ | async; track group) {\n <ng-container\n *ngTemplateOutlet=\"storeItemTemplateGroup; context: { group: group }\"\n />\n }\n }\n\n <ng-template #storeItemTemplateGroup let-group=\"group\">\n @for (result of group.results; track result) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n </igo-list>\n}\n", styles: [":host .moreResults{cursor:pointer;color:#00f;float:right;margin-right:10px;margin-top:5px}:host igo-list ::ng-deep mat-list{height:100%}:host igo-list ::ng-deep mat-list .custom-tabs-view .mat-mdc-tab-header-pagination{min-width:20px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchResultsItemComponent, selector: "igo-search-results-item", inputs: ["result", "map", "showIcons", "withZoomButton"], outputs: ["zoomEvent"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1$4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i1$4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33028
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchResultsComponent, isStandalone: true, selector: "igo-search-results", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: true, transformFunction: null }, showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, withZoomButton: { classPropertyName: "withZoomButton", publicName: "withZoomButton", isSignal: true, isRequired: false, transformFunction: null }, tabsMode: { classPropertyName: "tabsMode", publicName: "tabsMode", isSignal: true, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null }, termSplitter: { classPropertyName: "termSplitter", publicName: "termSplitter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resultFocus: "resultFocus", resultUnfocus: "resultUnfocus", resultSelect: "resultSelect", moreResults: "moreResults", resultMouseenter: "resultMouseenter", resultMouseleave: "resultMouseleave" }, queries: [{ propertyName: "templateSearchToolbar", first: true, predicate: ["igoSearchItemToolbar"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (tabsMode() === false) {\n <igo-list [navigation]=\"true\">\n @for (group of results$ | async; track group.source.getId()) {\n @if (mode() === searchResultMode.Grouped) {\n <igo-collapsible\n [class]=\"group.source.getId()\"\n [title]=\"computeGroupTitle(group)\"\n [collapsed]=\"collapsed[group.source.title]\"\n (toggle)=\"collapsed[group.source.title] = $event\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n </igo-collapsible>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n }\n\n <ng-template #storeItemTemplate let-results=\"results\">\n @for (result of results; track result.meta.id) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n }\n </igo-list>\n}\n\n@if (tabsMode()) {\n <igo-list [navigation]=\"true\">\n @if (mode() === searchResultMode.Grouped) {\n <mat-tab-group class=\"custom-tabs-view\" dynamicHeight>\n @for (group of results$ | async; track group.source.getId()) {\n <mat-tab [label]=\"computeGroupTitle(group)\">\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplateGroup;\n context: { group: group }\n \"\n />\n </mat-tab>\n }\n </mat-tab-group>\n } @else {\n @for (group of results$ | async; track group.source.getId()) {\n <ng-container\n *ngTemplateOutlet=\"storeItemTemplateGroup; context: { group: group }\"\n />\n }\n }\n\n <ng-template #storeItemTemplateGroup let-group=\"group\">\n @for (result of group.results; track result.meta.id) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n </igo-list>\n}\n", styles: [":host .moreResults{cursor:pointer;color:#00f;float:right;margin-right:10px;margin-top:5px}:host igo-list ::ng-deep mat-list{height:100%}:host igo-list ::ng-deep mat-list .custom-tabs-view .mat-mdc-tab-header-pagination{min-width:20px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchResultsItemComponent, selector: "igo-search-results-item", inputs: ["result", "map", "showIcons", "withZoomButton"], outputs: ["zoomEvent"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1$4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i1$4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32976
33029
|
}
|
|
32977
33030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsComponent, decorators: [{
|
|
32978
33031
|
type: Component,
|
|
@@ -32985,7 +33038,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
32985
33038
|
MatTabsModule,
|
|
32986
33039
|
AsyncPipe,
|
|
32987
33040
|
IgoLanguageModule
|
|
32988
|
-
], template: "@if (tabsMode() === false) {\n <igo-list [navigation]=\"true\">\n @for (group of results$ | async; track group) {\n @if (mode() === searchResultMode.Grouped) {\n <igo-collapsible\n [class]=\"group.source.getId()\"\n [title]=\"computeGroupTitle(group)\"\n [collapsed]=\"collapsed[group.source.title]\"\n (toggle)=\"collapsed[group.source.title] = $event\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n </igo-collapsible>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n }\n\n <ng-template #storeItemTemplate let-results=\"results\">\n @for (result of results; track result) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n }\n </igo-list>\n}\n\n@if (tabsMode()) {\n <igo-list [navigation]=\"true\">\n @if (mode() === searchResultMode.Grouped) {\n <mat-tab-group class=\"custom-tabs-view\" dynamicHeight>\n @for (group of results$ | async; track group) {\n <mat-tab [label]=\"computeGroupTitle(group)\">\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplateGroup;\n context: { group: group }\n \"\n />\n </mat-tab>\n }\n </mat-tab-group>\n } @else {\n @for (group of results$ | async; track group) {\n <ng-container\n *ngTemplateOutlet=\"storeItemTemplateGroup; context: { group: group }\"\n />\n }\n }\n\n <ng-template #storeItemTemplateGroup let-group=\"group\">\n @for (result of group.results; track result) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n </igo-list>\n}\n", styles: [":host .moreResults{cursor:pointer;color:#00f;float:right;margin-right:10px;margin-top:5px}:host igo-list ::ng-deep mat-list{height:100%}:host igo-list ::ng-deep mat-list .custom-tabs-view .mat-mdc-tab-header-pagination{min-width:20px}\n"] }]
|
|
33041
|
+
], template: "@if (tabsMode() === false) {\n <igo-list [navigation]=\"true\">\n @for (group of results$ | async; track group.source.getId()) {\n @if (mode() === searchResultMode.Grouped) {\n <igo-collapsible\n [class]=\"group.source.getId()\"\n [title]=\"computeGroupTitle(group)\"\n [collapsed]=\"collapsed[group.source.title]\"\n (toggle)=\"collapsed[group.source.title] = $event\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n </igo-collapsible>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplate;\n context: { results: group.results }\n \"\n />\n }\n\n <ng-template #storeItemTemplate let-results=\"results\">\n @for (result of results; track result.meta.id) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n }\n </igo-list>\n}\n\n@if (tabsMode()) {\n <igo-list [navigation]=\"true\">\n @if (mode() === searchResultMode.Grouped) {\n <mat-tab-group class=\"custom-tabs-view\" dynamicHeight>\n @for (group of results$ | async; track group.source.getId()) {\n <mat-tab [label]=\"computeGroupTitle(group)\">\n <ng-container\n *ngTemplateOutlet=\"\n storeItemTemplateGroup;\n context: { group: group }\n \"\n />\n </mat-tab>\n }\n </mat-tab-group>\n } @else {\n @for (group of results$ | async; track group.source.getId()) {\n <ng-container\n *ngTemplateOutlet=\"storeItemTemplateGroup; context: { group: group }\"\n />\n }\n }\n\n <ng-template #storeItemTemplateGroup let-group=\"group\">\n @for (result of group.results; track result.meta.id) {\n <igo-search-results-item\n igoListItem\n color=\"accent\"\n [map]=\"map()\"\n [result]=\"result\"\n [showIcons]=\"showIcons()\"\n [withZoomButton]=\"withZoomButton()\"\n [focused]=\"store().state.get(result).focused\"\n [selected]=\"store().state.get(result).selected\"\n (focus)=\"resultFocus.emit(result)\"\n (unfocus)=\"resultUnfocus.emit(result)\"\n (select)=\"onResultSelect(result)\"\n (mouseenter)=\"resultFocus.emit(result)\"\n (mouseleave)=\"resultUnfocus.emit(result)\"\n >\n <ng-container\n igoSearchItemToolbar\n [ngTemplateOutlet]=\"templateSearchToolbar()\"\n [ngTemplateOutletContext]=\"{ result: result }\"\n />\n </igo-search-results-item>\n }\n\n @if (isMoreResults(group)) {\n <span class=\"moreResults\" (click)=\"displayMoreResults(group)\">\n <u>{{ 'igo.geo.search.displayMoreResults' | translate }}</u>\n </span>\n }\n </ng-template>\n </igo-list>\n}\n", styles: [":host .moreResults{cursor:pointer;color:#00f;float:right;margin-right:10px;margin-top:5px}:host igo-list ::ng-deep mat-list{height:100%}:host igo-list ::ng-deep mat-list .custom-tabs-view .mat-mdc-tab-header-pagination{min-width:20px}\n"] }]
|
|
32989
33042
|
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }], store: [{ type: i0.Input, args: [{ isSignal: true, alias: "store", required: true }] }], showIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcons", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], withZoomButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "withZoomButton", required: false }] }], tabsMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabsMode", required: false }] }], term: [{
|
|
32990
33043
|
type: Input
|
|
32991
33044
|
}], termSplitter: [{ type: i0.Input, args: [{ isSignal: true, alias: "termSplitter", required: false }] }], resultFocus: [{ type: i0.Output, args: ["resultFocus"] }], resultUnfocus: [{ type: i0.Output, args: ["resultUnfocus"] }], resultSelect: [{ type: i0.Output, args: ["resultSelect"] }], moreResults: [{ type: i0.Output, args: ["moreResults"] }], resultMouseenter: [{ type: i0.Output, args: ["resultMouseenter"] }], resultMouseleave: [{ type: i0.Output, args: ["resultMouseleave"] }], templateSearchToolbar: [{ type: i0.ContentChild, args: ['igoSearchItemToolbar', { isSignal: true }] }] } });
|
|
@@ -41524,30 +41577,32 @@ class WorkspaceSearchSource extends SearchSource {
|
|
|
41524
41577
|
const datasets = (this.options.params?.datasets ?? '').split(',');
|
|
41525
41578
|
this.featureStoresWithIndex
|
|
41526
41579
|
.filter((fswi) => fswi.searchDocument && datasets.includes(fswi.layer.title ?? ''))
|
|
41527
|
-
.
|
|
41580
|
+
.forEach((fswi) => {
|
|
41528
41581
|
const termToUse = term;
|
|
41529
|
-
fswi.searchDocument
|
|
41530
|
-
|
|
41531
|
-
|
|
41532
|
-
|
|
41582
|
+
const searchResults = fswi.searchDocument.search(termToUse, {
|
|
41583
|
+
limit: page * limitValue
|
|
41584
|
+
});
|
|
41585
|
+
searchResults.forEach((foundIn) => {
|
|
41533
41586
|
const field = foundIn.field;
|
|
41534
|
-
|
|
41535
|
-
|
|
41587
|
+
if (field === undefined) {
|
|
41588
|
+
return;
|
|
41589
|
+
}
|
|
41590
|
+
foundIn.result.forEach((index) => {
|
|
41536
41591
|
const feature = fswi.index.get(index);
|
|
41537
|
-
if (!feature)
|
|
41592
|
+
if (!feature) {
|
|
41538
41593
|
return;
|
|
41594
|
+
}
|
|
41539
41595
|
const score = computeTermSimilarity(termToUse.trim(), feature.properties[field]);
|
|
41540
41596
|
results.push({ index, feature, layer: fswi.layer, field, score });
|
|
41541
41597
|
});
|
|
41542
41598
|
});
|
|
41543
41599
|
});
|
|
41544
41600
|
results.sort((a, b) => (a.score > b.score ? -1 : 1));
|
|
41545
|
-
|
|
41546
|
-
const gettedIndex = [];
|
|
41601
|
+
const gettedIndex = new Set();
|
|
41547
41602
|
const sortedResultToProcess = [];
|
|
41548
|
-
results.
|
|
41549
|
-
if (!gettedIndex.
|
|
41550
|
-
gettedIndex.
|
|
41603
|
+
results.forEach((r) => {
|
|
41604
|
+
if (!gettedIndex.has(r.index)) {
|
|
41605
|
+
gettedIndex.add(r.index);
|
|
41551
41606
|
sortedResultToProcess.push(r);
|
|
41552
41607
|
}
|
|
41553
41608
|
});
|
|
@@ -41590,16 +41645,16 @@ class WorkspaceSearchSource extends SearchSource {
|
|
|
41590
41645
|
};
|
|
41591
41646
|
}
|
|
41592
41647
|
getAllowedFieldsAndAlias(layer) {
|
|
41593
|
-
let allowedFieldsAndAlias;
|
|
41594
41648
|
if (layer.options?.source?.options?.sourceFields &&
|
|
41595
41649
|
layer.options.source.options.sourceFields.length >= 1) {
|
|
41596
|
-
allowedFieldsAndAlias = {};
|
|
41650
|
+
const allowedFieldsAndAlias = {};
|
|
41597
41651
|
layer.options.source.options.sourceFields.forEach((sourceField) => {
|
|
41598
41652
|
const alias = sourceField.alias ? sourceField.alias : sourceField.name;
|
|
41599
41653
|
allowedFieldsAndAlias[sourceField.name] = alias;
|
|
41600
41654
|
});
|
|
41655
|
+
return allowedFieldsAndAlias;
|
|
41601
41656
|
}
|
|
41602
|
-
return
|
|
41657
|
+
return undefined;
|
|
41603
41658
|
}
|
|
41604
41659
|
computeProperties(data) {
|
|
41605
41660
|
if (!data.feature.geometry) {
|
|
@@ -41631,7 +41686,7 @@ class WorkspaceSearchSource extends SearchSource {
|
|
|
41631
41686
|
this.languageService.translate.instant('igo.geo.seeRouting') +
|
|
41632
41687
|
'</u> </span>'
|
|
41633
41688
|
};
|
|
41634
|
-
return Object.assign({ type: data.feature.sourceId }, data.feature.properties, googleLinksProperties, routing);
|
|
41689
|
+
return Object.assign({ type: data.feature.sourceId ?? data.layer.title ?? '' }, data.feature.properties, googleLinksProperties, routing);
|
|
41635
41690
|
}
|
|
41636
41691
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WorkspaceSearchSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41637
41692
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WorkspaceSearchSource });
|