geonetwork-ui 2.5.0-dev.1103960a3 → 2.5.0-dev.17046547b
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/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +2 -2
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +6 -3
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +37 -2
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +2 -7
- package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +5 -3
- package/fesm2022/geonetwork-ui.mjs +53 -18
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts +2 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +16 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts +2 -3
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +1 -1
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -0
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -0
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +1 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +42 -0
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +1 -7
- package/src/libs/util/data-fetcher/src/lib/utils.ts +4 -2
|
@@ -10,4 +10,5 @@ export * from './lib/components/record-form/record-form.component';
|
|
|
10
10
|
export * from './lib/components/wizard/wizard.component';
|
|
11
11
|
export * from './lib/components/wizard-field/wizard-field.component';
|
|
12
12
|
export * from './lib/components/wizard-summarize/wizard-summarize.component';
|
|
13
|
+
export * from './lib/components/record-form/form-field';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/feature/editor/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,wDAAwD,CAAA;AACtE,cAAc,oDAAoD,CAAA;AAClE,cAAc,0CAA0C,CAAA;AACxD,cAAc,sDAAsD,CAAA;AACpE,cAAc,8DAA8D,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/feature/editor/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,wDAAwD,CAAA;AACtE,cAAc,oDAAoD,CAAA;AAClE,cAAc,0CAA0C,CAAA;AACxD,cAAc,sDAAsD,CAAA;AACpE,cAAc,8DAA8D,CAAA;AAC5E,cAAc,yCAAyC,CAAA"}
|
|
@@ -9,4 +9,5 @@ export * from './form-field-object/form-field-object.component';
|
|
|
9
9
|
export * from './form-field-array/form-field-array.component';
|
|
10
10
|
export * from './form-field-spatial-extent/form-field-spatial-extent.component';
|
|
11
11
|
export * from './form-field.component';
|
|
12
|
+
export * from './form-field-constraints-shortcuts/constraints.utils';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAA;AACnE,cAAc,mDAAmD,CAAA;AACjE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,qEAAqE,CAAA;AACnF,cAAc,iDAAiD,CAAA;AAC/D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,iEAAiE,CAAA;AAC/E,cAAc,wBAAwB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAA;AACnE,cAAc,mDAAmD,CAAA;AACjE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,qEAAqE,CAAA;AACnF,cAAc,iDAAiD,CAAA;AAC/D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,iEAAiE,CAAA;AAC/E,cAAc,wBAAwB,CAAA;AACtC,cAAc,sDAAsD,CAAA"}
|
|
@@ -12,6 +12,7 @@ export declare class FuzzySearchComponent implements OnInit {
|
|
|
12
12
|
private recordsRepository;
|
|
13
13
|
autocomplete: AutocompleteComponent;
|
|
14
14
|
autoFocus: boolean;
|
|
15
|
+
forceTrackPosition: boolean;
|
|
15
16
|
itemSelected: EventEmitter<CatalogRecord>;
|
|
16
17
|
inputSubmitted: EventEmitter<string>;
|
|
17
18
|
searchInputValue$: Observable<{
|
|
@@ -31,6 +32,6 @@ export declare class FuzzySearchComponent implements OnInit {
|
|
|
31
32
|
handleInputSubmission(any: string): void;
|
|
32
33
|
handleInputCleared(): Promise<void>;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<FuzzySearchComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FuzzySearchComponent, "gn-ui-fuzzy-search", never, { "autoFocus": { "alias": "autoFocus"; "required": false; }; }, { "itemSelected": "itemSelected"; "inputSubmitted": "inputSubmitted"; }, never, never, false, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FuzzySearchComponent, "gn-ui-fuzzy-search", never, { "autoFocus": { "alias": "autoFocus"; "required": false; }; "forceTrackPosition": { "alias": "forceTrackPosition"; "required": false; }; }, { "itemSelected": "itemSelected"; "inputSubmitted": "inputSubmitted"; }, never, never, false, never>;
|
|
35
36
|
}
|
|
36
37
|
//# sourceMappingURL=fuzzy-search.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fuzzy-search.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEZ,MAAM,EAGP,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAkB,UAAU,EAAE,MAAM,MAAM,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sFAAsF,CAAA;;AAGjI,qBAMa,oBAAqB,YAAW,MAAM;
|
|
1
|
+
{"version":3,"file":"fuzzy-search.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEZ,MAAM,EAGP,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAkB,UAAU,EAAE,MAAM,MAAM,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sFAAsF,CAAA;;AAGjI,qBAMa,oBAAqB,YAAW,MAAM;IAgB/C,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,iBAAiB;IAjBO,YAAY,EAAE,qBAAqB,CAAA;IAC5D,SAAS,UAAQ;IACjB,kBAAkB,UAAQ;IACzB,YAAY,8BAAoC;IAChD,cAAc,uBAA6B;IACrD,iBAAiB,EAAE,UAAU,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAEhD,aAAa,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,CAA2B;IAE3E,kBAAkB,UAAW,MAAM,iCAGO;gBAGhC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,0BAA0B;IAGvD,QAAQ,IAAI,IAAI;IAQhB;;;;;OAKG;IACH,mBAAmB,CAAC,IAAI,EAAE,gBAAgB;IAS1C,qBAAqB,CAAC,GAAG,EAAE,MAAM;IAQ3B,kBAAkB;yCApDb,oBAAoB;2CAApB,oBAAoB;CA4DhC"}
|
|
@@ -14,6 +14,7 @@ export declare class AutocompleteComponent implements OnInit, AfterViewInit, OnD
|
|
|
14
14
|
autoFocus: boolean;
|
|
15
15
|
minCharacterCount?: number;
|
|
16
16
|
allowSubmit: boolean;
|
|
17
|
+
forceTrackPosition: boolean;
|
|
17
18
|
itemSelected: EventEmitter<unknown>;
|
|
18
19
|
inputSubmitted: EventEmitter<string>;
|
|
19
20
|
inputCleared: EventEmitter<void>;
|
|
@@ -28,12 +29,26 @@ export declare class AutocompleteComponent implements OnInit, AfterViewInit, OnD
|
|
|
28
29
|
error: string | null;
|
|
29
30
|
suggestions$: Observable<AutocompleteItem[]>;
|
|
30
31
|
subscription: Subscription;
|
|
32
|
+
private lastPosition;
|
|
33
|
+
private intervalIdPosition;
|
|
31
34
|
displayWithFn: (item: AutocompleteItem) => string;
|
|
32
35
|
displayWithFnInternal: (item?: AutocompleteItem) => string;
|
|
33
36
|
constructor(cdRef: ChangeDetectorRef);
|
|
34
37
|
ngOnChanges(changes: SimpleChanges): void;
|
|
35
38
|
ngOnInit(): void;
|
|
36
39
|
ngAfterViewInit(): void;
|
|
40
|
+
/**
|
|
41
|
+
* !!! This function is used only for web component mode,
|
|
42
|
+
* the autocomplete dropdown may not update its position
|
|
43
|
+
* if the page or container is disabling wind scroll.
|
|
44
|
+
*/
|
|
45
|
+
private trackPosition;
|
|
46
|
+
/**
|
|
47
|
+
* !!! This function is used only for web component mode,
|
|
48
|
+
* the autocomplete dropdown may not update its position
|
|
49
|
+
* if the page or container is disabling wind scroll.
|
|
50
|
+
*/
|
|
51
|
+
startTrackingPosition(): void;
|
|
37
52
|
ngOnDestroy(): void;
|
|
38
53
|
updateInputValue(value: AutocompleteItem): void;
|
|
39
54
|
clear(): void;
|
|
@@ -48,6 +63,6 @@ export declare class AutocompleteComponent implements OnInit, AfterViewInit, OnD
|
|
|
48
63
|
*/
|
|
49
64
|
handleSelection(event: MatAutocompleteSelectedEvent): void;
|
|
50
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "gn-ui-autocomplete", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "action": { "alias": "action"; "required": false; }; "value": { "alias": "value"; "required": false; }; "clearOnSelection": { "alias": "clearOnSelection"; "required": false; }; "preventCompleteOnSelection": { "alias": "preventCompleteOnSelection"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "minCharacterCount": { "alias": "minCharacterCount"; "required": false; }; "allowSubmit": { "alias": "allowSubmit"; "required": false; }; "displayWithFn": { "alias": "displayWithFn"; "required": false; }; }, { "itemSelected": "itemSelected"; "inputSubmitted": "inputSubmitted"; "inputCleared": "inputCleared"; }, never, never, true, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "gn-ui-autocomplete", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "action": { "alias": "action"; "required": false; }; "value": { "alias": "value"; "required": false; }; "clearOnSelection": { "alias": "clearOnSelection"; "required": false; }; "preventCompleteOnSelection": { "alias": "preventCompleteOnSelection"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "minCharacterCount": { "alias": "minCharacterCount"; "required": false; }; "allowSubmit": { "alias": "allowSubmit"; "required": false; }; "forceTrackPosition": { "alias": "forceTrackPosition"; "required": false; }; "displayWithFn": { "alias": "displayWithFn"; "required": false; }; }, { "itemSelected": "itemSelected"; "inputSubmitted": "inputSubmitted"; "inputCleared": "inputCleared"; }, never, never, true, never>;
|
|
52
67
|
}
|
|
53
68
|
//# sourceMappingURL=autocomplete.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAEZ,SAAS,EACT,SAAS,EACT,MAAM,EAEN,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAuB,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,EACL,eAAe,EAEf,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAgB,UAAU,EAAM,aAAa,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;;AAwBhF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAEtC,qBAyBa,qBACX,YAAW,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"autocomplete.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAEZ,SAAS,EACT,SAAS,EACT,MAAM,EAEN,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAuB,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,EACL,eAAe,EAEf,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAgB,UAAU,EAAM,aAAa,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;;AAwBhF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAEtC,qBAyBa,qBACX,YAAW,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS;IAsC1C,OAAO,CAAC,KAAK;IApChB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAA;IACzD,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,gBAAgB,UAAQ;IACxB,0BAA0B,UAAQ;IAClC,SAAS,UAAQ;IACjB,iBAAiB,CAAC,SAAI;IAEtB,WAAW,UAAQ;IACnB,kBAAkB,UAAQ;IACzB,YAAY,wBAAuC;IACnD,cAAc,uBAA6B;IAC3C,YAAY,qBAA2B;IACd,UAAU,EAAE,sBAAsB,CAAA;IACzC,YAAY,EAAE,eAAe,CAAA;IAC/B,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;IAEhE,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,qBAA2B;IAClC,WAAW,UAAO;IAClB,gBAAgB,8CAAqD;IACrE,eAAe,wBAA+B;IAC9C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAC3B,YAAY,EAAE,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAA;IAC5C,YAAY,eAAqB;IACjC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,kBAAkB,CAAoB;IAErC,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,MAAM,CACzC;IAEjB,qBAAqB,UAAW,gBAAgB,YAG/C;gBAEmB,KAAK,EAAE,iBAAiB;IAC5C,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAWzC,QAAQ,IAAI,IAAI;IAwEhB,eAAe,IAAI,IAAI;IAUvB;;;;OAIG;IACH,OAAO,CAAC,aAAa,CAepB;IAED;;;;OAIG;IACH,qBAAqB;IAMrB,WAAW,IAAI,IAAI;IAQnB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB;IASxC,KAAK,IAAI,IAAI;IASb,WAAW,CAAC,GAAG,EAAE,MAAM;IAMvB,iBAAiB;IAIjB;;;;;;OAMG;IACH,eAAe,CAAC,KAAK,EAAE,4BAA4B;yCAjNxC,qBAAqB;2CAArB,qBAAqB;CA+NjC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class UrlInputComponent
|
|
3
|
+
export declare class UrlInputComponent {
|
|
4
4
|
private cd;
|
|
5
5
|
set value(v: string);
|
|
6
6
|
extraClass: string;
|
|
@@ -14,7 +14,6 @@ export declare class UrlInputComponent implements OnChanges {
|
|
|
14
14
|
uploadClick: EventEmitter<string>;
|
|
15
15
|
inputValue: string;
|
|
16
16
|
constructor(cd: ChangeDetectorRef);
|
|
17
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
18
17
|
handleInput(event: Event): void;
|
|
19
18
|
handleUpload(element: HTMLInputElement): void;
|
|
20
19
|
isValidUrl(url: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-input.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/url-input/url-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,YAAY,
|
|
1
|
+
{"version":3,"file":"url-input.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/url-input/url-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAKb,MAAM,eAAe,CAAA;;AAUtB,qBAca,iBAAiB;IA0BhB,OAAO,CAAC,EAAE;IAzBtB,IAAa,KAAK,CAAC,CAAC,EAAE,MAAM,EAW3B;IACQ,UAAU,SAAK;IACf,WAAW,SAAa;IACxB,QAAQ,EAAE,OAAO,CAAA;IACjB,kBAAkB,UAAO;IAElC;;OAEG;IACO,WAAW,uBAAoC;IAC/C,WAAW,uBAA6B;IAElD,UAAU,SAAK;gBAEK,EAAE,EAAE,iBAAiB;IAEzC,WAAW,CAAC,KAAK,EAAE,KAAK;IAWxB,YAAY,CAAC,OAAO,EAAE,gBAAgB;IAMtC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;yCA7CrB,iBAAiB;2CAAjB,iBAAiB;CAqD7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/libs/util/data-fetcher/src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EAEd,YAAY,EACZ,aAAa,EAEd,MAAM,SAAS,CAAA;AAMhB,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,aAAa,CAAC,CAsBxB;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAWjE;AAED,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/libs/util/data-fetcher/src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EAEd,YAAY,EACZ,aAAa,EAEd,MAAM,SAAS,CAAA;AAMhB,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,aAAa,CAAC,CAsBxB;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAWjE;AAED,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,MAAM,CAAC,CAgBjB;AACD,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,WAAW,CAAC,CAmBtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAkBxD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI3D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,QAAQ,CAsB7E;AAqBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,EAAE,EACjB,UAAU,UAAQ,GACjB;IACD,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,UAAU,EAAE,YAAY,EAAE,CAAA;CAC3B,CA0DA;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,EAAE,GAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAgB3B"}
|
package/package.json
CHANGED
|
@@ -10,3 +10,4 @@ export * from './lib/components/record-form/record-form.component'
|
|
|
10
10
|
export * from './lib/components/wizard/wizard.component'
|
|
11
11
|
export * from './lib/components/wizard-field/wizard-field.component'
|
|
12
12
|
export * from './lib/components/wizard-summarize/wizard-summarize.component'
|
|
13
|
+
export * from './lib/components/record-form/form-field'
|
|
@@ -9,3 +9,4 @@ export * from './form-field-object/form-field-object.component'
|
|
|
9
9
|
export * from './form-field-array/form-field-array.component'
|
|
10
10
|
export * from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
11
11
|
export * from './form-field.component'
|
|
12
|
+
export * from './form-field-constraints-shortcuts/constraints.utils'
|
|
@@ -28,6 +28,7 @@ import { SearchFilters } from '../../../../../../libs/api/metadata-converter/src
|
|
|
28
28
|
export class FuzzySearchComponent implements OnInit {
|
|
29
29
|
@ViewChild(AutocompleteComponent) autocomplete: AutocompleteComponent
|
|
30
30
|
@Input() autoFocus = false
|
|
31
|
+
@Input() forceTrackPosition = false
|
|
31
32
|
@Output() itemSelected = new EventEmitter<CatalogRecord>()
|
|
32
33
|
@Output() inputSubmitted = new EventEmitter<string>()
|
|
33
34
|
searchInputValue$: Observable<{ title: string }>
|
|
@@ -83,6 +83,7 @@ export class AutocompleteComponent
|
|
|
83
83
|
@Input() minCharacterCount? = 3
|
|
84
84
|
// this will show a submit button next to the input; if false, a search icon will appear on the left
|
|
85
85
|
@Input() allowSubmit = false
|
|
86
|
+
@Input() forceTrackPosition = false
|
|
86
87
|
@Output() itemSelected = new EventEmitter<AutocompleteItem>()
|
|
87
88
|
@Output() inputSubmitted = new EventEmitter<string>()
|
|
88
89
|
@Output() inputCleared = new EventEmitter<void>()
|
|
@@ -98,6 +99,8 @@ export class AutocompleteComponent
|
|
|
98
99
|
error: string | null = null
|
|
99
100
|
suggestions$: Observable<AutocompleteItem[]>
|
|
100
101
|
subscription = new Subscription()
|
|
102
|
+
private lastPosition: DOMRect | null = null
|
|
103
|
+
private intervalIdPosition: number | undefined
|
|
101
104
|
|
|
102
105
|
@Input() displayWithFn: (item: AutocompleteItem) => string = (item) =>
|
|
103
106
|
item.toString()
|
|
@@ -197,10 +200,49 @@ export class AutocompleteComponent
|
|
|
197
200
|
this.inputRef.nativeElement.focus()
|
|
198
201
|
this.cdRef.detectChanges()
|
|
199
202
|
}
|
|
203
|
+
|
|
204
|
+
this.startTrackingPosition()
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* !!! This function is used only for web component mode,
|
|
209
|
+
* the autocomplete dropdown may not update its position
|
|
210
|
+
* if the page or container is disabling wind scroll.
|
|
211
|
+
*/
|
|
212
|
+
private trackPosition = () => {
|
|
213
|
+
const dropdownOpened = this.triggerRef && this.triggerRef.panelOpen
|
|
214
|
+
const rect = this.inputRef.nativeElement.getBoundingClientRect()
|
|
215
|
+
|
|
216
|
+
if (
|
|
217
|
+
dropdownOpened &&
|
|
218
|
+
(!this.lastPosition ||
|
|
219
|
+
rect.top !== this.lastPosition.top ||
|
|
220
|
+
rect.left !== this.lastPosition.left)
|
|
221
|
+
) {
|
|
222
|
+
this.triggerRef.updatePosition()
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
this.lastPosition = rect
|
|
226
|
+
requestAnimationFrame(this.trackPosition)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* !!! This function is used only for web component mode,
|
|
231
|
+
* the autocomplete dropdown may not update its position
|
|
232
|
+
* if the page or container is disabling wind scroll.
|
|
233
|
+
*/
|
|
234
|
+
startTrackingPosition() {
|
|
235
|
+
if (this.forceTrackPosition) {
|
|
236
|
+
requestAnimationFrame(this.trackPosition)
|
|
237
|
+
}
|
|
200
238
|
}
|
|
201
239
|
|
|
202
240
|
ngOnDestroy(): void {
|
|
203
241
|
this.subscription?.unsubscribe()
|
|
242
|
+
|
|
243
|
+
if (this.intervalIdPosition) {
|
|
244
|
+
clearInterval(this.intervalIdPosition)
|
|
245
|
+
}
|
|
204
246
|
}
|
|
205
247
|
|
|
206
248
|
updateInputValue(value: AutocompleteItem) {
|
|
@@ -31,7 +31,7 @@ import { iconoirArrowUp, iconoirLink } from '@ng-icons/iconoir'
|
|
|
31
31
|
],
|
|
32
32
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
33
33
|
})
|
|
34
|
-
export class UrlInputComponent
|
|
34
|
+
export class UrlInputComponent {
|
|
35
35
|
@Input() set value(v: string) {
|
|
36
36
|
// we're making sure to only update the input if the URL representation of it has changed; otherwise we keep it identical
|
|
37
37
|
// to avoid glitches when starting to write a URL and having some characters added/replaced automatically
|
|
@@ -59,12 +59,6 @@ export class UrlInputComponent implements OnChanges {
|
|
|
59
59
|
|
|
60
60
|
constructor(private cd: ChangeDetectorRef) {}
|
|
61
61
|
|
|
62
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
63
|
-
if (changes['value']) {
|
|
64
|
-
this.inputValue = changes['value'].currentValue
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
62
|
handleInput(event: Event) {
|
|
69
63
|
const value = (event.target as HTMLInputElement).value
|
|
70
64
|
this.inputValue = value
|
|
@@ -62,9 +62,11 @@ export function fetchDataAsText(
|
|
|
62
62
|
})
|
|
63
63
|
.then(async (response) => {
|
|
64
64
|
if (!response.ok) {
|
|
65
|
-
|
|
65
|
+
const clonedResponse = response.clone()
|
|
66
|
+
throw FetchError.http(response.status, await clonedResponse.text())
|
|
66
67
|
}
|
|
67
|
-
|
|
68
|
+
const clonedResponse = response.clone()
|
|
69
|
+
return clonedResponse.text()
|
|
68
70
|
})
|
|
69
71
|
|
|
70
72
|
return cacheActive ? useCache(fetchFactory, url, 'asText') : fetchFactory()
|