@igo2/geo 21.0.0-next.21 → 21.0.0-next.22
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 +158 -102
- package/fesm2022/igo2-geo.mjs.map +1 -1
- package/package.json +4 -4
- package/types/igo2-geo.d.ts +17 -3
package/fesm2022/igo2-geo.mjs
CHANGED
|
@@ -21616,22 +21616,22 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21616
21616
|
* Bind this strategy to a store and start watching for entities changes
|
|
21617
21617
|
* @param store Feature store
|
|
21618
21618
|
*/
|
|
21619
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21620
21619
|
bindStore(store) {
|
|
21621
21620
|
super.bindStore(store);
|
|
21621
|
+
const featureStore = store;
|
|
21622
21622
|
if (this.active === true) {
|
|
21623
|
-
this.watchStore(
|
|
21623
|
+
this.watchStore(featureStore);
|
|
21624
21624
|
}
|
|
21625
21625
|
}
|
|
21626
21626
|
/**
|
|
21627
21627
|
* Unbind this strategy from a store and stop watching for entities changes
|
|
21628
21628
|
* @param store Feature store
|
|
21629
21629
|
*/
|
|
21630
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21631
21630
|
unbindStore(store) {
|
|
21632
21631
|
super.unbindStore(store);
|
|
21632
|
+
const featureStore = store;
|
|
21633
21633
|
if (this.active === true) {
|
|
21634
|
-
this.unwatchStore(
|
|
21634
|
+
this.unwatchStore(featureStore);
|
|
21635
21635
|
}
|
|
21636
21636
|
}
|
|
21637
21637
|
/**
|
|
@@ -21648,32 +21648,147 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21648
21648
|
doDeactivate() {
|
|
21649
21649
|
this.unwatchAll();
|
|
21650
21650
|
}
|
|
21651
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21652
21651
|
initStoreSearchIndex(store) {
|
|
21653
|
-
store.searchDocument =
|
|
21652
|
+
store.searchDocument = this.createEmptySearchDocument();
|
|
21653
|
+
}
|
|
21654
|
+
createEmptySearchDocument() {
|
|
21655
|
+
return new FlexSearch.Document({ tokenize: 'full' });
|
|
21656
|
+
}
|
|
21657
|
+
createSearchDocument(indexFields) {
|
|
21658
|
+
return new FlexSearch.Document({
|
|
21659
|
+
document: {
|
|
21660
|
+
id: 'igoSearchID',
|
|
21661
|
+
index: indexFields
|
|
21662
|
+
}
|
|
21663
|
+
});
|
|
21664
|
+
}
|
|
21665
|
+
toSearchableValue(value) {
|
|
21666
|
+
if (value === null || value === undefined) {
|
|
21667
|
+
return undefined;
|
|
21668
|
+
}
|
|
21669
|
+
if (typeof value === 'string' ||
|
|
21670
|
+
typeof value === 'number' ||
|
|
21671
|
+
typeof value === 'boolean') {
|
|
21672
|
+
return String(value);
|
|
21673
|
+
}
|
|
21674
|
+
if (Array.isArray(value)) {
|
|
21675
|
+
const values = value
|
|
21676
|
+
.map((item) => this.toSearchableValue(item))
|
|
21677
|
+
.filter((item) => item !== undefined && item !== '');
|
|
21678
|
+
return values.length ? values.join(' ') : undefined;
|
|
21679
|
+
}
|
|
21680
|
+
return undefined;
|
|
21681
|
+
}
|
|
21682
|
+
toFieldName(value) {
|
|
21683
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
21684
|
+
}
|
|
21685
|
+
buildSearchDocument(properties, fieldNames, igoSearchID) {
|
|
21686
|
+
const searchDocument = { igoSearchID };
|
|
21687
|
+
fieldNames.forEach((fieldName) => {
|
|
21688
|
+
const value = this.toSearchableValue(properties[fieldName]);
|
|
21689
|
+
if (value !== undefined) {
|
|
21690
|
+
searchDocument[fieldName] = value;
|
|
21691
|
+
}
|
|
21692
|
+
});
|
|
21693
|
+
return searchDocument;
|
|
21694
|
+
}
|
|
21695
|
+
collectIndexedFeatures(store) {
|
|
21696
|
+
const indexedFeatures = [];
|
|
21697
|
+
store.index.forEach((value, key) => {
|
|
21698
|
+
indexedFeatures.push({
|
|
21699
|
+
igoSearchID: key,
|
|
21700
|
+
properties: value.properties
|
|
21701
|
+
});
|
|
21702
|
+
});
|
|
21703
|
+
return indexedFeatures;
|
|
21704
|
+
}
|
|
21705
|
+
resolveIndexFields(indexedFeatures) {
|
|
21706
|
+
return this.options.sourceFields?.length
|
|
21707
|
+
? this.resolveConfiguredIndexFields()
|
|
21708
|
+
: this.resolveInferredIndexFields(indexedFeatures);
|
|
21709
|
+
}
|
|
21710
|
+
resolveConfiguredIndexFields() {
|
|
21711
|
+
const indexFields = [];
|
|
21712
|
+
this.options.sourceFields
|
|
21713
|
+
?.filter((sourceField) => sourceField.searchIndex?.enabled)
|
|
21714
|
+
.forEach((sourceField) => {
|
|
21715
|
+
const fieldName = this.toFieldName(sourceField.name);
|
|
21716
|
+
if (fieldName === undefined) {
|
|
21717
|
+
return;
|
|
21718
|
+
}
|
|
21719
|
+
indexFields.push({
|
|
21720
|
+
...sourceField.searchIndex,
|
|
21721
|
+
field: fieldName,
|
|
21722
|
+
tokenize: sourceField.searchIndex?.tokenize ?? 'full'
|
|
21723
|
+
});
|
|
21724
|
+
});
|
|
21725
|
+
return indexFields;
|
|
21726
|
+
}
|
|
21727
|
+
resolveInferredIndexFields(indexedFeatures) {
|
|
21728
|
+
const sampleProperties = indexedFeatures[0]?.properties;
|
|
21729
|
+
if (sampleProperties === undefined) {
|
|
21730
|
+
return [];
|
|
21731
|
+
}
|
|
21732
|
+
return Object.keys(sampleProperties)
|
|
21733
|
+
.filter((fieldName) => fieldName !== 'igoSearchID')
|
|
21734
|
+
.filter((fieldName) => this.shouldIndexField(fieldName, indexedFeatures))
|
|
21735
|
+
.map((field) => ({ field, tokenize: 'full' }));
|
|
21736
|
+
}
|
|
21737
|
+
shouldIndexField(fieldName, indexedFeatures) {
|
|
21738
|
+
const values = indexedFeatures.map((feature) => feature.properties[fieldName]);
|
|
21739
|
+
const searchableValues = values
|
|
21740
|
+
.map((value) => this.toSearchableValue(value))
|
|
21741
|
+
.filter((value) => value !== undefined);
|
|
21742
|
+
if (searchableValues.length === 0) {
|
|
21743
|
+
return false;
|
|
21744
|
+
}
|
|
21745
|
+
const distinctValueRatio = (new Set(searchableValues).size / indexedFeatures.length) * 100;
|
|
21746
|
+
return !(distinctValueRatio <= this.getDistinctValueRatio() ||
|
|
21747
|
+
this.hasExclusiveFloatValues(values));
|
|
21748
|
+
}
|
|
21749
|
+
getDistinctValueRatio() {
|
|
21750
|
+
return this.options.percentDistinctValueRatio || 2;
|
|
21751
|
+
}
|
|
21752
|
+
hasExclusiveFloatValues(values) {
|
|
21753
|
+
return values.every((value) => typeof value === 'number' && !Number.isInteger(value));
|
|
21754
|
+
}
|
|
21755
|
+
buildSearchDocuments(indexedFeatures, indexFields) {
|
|
21756
|
+
const fieldNamesToIndex = indexFields.map((item) => item.field);
|
|
21757
|
+
return indexedFeatures
|
|
21758
|
+
.map((feature) => this.buildSearchDocument(feature.properties, fieldNamesToIndex, feature.igoSearchID))
|
|
21759
|
+
.filter((document) => Object.keys(document).length > 1);
|
|
21760
|
+
}
|
|
21761
|
+
rebuildSearchDocument(store, indexFields, documents) {
|
|
21762
|
+
if (indexFields.length === 0 || documents.length === 0) {
|
|
21763
|
+
this.initStoreSearchIndex(store);
|
|
21764
|
+
return;
|
|
21765
|
+
}
|
|
21766
|
+
const searchDocument = this.createSearchDocument(indexFields);
|
|
21767
|
+
documents.forEach((document) => searchDocument.add(document));
|
|
21768
|
+
store.searchDocument = searchDocument;
|
|
21654
21769
|
}
|
|
21655
21770
|
/**
|
|
21656
21771
|
* Watch for a store's entities changes
|
|
21657
21772
|
* @param store Feature store
|
|
21658
21773
|
*/
|
|
21659
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21660
21774
|
watchStore(store) {
|
|
21661
21775
|
if (this.stores$$.has(store)) {
|
|
21662
21776
|
return;
|
|
21663
21777
|
}
|
|
21664
21778
|
this.initStoreSearchIndex(store);
|
|
21665
|
-
store.entities$
|
|
21666
|
-
|
|
21667
|
-
.pipe(skipWhile((e) => !e.length))
|
|
21779
|
+
const subscription = store.entities$
|
|
21780
|
+
.pipe(skipWhile((entities) => entities.length === 0))
|
|
21668
21781
|
.subscribe(() => this.onEntitiesChanges(store));
|
|
21782
|
+
this.stores$$.set(store, subscription);
|
|
21669
21783
|
}
|
|
21670
21784
|
/**
|
|
21671
21785
|
* Stop watching for a store's entities changes
|
|
21672
21786
|
* @param store Feature store
|
|
21673
21787
|
*/
|
|
21674
21788
|
unwatchStore(store) {
|
|
21675
|
-
const
|
|
21676
|
-
if (
|
|
21789
|
+
const subscription = this.stores$$.get(store);
|
|
21790
|
+
if (subscription !== undefined) {
|
|
21791
|
+
subscription.unsubscribe();
|
|
21677
21792
|
store.searchDocument = undefined;
|
|
21678
21793
|
this.stores$$.delete(store);
|
|
21679
21794
|
}
|
|
@@ -21682,6 +21797,9 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21682
21797
|
* Stop watching for OL source changes in all stores.
|
|
21683
21798
|
*/
|
|
21684
21799
|
unwatchAll() {
|
|
21800
|
+
Array.from(this.stores$$.values()).forEach((subscription) => {
|
|
21801
|
+
subscription.unsubscribe();
|
|
21802
|
+
});
|
|
21685
21803
|
this.stores$$.clear();
|
|
21686
21804
|
}
|
|
21687
21805
|
/**
|
|
@@ -21689,75 +21807,10 @@ class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
|
|
|
21689
21807
|
* @param store Feature store
|
|
21690
21808
|
*/
|
|
21691
21809
|
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
|
-
}
|
|
21810
|
+
const indexedFeatures = this.collectIndexedFeatures(store);
|
|
21811
|
+
const indexFields = this.resolveIndexFields(indexedFeatures);
|
|
21812
|
+
const documents = this.buildSearchDocuments(indexedFeatures, indexFields);
|
|
21813
|
+
this.rebuildSearchDocument(store, indexFields, documents);
|
|
21761
21814
|
}
|
|
21762
21815
|
}
|
|
21763
21816
|
|
|
@@ -32304,7 +32357,7 @@ class SearchResultsItemComponent {
|
|
|
32304
32357
|
}
|
|
32305
32358
|
}
|
|
32306
32359
|
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 [
|
|
32360
|
+
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
32361
|
}
|
|
32309
32362
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsItemComponent, decorators: [{
|
|
32310
32363
|
type: Component,
|
|
@@ -32313,8 +32366,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
32313
32366
|
MatIconModule,
|
|
32314
32367
|
MatTooltipModule,
|
|
32315
32368
|
MatButtonModule,
|
|
32369
|
+
SanitizeHtmlPipe,
|
|
32316
32370
|
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 [
|
|
32371
|
+
], 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
32372
|
}], 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
32373
|
|
|
32320
32374
|
class SaveFeatureDialogComponent {
|
|
@@ -32972,7 +33026,7 @@ class SearchResultsComponent {
|
|
|
32972
33026
|
return;
|
|
32973
33027
|
}
|
|
32974
33028
|
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 });
|
|
33029
|
+
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
33030
|
}
|
|
32977
33031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsComponent, decorators: [{
|
|
32978
33032
|
type: Component,
|
|
@@ -32985,7 +33039,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
32985
33039
|
MatTabsModule,
|
|
32986
33040
|
AsyncPipe,
|
|
32987
33041
|
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"] }]
|
|
33042
|
+
], 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
33043
|
}], 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
33044
|
type: Input
|
|
32991
33045
|
}], 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 +41578,32 @@ class WorkspaceSearchSource extends SearchSource {
|
|
|
41524
41578
|
const datasets = (this.options.params?.datasets ?? '').split(',');
|
|
41525
41579
|
this.featureStoresWithIndex
|
|
41526
41580
|
.filter((fswi) => fswi.searchDocument && datasets.includes(fswi.layer.title ?? ''))
|
|
41527
|
-
.
|
|
41581
|
+
.forEach((fswi) => {
|
|
41528
41582
|
const termToUse = term;
|
|
41529
|
-
fswi.searchDocument
|
|
41530
|
-
|
|
41531
|
-
|
|
41532
|
-
|
|
41583
|
+
const searchResults = fswi.searchDocument.search(termToUse, {
|
|
41584
|
+
limit: page * limitValue
|
|
41585
|
+
});
|
|
41586
|
+
searchResults.forEach((foundIn) => {
|
|
41533
41587
|
const field = foundIn.field;
|
|
41534
|
-
|
|
41535
|
-
|
|
41588
|
+
if (field === undefined) {
|
|
41589
|
+
return;
|
|
41590
|
+
}
|
|
41591
|
+
foundIn.result.forEach((index) => {
|
|
41536
41592
|
const feature = fswi.index.get(index);
|
|
41537
|
-
if (!feature)
|
|
41593
|
+
if (!feature) {
|
|
41538
41594
|
return;
|
|
41595
|
+
}
|
|
41539
41596
|
const score = computeTermSimilarity(termToUse.trim(), feature.properties[field]);
|
|
41540
41597
|
results.push({ index, feature, layer: fswi.layer, field, score });
|
|
41541
41598
|
});
|
|
41542
41599
|
});
|
|
41543
41600
|
});
|
|
41544
41601
|
results.sort((a, b) => (a.score > b.score ? -1 : 1));
|
|
41545
|
-
|
|
41546
|
-
const gettedIndex = [];
|
|
41602
|
+
const gettedIndex = new Set();
|
|
41547
41603
|
const sortedResultToProcess = [];
|
|
41548
|
-
results.
|
|
41549
|
-
if (!gettedIndex.
|
|
41550
|
-
gettedIndex.
|
|
41604
|
+
results.forEach((r) => {
|
|
41605
|
+
if (!gettedIndex.has(r.index)) {
|
|
41606
|
+
gettedIndex.add(r.index);
|
|
41551
41607
|
sortedResultToProcess.push(r);
|
|
41552
41608
|
}
|
|
41553
41609
|
});
|
|
@@ -41590,16 +41646,16 @@ class WorkspaceSearchSource extends SearchSource {
|
|
|
41590
41646
|
};
|
|
41591
41647
|
}
|
|
41592
41648
|
getAllowedFieldsAndAlias(layer) {
|
|
41593
|
-
let allowedFieldsAndAlias;
|
|
41594
41649
|
if (layer.options?.source?.options?.sourceFields &&
|
|
41595
41650
|
layer.options.source.options.sourceFields.length >= 1) {
|
|
41596
|
-
allowedFieldsAndAlias = {};
|
|
41651
|
+
const allowedFieldsAndAlias = {};
|
|
41597
41652
|
layer.options.source.options.sourceFields.forEach((sourceField) => {
|
|
41598
41653
|
const alias = sourceField.alias ? sourceField.alias : sourceField.name;
|
|
41599
41654
|
allowedFieldsAndAlias[sourceField.name] = alias;
|
|
41600
41655
|
});
|
|
41656
|
+
return allowedFieldsAndAlias;
|
|
41601
41657
|
}
|
|
41602
|
-
return
|
|
41658
|
+
return undefined;
|
|
41603
41659
|
}
|
|
41604
41660
|
computeProperties(data) {
|
|
41605
41661
|
if (!data.feature.geometry) {
|
|
@@ -41631,7 +41687,7 @@ class WorkspaceSearchSource extends SearchSource {
|
|
|
41631
41687
|
this.languageService.translate.instant('igo.geo.seeRouting') +
|
|
41632
41688
|
'</u> </span>'
|
|
41633
41689
|
};
|
|
41634
|
-
return Object.assign({ type: data.feature.sourceId }, data.feature.properties, googleLinksProperties, routing);
|
|
41690
|
+
return Object.assign({ type: data.feature.sourceId ?? data.layer.title ?? '' }, data.feature.properties, googleLinksProperties, routing);
|
|
41635
41691
|
}
|
|
41636
41692
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WorkspaceSearchSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41637
41693
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WorkspaceSearchSource });
|