geonetwork-ui 2.4.1-dev.a1ec7cf5a → 2.4.1-dev.b217f2e40
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/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +80 -10
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.mjs +4 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +5 -3
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +7 -2
- package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +3 -3
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +6 -3
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +37 -1
- package/esm2022/translations/de.json +3 -0
- package/esm2022/translations/en.json +3 -0
- package/esm2022/translations/es.json +3 -0
- package/esm2022/translations/fr.json +3 -0
- package/esm2022/translations/it.json +3 -0
- package/esm2022/translations/nl.json +3 -0
- package/esm2022/translations/pt.json +3 -0
- package/fesm2022/geonetwork-ui.mjs +153 -18
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts +44 -5
- package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +2 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts +3 -2
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +2 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +2 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +39 -7
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +100 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.html +11 -9
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts +3 -2
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +1 -0
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +1 -0
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +9 -1
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +5 -1
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +1 -1
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +1 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +48 -1
- package/translations/de.json +3 -0
- package/translations/en.json +3 -0
- package/translations/es.json +3 -0
- package/translations/fr.json +3 -0
- package/translations/it.json +3 -0
- package/translations/nl.json +3 -0
- package/translations/pt.json +3 -0
- package/translations/sk.json +3 -0
|
@@ -1,26 +1,65 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit } from '@angular/core';
|
|
2
2
|
import { DatasetServiceDistribution, ServiceProtocol } from '../../../../../../../libs/common/domain/src/lib/model/record';
|
|
3
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OnlineServiceResourceInputComponent implements OnChanges {
|
|
5
|
-
|
|
5
|
+
export declare class OnlineServiceResourceInputComponent implements OnChanges, OnInit {
|
|
6
|
+
private cdr;
|
|
7
|
+
service: DatasetServiceDistribution;
|
|
6
8
|
protocolHint?: string;
|
|
7
9
|
disabled?: boolean;
|
|
10
|
+
modifyMode?: boolean;
|
|
8
11
|
urlChange: EventEmitter<string>;
|
|
9
12
|
identifierSubmit: EventEmitter<{
|
|
10
13
|
url: string;
|
|
11
14
|
identifier: string;
|
|
12
15
|
}>;
|
|
16
|
+
errorMessage: boolean;
|
|
13
17
|
selectedProtocol: ServiceProtocol;
|
|
14
18
|
url: string;
|
|
19
|
+
layersSubject: BehaviorSubject<{
|
|
20
|
+
name: string;
|
|
21
|
+
title: string;
|
|
22
|
+
}[]>;
|
|
23
|
+
layers$: Observable<{
|
|
24
|
+
name: string;
|
|
25
|
+
title: string;
|
|
26
|
+
}[]>;
|
|
15
27
|
protocolOptions: {
|
|
16
28
|
label: string;
|
|
17
29
|
value: ServiceProtocol;
|
|
18
30
|
}[];
|
|
31
|
+
constructor(cdr: ChangeDetectorRef);
|
|
32
|
+
get activeLayerSuggestion(): boolean;
|
|
19
33
|
ngOnChanges(): void;
|
|
20
|
-
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
handleUrlValueChange(url: string): void;
|
|
36
|
+
handleUploadClick(url: string): Promise<void>;
|
|
37
|
+
resetAllFormFields(): void;
|
|
38
|
+
resetLayersSuggestion(): void;
|
|
21
39
|
submitIdentifier(identifier: string): void;
|
|
22
40
|
getIdentifierPlaceholder(): string;
|
|
41
|
+
/**
|
|
42
|
+
* gn-ui-autocomplete
|
|
43
|
+
*/
|
|
44
|
+
displayWithFn(item: {
|
|
45
|
+
name: string;
|
|
46
|
+
title: string;
|
|
47
|
+
}): string;
|
|
48
|
+
/**
|
|
49
|
+
* gn-ui-autocomplete
|
|
50
|
+
*/
|
|
51
|
+
autoCompleteAction: (query: string) => Observable<{
|
|
52
|
+
name: string;
|
|
53
|
+
title: string;
|
|
54
|
+
}[]>;
|
|
55
|
+
/**
|
|
56
|
+
* gn-ui-autocomplete
|
|
57
|
+
*/
|
|
58
|
+
handleSelectValue(val: {
|
|
59
|
+
name: string;
|
|
60
|
+
title: string;
|
|
61
|
+
}): void;
|
|
23
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<OnlineServiceResourceInputComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OnlineServiceResourceInputComponent, "gn-ui-online-service-resource-input", never, { "service": { "alias": "service"; "required": false; }; "protocolHint": { "alias": "protocolHint"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "urlChange": "urlChange"; "identifierSubmit": "identifierSubmit"; }, never,
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OnlineServiceResourceInputComponent, "gn-ui-online-service-resource-input", never, { "service": { "alias": "service"; "required": false; }; "protocolHint": { "alias": "protocolHint"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "modifyMode": { "alias": "modifyMode"; "required": false; }; }, { "urlChange": "urlChange"; "identifierSubmit": "identifierSubmit"; }, never, ["*"], true, never>;
|
|
25
64
|
}
|
|
26
65
|
//# sourceMappingURL=online-service-resource-input.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"online-service-resource-input.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"online-service-resource-input.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAEZ,SAAS,EACT,MAAM,EAEP,MAAM,eAAe,CAAA;AAKtB,OAAO,EACL,0BAA0B,EAC1B,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAerE,OAAO,EACL,eAAe,EAIf,UAAU,EAEX,MAAM,MAAM,CAAA;;AAEb,qBAyBa,mCAAoC,YAAW,SAAS,EAAE,MAAM;IAoD/D,OAAO,CAAC,GAAG;IAnDd,OAAO,EAAE,0BAA0B,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAQ;IACjB,UAAU,CAAC,UAAQ;IAClB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAqB;IACpD,gBAAgB,EAAE,YAAY,CAAC;QACvC,GAAG,EAAE,MAAM,CAAA;QACX,UAAU,EAAE,MAAM,CAAA;KACnB,CAAC,CAAqB;IAEvB,YAAY,UAAQ;IACpB,gBAAgB,EAAE,eAAe,CAAA;IACjC,GAAG,SAAK;IACR,aAAa;cAA+B,MAAM;eAAS,MAAM;SAAS;IAC1E,OAAO,EAAE,UAAU,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CACnB;IAEnC,eAAe,EAAE;QACf,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,eAAe,CAAA;KACvB,EAAE,CA6BF;gBAEmB,GAAG,EAAE,iBAAiB;IAE1C,IAAI,qBAAqB,YAIxB;IAED,WAAW;IAOX,QAAQ;IAMR,oBAAoB,CAAC,GAAG,EAAE,MAAM;IAO1B,iBAAiB,CAAC,GAAG,EAAE,MAAM;IAmBnC,kBAAkB;IAMlB,qBAAqB;IAMrB,gBAAgB,CAAC,UAAU,EAAE,MAAM;IAMnC,wBAAwB,IAAI,MAAM;IAQlC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAMnD;;OAEG;IACH,kBAAkB,UAAW,MAAM;cA1HP,MAAM;eAAS,MAAM;SAmIhD;IAED;;OAEG;IACH,iBAAiB,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;yCAvJ3C,mCAAmC;2CAAnC,mCAAmC;CA0J/C"}
|
|
@@ -24,7 +24,7 @@ export declare class FormFieldOnlineResourcesComponent {
|
|
|
24
24
|
notLinkResources: OnlineNotLinkResource[];
|
|
25
25
|
uploadProgress: any;
|
|
26
26
|
uploadSubscription: Subscription;
|
|
27
|
-
newService:
|
|
27
|
+
newService: DatasetServiceDistribution;
|
|
28
28
|
protected MAX_UPLOAD_SIZE_MB: number;
|
|
29
29
|
constructor(notificationsService: NotificationsService, translateService: TranslateService, platformService: PlatformServiceInterface, cd: ChangeDetectorRef, dialog: MatDialog);
|
|
30
30
|
onSelectedTypeChange(selectedType: unknown): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-online-resources.component.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAGZ,WAAW,EAEZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EAChB,MAAM,oEAAoE,CAAA;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kFAAkF,CAAA;AAC3H,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAA;AAChG,OAAO,EAGL,kBAAkB,EAInB,MAAM,+CAA+C,CAAA;AAKtD,OAAO,EAAmB,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;;AAKnC,KAAK,qBAAqB,GACtB,2BAA2B,GAC3B,0BAA0B,GAC1B,eAAe,CAAA;AAEnB,qBAmBa,iCAAiC;
|
|
1
|
+
{"version":3,"file":"form-field-online-resources.component.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAGZ,WAAW,EAEZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EAChB,MAAM,oEAAoE,CAAA;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kFAAkF,CAAA;AAC3H,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAA;AAChG,OAAO,EAGL,kBAAkB,EAInB,MAAM,+CAA+C,CAAA;AAKtD,OAAO,EAAmB,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;;AAKnC,KAAK,qBAAqB,GACtB,2BAA2B,GAC3B,0BAA0B,GAC1B,eAAe,CAAA;AAEnB,qBAmBa,iCAAiC;IAyC1C,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,MAAM;IA5CP,YAAY,EAAE,MAAM,CAAA;IAC7B,IAAa,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,EAKxD;IACS,WAAW,EAAE,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CACtC;IAES,cAAc,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;IAExE,WAAW,EAAE,kBAAkB,EAAE,CAWhC;IACD,YAAY,EAAE,UAAU,GAAG,SAAS,CAAa;IAEjD,OAAO,CAAC,YAAY,CAAuB;IAC3C,gBAAgB,EAAE,qBAAqB,EAAE,CAAK;IAC9C,cAAc,MAAY;IAC1B,kBAAkB,EAAE,YAAY,CAAO;IACvC,UAAU,EAAI,0BAA0B,CAKvC;IAED,SAAS,CAAC,kBAAkB,SAAqB;gBAGvC,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,wBAAwB,EACzC,EAAE,EAAE,iBAAiB,EACrB,MAAM,EAAE,SAAS;IAG3B,oBAAoB,CAAC,YAAY,EAAE,OAAO;IAI1C,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAyB3B,kBAAkB;IAOlB,uBAAuB,CAAC,GAAG,EAAE,MAAM;IAcnC,sBAAsB,CAAC,GAAG,EAAE,MAAM;IAUlC,sBAAsB,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAUnE,mBAAmB,CACjB,UAAU,EAAE,0BAA0B,EACtC,UAAU,EAAE,0BAA0B;IAOxC,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE;IAStC,oBAAoB,CAAC,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM;IAInE,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,cAAc;yCAhKX,iCAAiC;2CAAjC,iCAAiC;CAgM7C"}
|
|
@@ -17,6 +17,7 @@ export declare class ResultsTableContainerComponent implements OnDestroy {
|
|
|
17
17
|
private translateService;
|
|
18
18
|
canDuplicate: (record: CatalogRecord) => boolean;
|
|
19
19
|
canDelete: (record: CatalogRecord) => boolean;
|
|
20
|
+
isDuplicating: false;
|
|
20
21
|
recordClick: EventEmitter<CatalogRecord>;
|
|
21
22
|
duplicateRecord: EventEmitter<CatalogRecord>;
|
|
22
23
|
subscription: Subscription;
|
|
@@ -31,6 +32,6 @@ export declare class ResultsTableContainerComponent implements OnDestroy {
|
|
|
31
32
|
handleRecordsSelectedChange(records: CatalogRecord[], selected: boolean): void;
|
|
32
33
|
ngOnDestroy(): void;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResultsTableContainerComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ResultsTableContainerComponent, "gn-ui-results-table-container", never, { "canDuplicate": { "alias": "canDuplicate"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; }, { "recordClick": "recordClick"; "duplicateRecord": "duplicateRecord"; }, never, never, true, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResultsTableContainerComponent, "gn-ui-results-table-container", never, { "canDuplicate": { "alias": "canDuplicate"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "isDuplicating": { "alias": "isDuplicating"; "required": false; }; }, { "recordClick": "recordClick"; "duplicateRecord": "duplicateRecord"; }, never, never, true, never>;
|
|
35
36
|
}
|
|
36
37
|
//# sourceMappingURL=results-table-container.component.d.ts.map
|
package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results-table-container.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/search/src/lib/results-table/results-table-container.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAEZ,SAAS,EAEV,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sFAAsF,CAAA;AAGjI,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;;AAEtD,qBAOa,8BAA+B,YAAW,SAAS;
|
|
1
|
+
{"version":3,"file":"results-table-container.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/search/src/lib/results-table/results-table-container.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAEZ,SAAS,EAEV,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sFAAsF,CAAA;AAGjI,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;;AAEtD,qBAOa,8BAA+B,YAAW,SAAS;IAiB5D,SAAS,CAAC,YAAY,EAAE,YAAY;IACpC,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,gBAAgB;IArBjB,YAAY,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAa;IAC7D,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAa;IAC1D,aAAa,EAAE,KAAK,CAAA;IAEnB,WAAW,8BAAoC;IAC/C,eAAe,8BAAoC;IAE7D,YAAY,eAAqB;IAEjC,gBAAgB,2CAAoD;IACpE,OAAO,qGAA4B;IAEnC,QAAQ,WAAY,aAAa,KAAG,OAAO,CACqB;gBAGpD,YAAY,EAAE,YAAY,EAC5B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,0BAA0B,EAC7C,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,gBAAgB;IAG5C,iBAAiB,CAAC,IAAI,EAAE,OAAO;IAI/B,qBAAqB,CAAC,IAAI,EAAE,OAAO;IAI7B,kBAAkB,CAAC,IAAI,EAAE,OAAO;IA0CtC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM;IAIrD,2BAA2B,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,OAAO;IAQvE,WAAW;yCAvFA,8BAA8B;2CAA9B,8BAA8B;CA0F1C"}
|
|
@@ -8,7 +8,7 @@ export declare class RecordApiFormComponent {
|
|
|
8
8
|
offset$: BehaviorSubject<string>;
|
|
9
9
|
limit$: BehaviorSubject<string>;
|
|
10
10
|
format$: BehaviorSubject<string>;
|
|
11
|
-
endpoint$: BehaviorSubject<
|
|
11
|
+
endpoint$: BehaviorSubject<OgcApiEndpoint | WfsEndpoint>;
|
|
12
12
|
apiBaseUrl: string;
|
|
13
13
|
apiFeatureType: string;
|
|
14
14
|
supportOffset: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class UrlInputComponent {
|
|
3
|
+
export declare class UrlInputComponent implements OnChanges {
|
|
4
4
|
private cd;
|
|
5
5
|
set value(v: string);
|
|
6
6
|
extraClass: string;
|
|
@@ -14,6 +14,7 @@ export declare class UrlInputComponent {
|
|
|
14
14
|
uploadClick: EventEmitter<string>;
|
|
15
15
|
inputValue: string;
|
|
16
16
|
constructor(cd: ChangeDetectorRef);
|
|
17
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
17
18
|
handleInput(event: Event): void;
|
|
18
19
|
handleUpload(element: HTMLInputElement): void;
|
|
19
20
|
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,EAEZ,SAAS,EAET,aAAa,EACd,MAAM,eAAe,CAAA;;AAUtB,qBAca,iBAAkB,YAAW,SAAS;IA0BrC,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,OAAO,EAAE,aAAa;IAMlC,WAAW,CAAC,KAAK,EAAE,KAAK;IAWxB,YAAY,CAAC,OAAO,EAAE,gBAAgB;IAMtC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;yCAnDrB,iBAAiB;2CAAjB,iBAAiB;CA2D7B"}
|
|
@@ -15,6 +15,7 @@ export declare class ResultsTableComponent {
|
|
|
15
15
|
canDuplicate: (record: CatalogRecord) => boolean;
|
|
16
16
|
canDelete: (record: CatalogRecord) => boolean;
|
|
17
17
|
isDraftPage: boolean;
|
|
18
|
+
isDuplicating: boolean;
|
|
18
19
|
sortByChange: EventEmitter<[string, "desc" | "asc"]>;
|
|
19
20
|
recordClick: EventEmitter<CatalogRecord>;
|
|
20
21
|
duplicateRecord: EventEmitter<CatalogRecord>;
|
|
@@ -38,6 +39,6 @@ export declare class ResultsTableComponent {
|
|
|
38
39
|
isChecked(record: CatalogRecord): boolean;
|
|
39
40
|
handleRecordSelectedChange(selected: boolean, record: CatalogRecord): void;
|
|
40
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResultsTableComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ResultsTableComponent, "gn-ui-results-table", never, { "records": { "alias": "records"; "required": false; }; "selectedRecordsIdentifiers": { "alias": "selectedRecordsIdentifiers"; "required": false; }; "sortOrder": { "alias": "sortOrder"; "required": false; }; "hasDraft": { "alias": "hasDraft"; "required": false; }; "canDuplicate": { "alias": "canDuplicate"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "isDraftPage": { "alias": "isDraftPage"; "required": false; }; }, { "sortByChange": "sortByChange"; "recordClick": "recordClick"; "duplicateRecord": "duplicateRecord"; "deleteRecord": "deleteRecord"; "recordsSelectedChange": "recordsSelectedChange"; }, never, never, true, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResultsTableComponent, "gn-ui-results-table", never, { "records": { "alias": "records"; "required": false; }; "selectedRecordsIdentifiers": { "alias": "selectedRecordsIdentifiers"; "required": false; }; "sortOrder": { "alias": "sortOrder"; "required": false; }; "hasDraft": { "alias": "hasDraft"; "required": false; }; "canDuplicate": { "alias": "canDuplicate"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "isDraftPage": { "alias": "isDraftPage"; "required": false; }; "isDuplicating": { "alias": "isDuplicating"; "required": false; }; }, { "sortByChange": "sortByChange"; "recordClick": "recordClick"; "duplicateRecord": "duplicateRecord"; "deleteRecord": "deleteRecord"; "recordsSelectedChange": "recordsSelectedChange"; }, never, never, true, never>;
|
|
42
43
|
}
|
|
43
44
|
//# sourceMappingURL=results-table.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results-table.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/search/src/lib/results-table/results-table.component.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAGZ,SAAS,EAET,gBAAgB,EACjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAEL,WAAW,EACZ,MAAM,2DAA2D,CAAA;AAMlE,OAAO,EACL,UAAU,EAKX,MAAM,wCAAwC,CAAA;AAK/C,OAAO,EAGL,OAAO,EAER,MAAM,sBAAsB,CAAA;;AAI7B,qBAkBa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"results-table.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/search/src/lib/results-table/results-table.component.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAGZ,SAAS,EAET,gBAAgB,EACjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAEL,WAAW,EACZ,MAAM,2DAA2D,CAAA;AAMlE,OAAO,EACL,UAAU,EAKX,MAAM,wCAAwC,CAAA;AAK/C,OAAO,EAGL,OAAO,EAER,MAAM,sBAAsB,CAAA;;AAI7B,qBAkBa,qBAAqB;IA0B9B,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,GAAG;IA3BJ,OAAO,EAAE,aAAa,EAAE,CAAK;IAC7B,0BAA0B,EAAE,MAAM,EAAE,CAAK;IACzC,SAAS,EAAE,WAAW,CAAO;IAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAc;IAC1D,YAAY,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAa;IAC7D,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAa;IAC1D,WAAW,UAAQ;IACnB,aAAa,UAAQ;IAGpB,YAAY,yCAA+C;IAC3D,WAAW,8BAAoC;IAC/C,eAAe,8BAAoC;IACnD,YAAY,8BAAoC;IAChD,qBAAqB,2CAE5B;IAGH,iBAAiB,EAAG,SAAS,CAAC,UAAU,CAAC,CAAA;IACzC,OAAO,CAAC,UAAU,CAAa;IAE/B,gBAAgB,UAAQ;gBAGd,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,iBAAiB;IAGhC,cAAc,CAAC,IAAI,KAAA,EAAE,QAAQ,KAAA;IAyC7B,eAAe;IAQf,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAShC,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,EAAE;IAerD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM;IAIlD,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM;IAIzC,iBAAiB,CAAC,IAAI,EAAE,aAAa;IAKrC,eAAe,CAAC,IAAI,EAAE,OAAO;IAI7B,YAAY,CAAC,IAAI,EAAE,OAAO;IAK1B,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM;IAI5C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI;IAe9C,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAIzC,0BAA0B,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa;yCArJxD,qBAAqB;2CAArB,qBAAqB;CAwJjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatasetOnlineResource } from '../../../../../../libs/common/domain/src/lib/model/record';
|
|
1
|
+
import { DatasetOnlineResource, ServiceProtocol } from '../../../../../../libs/common/domain/src/lib/model/record';
|
|
2
2
|
export declare const FORMATS: {
|
|
3
3
|
readonly csv: {
|
|
4
4
|
readonly extensions: readonly ["csv"];
|
|
@@ -107,5 +107,6 @@ export declare function mimeTypeToFormat(mimeType: string): FileFormat;
|
|
|
107
107
|
export declare function checkFileFormat(link: DatasetOnlineResource, format: FileFormat): boolean;
|
|
108
108
|
export declare function getBadgeColor(linkFormat: FileFormat): string;
|
|
109
109
|
export declare function getLinkLabel(link: DatasetOnlineResource): string;
|
|
110
|
+
export declare function getLayers(url: string, serviceProtocol: ServiceProtocol): Promise<any[]>;
|
|
110
111
|
export declare function getMimeTypeForFormat(format: FileFormat): string | null;
|
|
111
112
|
//# sourceMappingURL=link-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,eAAe,EAChB,MAAM,2DAA2D,CAAA;AAUlE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHV,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAA;AAE7C,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAUhE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAEnE;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,GACpB,UAAU,GAAG,IAAI,CAgBnB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,qBAAqB,GAAG,UAAU,CAcrE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,qBAAqB,EAC3B,KAAK,EAAE,MAAM,GACZ,OAAO,CAQT;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAO7D;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,qBAAqB,EAC3B,MAAM,EAAE,UAAU,GACjB,OAAO,CAMT;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAQ5D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CA0BhE;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,kBAwB5E;AAcD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAEtE"}
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
class="flex flex-row gap-[8px]"
|
|
18
18
|
[(ngModel)]="service.accessServiceProtocol"
|
|
19
19
|
[disabled]="disabled"
|
|
20
|
+
(change)="resetAllFormFields()"
|
|
20
21
|
>
|
|
21
22
|
<mat-radio-button
|
|
22
23
|
*ngFor="let protocolOption of protocolOptions"
|
|
@@ -30,29 +31,60 @@
|
|
|
30
31
|
<div class="flex flex-col gap-4">
|
|
31
32
|
<gn-ui-url-input
|
|
32
33
|
class="w-full"
|
|
33
|
-
(
|
|
34
|
+
(uploadClick)="handleUploadClick($event)"
|
|
35
|
+
(valueChange)="handleUrlValueChange($event)"
|
|
34
36
|
[disabled]="disabled"
|
|
35
37
|
[value]="url"
|
|
36
|
-
[showValidateButton]="
|
|
38
|
+
[showValidateButton]="activeLayerSuggestion"
|
|
37
39
|
>
|
|
38
|
-
<ng-
|
|
40
|
+
<ng-content *ngIf="activeLayerSuggestion">
|
|
41
|
+
<ng-icon name="iconoirCloudUpload"></ng-icon>
|
|
42
|
+
</ng-content>
|
|
39
43
|
</gn-ui-url-input>
|
|
40
44
|
|
|
45
|
+
<p class="text-sm text-red-500 pl-4" *ngIf="errorMessage" translate>
|
|
46
|
+
editor.record.form.field.onlineResource.edit.identifier.error
|
|
47
|
+
</p>
|
|
48
|
+
|
|
41
49
|
<gn-ui-text-input
|
|
42
50
|
class="grow border-b border-gray-300 pb-4"
|
|
43
51
|
[(value)]="service.identifierInService"
|
|
44
52
|
[placeholder]="getIdentifierPlaceholder() | translate"
|
|
45
53
|
data-cy="identifier-in-service"
|
|
46
54
|
[disabled]="disabled"
|
|
55
|
+
*ngIf="
|
|
56
|
+
!activeLayerSuggestion ||
|
|
57
|
+
(url && errorMessage) ||
|
|
58
|
+
(modifyMode && (layers$ | async).length === 0)
|
|
59
|
+
"
|
|
47
60
|
></gn-ui-text-input>
|
|
48
|
-
|
|
61
|
+
<gn-ui-autocomplete
|
|
62
|
+
class="border-b border-gray-300 pb-4"
|
|
63
|
+
[placeholder]="
|
|
64
|
+
'editor.record.form.field.onlineResource.edit.identifier.select.label'
|
|
65
|
+
| translate
|
|
66
|
+
"
|
|
67
|
+
[action]="autoCompleteAction"
|
|
68
|
+
(itemSelected)="handleSelectValue($event)"
|
|
69
|
+
[displayWithFn]="displayWithFn"
|
|
70
|
+
[minCharacterCount]="0"
|
|
71
|
+
[clearOnSelection]="false"
|
|
72
|
+
*ngIf="activeLayerSuggestion && (layers$ | async)?.length > 0"
|
|
73
|
+
>
|
|
74
|
+
</gn-ui-autocomplete>
|
|
49
75
|
<gn-ui-button
|
|
50
76
|
(buttonClick)="submitIdentifier(service.identifierInService)"
|
|
51
|
-
[disabled]="disabled || !service.identifierInService
|
|
77
|
+
[disabled]="disabled || !service.identifierInService"
|
|
52
78
|
type="primary"
|
|
79
|
+
*ngIf="
|
|
80
|
+
!modifyMode &&
|
|
81
|
+
((activeLayerSuggestion && (layers$ | async)) ||
|
|
82
|
+
!activeLayerSuggestion ||
|
|
83
|
+
(url && errorMessage))
|
|
84
|
+
"
|
|
53
85
|
>
|
|
54
|
-
<span class="text-white font-bold" translate
|
|
55
|
-
|
|
86
|
+
<span class="text-white font-bold" translate>
|
|
87
|
+
editor.record.form.field.onlineResource.edit.identifier.submit</span
|
|
56
88
|
>
|
|
57
89
|
</gn-ui-button>
|
|
58
90
|
</div>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import {
|
|
3
3
|
ChangeDetectionStrategy,
|
|
4
|
+
ChangeDetectorRef,
|
|
4
5
|
Component,
|
|
5
6
|
EventEmitter,
|
|
6
7
|
Input,
|
|
7
8
|
OnChanges,
|
|
9
|
+
OnInit,
|
|
8
10
|
Output,
|
|
9
11
|
} from '@angular/core'
|
|
10
12
|
import { FormsModule } from '@angular/forms'
|
|
@@ -16,6 +18,7 @@ import {
|
|
|
16
18
|
ServiceProtocol,
|
|
17
19
|
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
18
20
|
import {
|
|
21
|
+
AutocompleteComponent,
|
|
19
22
|
ButtonComponent,
|
|
20
23
|
TextInputComponent,
|
|
21
24
|
UrlInputComponent,
|
|
@@ -27,6 +30,15 @@ import {
|
|
|
27
30
|
provideNgIconsConfig,
|
|
28
31
|
} from '@ng-icons/core'
|
|
29
32
|
import { iconoirCloudUpload } from '@ng-icons/iconoir'
|
|
33
|
+
import { createFuzzyFilter, getLayers } from '../../../../../../../libs/util/shared/src'
|
|
34
|
+
import {
|
|
35
|
+
BehaviorSubject,
|
|
36
|
+
debounceTime,
|
|
37
|
+
distinctUntilChanged,
|
|
38
|
+
map,
|
|
39
|
+
Observable,
|
|
40
|
+
switchMap,
|
|
41
|
+
} from 'rxjs'
|
|
30
42
|
|
|
31
43
|
@Component({
|
|
32
44
|
selector: 'gn-ui-online-service-resource-input',
|
|
@@ -35,6 +47,7 @@ import { iconoirCloudUpload } from '@ng-icons/iconoir'
|
|
|
35
47
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
48
|
standalone: true,
|
|
37
49
|
imports: [
|
|
50
|
+
AutocompleteComponent,
|
|
38
51
|
ButtonComponent,
|
|
39
52
|
CommonModule,
|
|
40
53
|
FormsModule,
|
|
@@ -52,18 +65,23 @@ import { iconoirCloudUpload } from '@ng-icons/iconoir'
|
|
|
52
65
|
}),
|
|
53
66
|
],
|
|
54
67
|
})
|
|
55
|
-
export class OnlineServiceResourceInputComponent implements OnChanges {
|
|
56
|
-
@Input() service:
|
|
68
|
+
export class OnlineServiceResourceInputComponent implements OnChanges, OnInit {
|
|
69
|
+
@Input() service: DatasetServiceDistribution
|
|
57
70
|
@Input() protocolHint?: string
|
|
58
71
|
@Input() disabled? = false
|
|
72
|
+
@Input() modifyMode? = false
|
|
59
73
|
@Output() urlChange: EventEmitter<string> = new EventEmitter()
|
|
60
74
|
@Output() identifierSubmit: EventEmitter<{
|
|
61
75
|
url: string
|
|
62
76
|
identifier: string
|
|
63
77
|
}> = new EventEmitter()
|
|
64
78
|
|
|
79
|
+
errorMessage = false
|
|
65
80
|
selectedProtocol: ServiceProtocol
|
|
66
|
-
url
|
|
81
|
+
url = ''
|
|
82
|
+
layersSubject = new BehaviorSubject<{ name: string; title: string }[]>([])
|
|
83
|
+
layers$: Observable<{ name: string; title: string }[]> =
|
|
84
|
+
this.layersSubject.asObservable()
|
|
67
85
|
|
|
68
86
|
protocolOptions: {
|
|
69
87
|
label: string
|
|
@@ -99,6 +117,14 @@ export class OnlineServiceResourceInputComponent implements OnChanges {
|
|
|
99
117
|
},
|
|
100
118
|
]
|
|
101
119
|
|
|
120
|
+
constructor(private cdr: ChangeDetectorRef) {}
|
|
121
|
+
|
|
122
|
+
get activeLayerSuggestion() {
|
|
123
|
+
return !['wps', 'GPFDL', 'esriRest', 'other'].includes(
|
|
124
|
+
this.service.accessServiceProtocol
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
|
|
102
128
|
ngOnChanges() {
|
|
103
129
|
this.selectedProtocol =
|
|
104
130
|
this.protocolOptions.find(
|
|
@@ -106,8 +132,48 @@ export class OnlineServiceResourceInputComponent implements OnChanges {
|
|
|
106
132
|
)?.value ?? 'other'
|
|
107
133
|
}
|
|
108
134
|
|
|
109
|
-
|
|
135
|
+
ngOnInit() {
|
|
136
|
+
if (this.service.url) {
|
|
137
|
+
this.url = this.service.url.toString()
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
handleUrlValueChange(url: string) {
|
|
110
142
|
this.url = url
|
|
143
|
+
this.service.url = url ? new URL(url) : undefined
|
|
144
|
+
this.resetLayersSuggestion()
|
|
145
|
+
this.urlChange.emit(this.url)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
async handleUploadClick(url: string) {
|
|
149
|
+
this.url = url
|
|
150
|
+
|
|
151
|
+
try {
|
|
152
|
+
const layers = await getLayers(url, this.service.accessServiceProtocol)
|
|
153
|
+
|
|
154
|
+
if (layers.length === 0) {
|
|
155
|
+
throw new Error('No layers found')
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
this.layersSubject.next([...layers])
|
|
159
|
+
} catch (e) {
|
|
160
|
+
this.errorMessage = true
|
|
161
|
+
this.layersSubject.next([])
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
this.cdr.detectChanges()
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
resetAllFormFields() {
|
|
168
|
+
this.url = ''
|
|
169
|
+
this.service.url = null
|
|
170
|
+
this.resetLayersSuggestion()
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
resetLayersSuggestion() {
|
|
174
|
+
this.errorMessage = false
|
|
175
|
+
this.layersSubject.next([])
|
|
176
|
+
this.service.identifierInService = null
|
|
111
177
|
}
|
|
112
178
|
|
|
113
179
|
submitIdentifier(identifier: string) {
|
|
@@ -123,4 +189,34 @@ export class OnlineServiceResourceInputComponent implements OnChanges {
|
|
|
123
189
|
? `${baseKey}.wps`
|
|
124
190
|
: baseKey
|
|
125
191
|
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* gn-ui-autocomplete
|
|
195
|
+
*/
|
|
196
|
+
displayWithFn(item: { name: string; title: string }) {
|
|
197
|
+
return item.title
|
|
198
|
+
? `${item.title} ${item.name ? `(${item.name})` : ''}`
|
|
199
|
+
: item.name
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* gn-ui-autocomplete
|
|
204
|
+
*/
|
|
205
|
+
autoCompleteAction = (query: string) => {
|
|
206
|
+
const fuzzyFilter = createFuzzyFilter(query)
|
|
207
|
+
return this.layers$.pipe(
|
|
208
|
+
switchMap((layers) => [
|
|
209
|
+
layers.filter((layer) => fuzzyFilter(layer.name)),
|
|
210
|
+
]),
|
|
211
|
+
debounceTime(100),
|
|
212
|
+
distinctUntilChanged()
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* gn-ui-autocomplete
|
|
218
|
+
*/
|
|
219
|
+
handleSelectValue(val: { name: string; title: string }) {
|
|
220
|
+
this.service.identifierInService = val.name
|
|
221
|
+
}
|
|
126
222
|
}
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
<gn-ui-online-service-resource-input
|
|
22
22
|
[service]="newService"
|
|
23
23
|
[disabled]="disabled$ | async"
|
|
24
|
-
(urlChange)="handleServiceUrlChange($event)"
|
|
25
24
|
(identifierSubmit)="handleIdentifierSubmit($event)"
|
|
26
25
|
></gn-ui-online-service-resource-input>
|
|
27
26
|
</div>
|
|
@@ -55,19 +54,22 @@
|
|
|
55
54
|
[(value)]="onlineResource.description"
|
|
56
55
|
></gn-ui-text-area>
|
|
57
56
|
</div>
|
|
58
|
-
<ng-container *ngIf="onlineResource.type === 'service'">
|
|
57
|
+
<ng-container *ngIf="onlineResource.type === 'service'; else urlInput">
|
|
59
58
|
<span class="w-full border-b border-gray-300"></span>
|
|
60
59
|
<gn-ui-online-service-resource-input
|
|
61
60
|
[service]="onlineResource"
|
|
61
|
+
[modifyMode]="true"
|
|
62
62
|
></gn-ui-online-service-resource-input>
|
|
63
63
|
</ng-container>
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
<ng-template #urlInput>
|
|
65
|
+
<span class="w-full border-b border-gray-300"></span>
|
|
66
|
+
<gn-ui-url-input
|
|
67
|
+
class="w-full"
|
|
68
|
+
[disabled]="true"
|
|
69
|
+
[value]="onlineResource.url"
|
|
70
|
+
[showValidateButton]="false"
|
|
71
|
+
></gn-ui-url-input>
|
|
72
|
+
</ng-template>
|
|
71
73
|
</div>
|
|
72
74
|
</ng-template>
|
|
73
75
|
</div>
|
|
@@ -92,11 +92,12 @@ export class FormFieldOnlineResourcesComponent {
|
|
|
92
92
|
notLinkResources: OnlineNotLinkResource[] = []
|
|
93
93
|
uploadProgress = undefined
|
|
94
94
|
uploadSubscription: Subscription = null
|
|
95
|
-
newService = {
|
|
95
|
+
newService = <DatasetServiceDistribution>{
|
|
96
96
|
type: 'service',
|
|
97
97
|
accessServiceProtocol: 'ogcFeatures',
|
|
98
98
|
identifierInService: '',
|
|
99
|
-
|
|
99
|
+
url: undefined,
|
|
100
|
+
}
|
|
100
101
|
|
|
101
102
|
protected MAX_UPLOAD_SIZE_MB = MAX_UPLOAD_SIZE_MB
|
|
102
103
|
|
package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
[sortOrder]="sortBy$ | async"
|
|
7
7
|
[canDelete]="canDelete"
|
|
8
8
|
[canDuplicate]="canDuplicate"
|
|
9
|
+
[isDuplicating]="isDuplicating"
|
|
9
10
|
(recordClick)="handleRecordClick($event)"
|
|
10
11
|
(duplicateRecord)="handleDuplicateRecord($event)"
|
|
11
12
|
(deleteRecord)="handleDeleteRecord($event)"
|
|
@@ -26,6 +26,7 @@ import { TranslateService } from '@ngx-translate/core'
|
|
|
26
26
|
export class ResultsTableContainerComponent implements OnDestroy {
|
|
27
27
|
@Input() canDuplicate: (record: CatalogRecord) => boolean = () => true
|
|
28
28
|
@Input() canDelete: (record: CatalogRecord) => boolean = () => true
|
|
29
|
+
@Input() isDuplicating: false
|
|
29
30
|
|
|
30
31
|
@Output() recordClick = new EventEmitter<CatalogRecord>()
|
|
31
32
|
@Output() duplicateRecord = new EventEmitter<CatalogRecord>()
|
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
Component,
|
|
5
5
|
EventEmitter,
|
|
6
6
|
Input,
|
|
7
|
+
OnChanges,
|
|
7
8
|
Output,
|
|
9
|
+
SimpleChanges,
|
|
8
10
|
} from '@angular/core'
|
|
9
11
|
import { CommonModule } from '@angular/common'
|
|
10
12
|
import { ButtonComponent } from '../button/button.component'
|
|
@@ -29,7 +31,7 @@ import { iconoirArrowUp, iconoirLink } from '@ng-icons/iconoir'
|
|
|
29
31
|
],
|
|
30
32
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
33
|
})
|
|
32
|
-
export class UrlInputComponent {
|
|
34
|
+
export class UrlInputComponent implements OnChanges {
|
|
33
35
|
@Input() set value(v: string) {
|
|
34
36
|
// we're making sure to only update the input if the URL representation of it has changed; otherwise we keep it identical
|
|
35
37
|
// to avoid glitches when starting to write a URL and having some characters added/replaced automatically
|
|
@@ -57,6 +59,12 @@ export class UrlInputComponent {
|
|
|
57
59
|
|
|
58
60
|
constructor(private cd: ChangeDetectorRef) {}
|
|
59
61
|
|
|
62
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
63
|
+
if (changes['value']) {
|
|
64
|
+
this.inputValue = changes['value'].currentValue
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
handleInput(event: Event) {
|
|
61
69
|
const value = (event.target as HTMLInputElement).value
|
|
62
70
|
this.inputValue = value
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
(buttonClick)="duplicate.emit()"
|
|
12
12
|
[disabled]="!canDuplicate"
|
|
13
13
|
data-test="record-menu-duplicate-button"
|
|
14
|
-
|
|
14
|
+
>
|
|
15
|
+
<span *ngIf="canDuplicate" translate>record.action.duplicate</span>
|
|
16
|
+
<span *ngIf="!canDuplicate" translate
|
|
17
|
+
>record.action.duplicating</span
|
|
18
|
+
></gn-ui-button
|
|
15
19
|
>
|
|
16
20
|
<gn-ui-button
|
|
17
21
|
type="light"
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
</gn-ui-button>
|
|
161
161
|
<ng-template #template>
|
|
162
162
|
<gn-ui-action-menu
|
|
163
|
-
[canDuplicate]="canDuplicate(item)"
|
|
163
|
+
[canDuplicate]="canDuplicate(item) && !isDuplicating"
|
|
164
164
|
[canDelete]="canDelete(item)"
|
|
165
165
|
(duplicate)="handleDuplicate(item)"
|
|
166
166
|
(delete)="handleDelete(item)"
|
|
@@ -66,6 +66,7 @@ export class ResultsTableComponent {
|
|
|
66
66
|
@Input() canDuplicate: (record: CatalogRecord) => boolean = () => true
|
|
67
67
|
@Input() canDelete: (record: CatalogRecord) => boolean = () => true
|
|
68
68
|
@Input() isDraftPage = false
|
|
69
|
+
@Input() isDuplicating = false
|
|
69
70
|
|
|
70
71
|
// emits the column (field) as well as the order
|
|
71
72
|
@Output() sortByChange = new EventEmitter<[string, 'asc' | 'desc']>()
|