geonetwork-ui 2.4.1-dev.b217f2e40 → 2.4.1-dev.bf3be28aa
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/+state/editor.selectors.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +10 -80
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +23 -36
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.mjs +3 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +3 -5
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +2 -7
- 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 +3 -6
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +1 -37
- package/esm2022/translations/de.json +0 -3
- package/esm2022/translations/en.json +0 -3
- package/esm2022/translations/es.json +0 -3
- package/esm2022/translations/fr.json +0 -3
- package/esm2022/translations/it.json +0 -3
- package/esm2022/translations/nl.json +0 -3
- package/esm2022/translations/pt.json +0 -3
- package/fesm2022/geonetwork-ui.mjs +45 -193
- 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 +5 -44
- 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-license/form-field-license.component.d.ts +4 -4
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.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 +1 -2
- 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 +2 -3
- 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 +1 -2
- 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 +1 -2
- 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/+state/editor.selectors.ts +3 -3
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +7 -39
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +4 -100
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts +19 -31
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.html +9 -11
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts +2 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +2 -2
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +0 -1
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +0 -1
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +1 -9
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +1 -5
- 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 +0 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +1 -48
- package/translations/de.json +0 -3
- package/translations/en.json +0 -3
- package/translations/es.json +0 -3
- package/translations/fr.json +0 -3
- package/translations/it.json +0 -3
- package/translations/nl.json +0 -3
- package/translations/pt.json +0 -3
- package/translations/sk.json +0 -3
|
@@ -1,65 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnChanges } from '@angular/core';
|
|
2
2
|
import { DatasetServiceDistribution, ServiceProtocol } from '../../../../../../../libs/common/domain/src/lib/model/record';
|
|
3
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class OnlineServiceResourceInputComponent implements OnChanges
|
|
6
|
-
|
|
7
|
-
service: DatasetServiceDistribution;
|
|
4
|
+
export declare class OnlineServiceResourceInputComponent implements OnChanges {
|
|
5
|
+
service: Omit<DatasetServiceDistribution, 'url'>;
|
|
8
6
|
protocolHint?: string;
|
|
9
7
|
disabled?: boolean;
|
|
10
|
-
modifyMode?: boolean;
|
|
11
8
|
urlChange: EventEmitter<string>;
|
|
12
9
|
identifierSubmit: EventEmitter<{
|
|
13
10
|
url: string;
|
|
14
11
|
identifier: string;
|
|
15
12
|
}>;
|
|
16
|
-
errorMessage: boolean;
|
|
17
13
|
selectedProtocol: ServiceProtocol;
|
|
18
14
|
url: string;
|
|
19
|
-
layersSubject: BehaviorSubject<{
|
|
20
|
-
name: string;
|
|
21
|
-
title: string;
|
|
22
|
-
}[]>;
|
|
23
|
-
layers$: Observable<{
|
|
24
|
-
name: string;
|
|
25
|
-
title: string;
|
|
26
|
-
}[]>;
|
|
27
15
|
protocolOptions: {
|
|
28
16
|
label: string;
|
|
29
17
|
value: ServiceProtocol;
|
|
30
18
|
}[];
|
|
31
|
-
constructor(cdr: ChangeDetectorRef);
|
|
32
|
-
get activeLayerSuggestion(): boolean;
|
|
33
19
|
ngOnChanges(): void;
|
|
34
|
-
|
|
35
|
-
handleUrlValueChange(url: string): void;
|
|
36
|
-
handleUploadClick(url: string): Promise<void>;
|
|
37
|
-
resetAllFormFields(): void;
|
|
38
|
-
resetLayersSuggestion(): void;
|
|
20
|
+
handleUrlChange(url: string): void;
|
|
39
21
|
submitIdentifier(identifier: string): void;
|
|
40
22
|
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;
|
|
62
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<OnlineServiceResourceInputComponent, 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; };
|
|
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, never, true, never>;
|
|
64
25
|
}
|
|
65
26
|
//# 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,EAGL,YAAY,EAEZ,SAAS,EAEV,MAAM,eAAe,CAAA;AAKtB,OAAO,EACL,0BAA0B,EAC1B,eAAe,EAChB,MAAM,8DAA8D,CAAA;;AAcrE,qBAwBa,mCAAoC,YAAW,SAAS;IAC1D,OAAO,EAAE,IAAI,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAA;IAChD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAQ;IAChB,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,gBAAgB,EAAE,eAAe,CAAA;IACjC,GAAG,EAAE,MAAM,CAAA;IAEX,eAAe,EAAE;QACf,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,eAAe,CAAA;KACvB,EAAE,CA6BF;IAED,WAAW;IAOX,eAAe,CAAC,GAAG,EAAE,MAAM;IAI3B,gBAAgB,CAAC,UAAU,EAAE,MAAM;IAMnC,wBAAwB,IAAI,MAAM;yCAhEvB,mCAAmC;2CAAnC,mCAAmC;CAuE/C"}
|
|
@@ -7,14 +7,14 @@ type Licence = {
|
|
|
7
7
|
};
|
|
8
8
|
export declare class FormFieldLicenseComponent implements OnInit {
|
|
9
9
|
label: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
choices: Licence[];
|
|
10
|
+
recordConstraints: Constraint[];
|
|
11
|
+
recordConstraintsChange: EventEmitter<Constraint[]>;
|
|
13
12
|
selectedLicence: string;
|
|
14
13
|
ngOnInit(): void;
|
|
14
|
+
get licenceOptions(): Licence[];
|
|
15
15
|
handleLicenceSelection(licenceValue: string): void;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldLicenseComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldLicenseComponent, "gn-ui-form-field-license", never, { "label": { "alias": "label"; "required": false; }; "
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldLicenseComponent, "gn-ui-form-field-license", never, { "label": { "alias": "label"; "required": false; }; "recordConstraints": { "alias": "recordConstraints"; "required": false; }; }, { "recordConstraintsChange": "recordConstraintsChange"; }, never, never, true, never>;
|
|
18
18
|
}
|
|
19
19
|
export {};
|
|
20
20
|
//# sourceMappingURL=form-field-license.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-license.component.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEZ,MAAM,EAEP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,oEAAoE,CAAA;;AAI/F,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qBAQa,yBAA0B,YAAW,MAAM;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,
|
|
1
|
+
{"version":3,"file":"form-field-license.component.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEZ,MAAM,EAEP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,oEAAoE,CAAA;;AAI/F,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qBAQa,yBAA0B,YAAW,MAAM;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,UAAU,EAAE,CAAK;IACnC,uBAAuB,EAAE,YAAY,CAAC,UAAU,EAAE,CAAC,CACzC;IAEpB,eAAe,EAAE,MAAM,CAAA;IAEvB,QAAQ,IAAI,IAAI;IAchB,IAAI,cAAc,IAAI,OAAO,EAAE,CAK9B;IAED,sBAAsB,CAAC,YAAY,EAAE,MAAM;yCA7BhC,yBAAyB;2CAAzB,yBAAyB;CAiCrC"}
|
|
@@ -24,7 +24,7 @@ export declare class FormFieldOnlineResourcesComponent {
|
|
|
24
24
|
notLinkResources: OnlineNotLinkResource[];
|
|
25
25
|
uploadProgress: any;
|
|
26
26
|
uploadSubscription: Subscription;
|
|
27
|
-
newService: DatasetServiceDistribution
|
|
27
|
+
newService: Omit<DatasetServiceDistribution, "url">;
|
|
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;IAwC1C,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,MAAM;IA3CP,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,EAIL,IAAI,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAA;IAE5C,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;yCA/JX,iCAAiC;2CAAjC,iCAAiC;CA+L7C"}
|
|
@@ -17,7 +17,6 @@ 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;
|
|
21
20
|
recordClick: EventEmitter<CatalogRecord>;
|
|
22
21
|
duplicateRecord: EventEmitter<CatalogRecord>;
|
|
23
22
|
subscription: Subscription;
|
|
@@ -32,6 +31,6 @@ export declare class ResultsTableContainerComponent implements OnDestroy {
|
|
|
32
31
|
handleRecordsSelectedChange(records: CatalogRecord[], selected: boolean): void;
|
|
33
32
|
ngOnDestroy(): void;
|
|
34
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResultsTableContainerComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ResultsTableContainerComponent, "gn-ui-results-table-container", never, { "canDuplicate": { "alias": "canDuplicate"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; };
|
|
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>;
|
|
36
35
|
}
|
|
37
36
|
//# 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;IAgB5D,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;IApBjB,YAAY,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAa;IAC7D,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAa;IAEzD,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;yCAtFA,8BAA8B;2CAA9B,8BAA8B;CAyF1C"}
|
|
@@ -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<WfsEndpoint | OgcApiEndpoint>;
|
|
12
12
|
apiBaseUrl: string;
|
|
13
13
|
apiFeatureType: string;
|
|
14
14
|
supportOffset: boolean;
|
|
@@ -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,EAGb,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"}
|
|
@@ -15,7 +15,6 @@ export declare class ResultsTableComponent {
|
|
|
15
15
|
canDuplicate: (record: CatalogRecord) => boolean;
|
|
16
16
|
canDelete: (record: CatalogRecord) => boolean;
|
|
17
17
|
isDraftPage: boolean;
|
|
18
|
-
isDuplicating: boolean;
|
|
19
18
|
sortByChange: EventEmitter<[string, "desc" | "asc"]>;
|
|
20
19
|
recordClick: EventEmitter<CatalogRecord>;
|
|
21
20
|
duplicateRecord: EventEmitter<CatalogRecord>;
|
|
@@ -39,6 +38,6 @@ export declare class ResultsTableComponent {
|
|
|
39
38
|
isChecked(record: CatalogRecord): boolean;
|
|
40
39
|
handleRecordSelectedChange(selected: boolean, record: CatalogRecord): void;
|
|
41
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResultsTableComponent, 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; };
|
|
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>;
|
|
43
42
|
}
|
|
44
43
|
//# 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;IAyB9B,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,GAAG;IA1BJ,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;IAGlB,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;yCApJxD,qBAAqB;2CAArB,qBAAqB;CAuJjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatasetOnlineResource
|
|
1
|
+
import { DatasetOnlineResource } 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,6 +107,5 @@ 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[]>;
|
|
111
110
|
export declare function getMimeTypeForFormat(format: FileFormat): string | null;
|
|
112
111
|
//# 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,EAAE,qBAAqB,EAAE,MAAM,2DAA2D,CAAA;AAIjG,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,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAEtE"}
|
package/package.json
CHANGED
|
@@ -43,11 +43,11 @@ export const selectCurrentPage = createSelector(
|
|
|
43
43
|
export const selectRecordSections = createSelector(
|
|
44
44
|
selectEditorState,
|
|
45
45
|
(state: EditorState) => {
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
46
|
+
const currentPage = state.editorConfig.pages[state.currentPage]
|
|
47
|
+
if (!currentPage) {
|
|
48
48
|
return [] as EditorSectionWithValues[]
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return currentPage.sections.map((section) => ({
|
|
51
51
|
...section,
|
|
52
52
|
fieldsWithValues: section.fields.map((fieldConfig) => ({
|
|
53
53
|
config: fieldConfig,
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
class="flex flex-row gap-[8px]"
|
|
18
18
|
[(ngModel)]="service.accessServiceProtocol"
|
|
19
19
|
[disabled]="disabled"
|
|
20
|
-
(change)="resetAllFormFields()"
|
|
21
20
|
>
|
|
22
21
|
<mat-radio-button
|
|
23
22
|
*ngFor="let protocolOption of protocolOptions"
|
|
@@ -31,60 +30,29 @@
|
|
|
31
30
|
<div class="flex flex-col gap-4">
|
|
32
31
|
<gn-ui-url-input
|
|
33
32
|
class="w-full"
|
|
34
|
-
(
|
|
35
|
-
(valueChange)="handleUrlValueChange($event)"
|
|
33
|
+
(valueChange)="handleUrlChange($event)"
|
|
36
34
|
[disabled]="disabled"
|
|
37
35
|
[value]="url"
|
|
38
|
-
[showValidateButton]="
|
|
36
|
+
[showValidateButton]="false"
|
|
39
37
|
>
|
|
40
|
-
<ng-
|
|
41
|
-
<ng-icon name="iconoirCloudUpload"></ng-icon>
|
|
42
|
-
</ng-content>
|
|
38
|
+
<ng-icon name="iconoirCloudUpload"></ng-icon>
|
|
43
39
|
</gn-ui-url-input>
|
|
44
40
|
|
|
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
|
-
|
|
49
41
|
<gn-ui-text-input
|
|
50
42
|
class="grow border-b border-gray-300 pb-4"
|
|
51
43
|
[(value)]="service.identifierInService"
|
|
52
44
|
[placeholder]="getIdentifierPlaceholder() | translate"
|
|
53
45
|
data-cy="identifier-in-service"
|
|
54
46
|
[disabled]="disabled"
|
|
55
|
-
*ngIf="
|
|
56
|
-
!activeLayerSuggestion ||
|
|
57
|
-
(url && errorMessage) ||
|
|
58
|
-
(modifyMode && (layers$ | async).length === 0)
|
|
59
|
-
"
|
|
60
47
|
></gn-ui-text-input>
|
|
61
|
-
|
|
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>
|
|
48
|
+
|
|
75
49
|
<gn-ui-button
|
|
76
50
|
(buttonClick)="submitIdentifier(service.identifierInService)"
|
|
77
|
-
[disabled]="disabled || !service.identifierInService"
|
|
51
|
+
[disabled]="disabled || !service.identifierInService || !url"
|
|
78
52
|
type="primary"
|
|
79
|
-
*ngIf="
|
|
80
|
-
!modifyMode &&
|
|
81
|
-
((activeLayerSuggestion && (layers$ | async)) ||
|
|
82
|
-
!activeLayerSuggestion ||
|
|
83
|
-
(url && errorMessage))
|
|
84
|
-
"
|
|
85
53
|
>
|
|
86
|
-
<span class="text-white font-bold" translate
|
|
87
|
-
editor.record.form.field.onlineResource.edit.identifier.submit</span
|
|
54
|
+
<span class="text-white font-bold" translate
|
|
55
|
+
>editor.record.form.field.onlineResource.edit.identifier.submit</span
|
|
88
56
|
>
|
|
89
57
|
</gn-ui-button>
|
|
90
58
|
</div>
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import {
|
|
3
3
|
ChangeDetectionStrategy,
|
|
4
|
-
ChangeDetectorRef,
|
|
5
4
|
Component,
|
|
6
5
|
EventEmitter,
|
|
7
6
|
Input,
|
|
8
7
|
OnChanges,
|
|
9
|
-
OnInit,
|
|
10
8
|
Output,
|
|
11
9
|
} from '@angular/core'
|
|
12
10
|
import { FormsModule } from '@angular/forms'
|
|
@@ -18,7 +16,6 @@ import {
|
|
|
18
16
|
ServiceProtocol,
|
|
19
17
|
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
20
18
|
import {
|
|
21
|
-
AutocompleteComponent,
|
|
22
19
|
ButtonComponent,
|
|
23
20
|
TextInputComponent,
|
|
24
21
|
UrlInputComponent,
|
|
@@ -30,15 +27,6 @@ import {
|
|
|
30
27
|
provideNgIconsConfig,
|
|
31
28
|
} from '@ng-icons/core'
|
|
32
29
|
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'
|
|
42
30
|
|
|
43
31
|
@Component({
|
|
44
32
|
selector: 'gn-ui-online-service-resource-input',
|
|
@@ -47,7 +35,6 @@ import {
|
|
|
47
35
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
48
36
|
standalone: true,
|
|
49
37
|
imports: [
|
|
50
|
-
AutocompleteComponent,
|
|
51
38
|
ButtonComponent,
|
|
52
39
|
CommonModule,
|
|
53
40
|
FormsModule,
|
|
@@ -65,23 +52,18 @@ import {
|
|
|
65
52
|
}),
|
|
66
53
|
],
|
|
67
54
|
})
|
|
68
|
-
export class OnlineServiceResourceInputComponent implements OnChanges
|
|
69
|
-
@Input() service: DatasetServiceDistribution
|
|
55
|
+
export class OnlineServiceResourceInputComponent implements OnChanges {
|
|
56
|
+
@Input() service: Omit<DatasetServiceDistribution, 'url'>
|
|
70
57
|
@Input() protocolHint?: string
|
|
71
58
|
@Input() disabled? = false
|
|
72
|
-
@Input() modifyMode? = false
|
|
73
59
|
@Output() urlChange: EventEmitter<string> = new EventEmitter()
|
|
74
60
|
@Output() identifierSubmit: EventEmitter<{
|
|
75
61
|
url: string
|
|
76
62
|
identifier: string
|
|
77
63
|
}> = new EventEmitter()
|
|
78
64
|
|
|
79
|
-
errorMessage = false
|
|
80
65
|
selectedProtocol: ServiceProtocol
|
|
81
|
-
url
|
|
82
|
-
layersSubject = new BehaviorSubject<{ name: string; title: string }[]>([])
|
|
83
|
-
layers$: Observable<{ name: string; title: string }[]> =
|
|
84
|
-
this.layersSubject.asObservable()
|
|
66
|
+
url: string
|
|
85
67
|
|
|
86
68
|
protocolOptions: {
|
|
87
69
|
label: string
|
|
@@ -117,14 +99,6 @@ export class OnlineServiceResourceInputComponent implements OnChanges, OnInit {
|
|
|
117
99
|
},
|
|
118
100
|
]
|
|
119
101
|
|
|
120
|
-
constructor(private cdr: ChangeDetectorRef) {}
|
|
121
|
-
|
|
122
|
-
get activeLayerSuggestion() {
|
|
123
|
-
return !['wps', 'GPFDL', 'esriRest', 'other'].includes(
|
|
124
|
-
this.service.accessServiceProtocol
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
102
|
ngOnChanges() {
|
|
129
103
|
this.selectedProtocol =
|
|
130
104
|
this.protocolOptions.find(
|
|
@@ -132,48 +106,8 @@ export class OnlineServiceResourceInputComponent implements OnChanges, OnInit {
|
|
|
132
106
|
)?.value ?? 'other'
|
|
133
107
|
}
|
|
134
108
|
|
|
135
|
-
|
|
136
|
-
if (this.service.url) {
|
|
137
|
-
this.url = this.service.url.toString()
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
handleUrlValueChange(url: string) {
|
|
109
|
+
handleUrlChange(url: string) {
|
|
142
110
|
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
|
|
177
111
|
}
|
|
178
112
|
|
|
179
113
|
submitIdentifier(identifier: string) {
|
|
@@ -189,34 +123,4 @@ export class OnlineServiceResourceInputComponent implements OnChanges, OnInit {
|
|
|
189
123
|
? `${baseKey}.wps`
|
|
190
124
|
: baseKey
|
|
191
125
|
}
|
|
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
|
-
}
|
|
222
126
|
}
|
|
@@ -26,47 +26,35 @@ type Licence = {
|
|
|
26
26
|
})
|
|
27
27
|
export class FormFieldLicenseComponent implements OnInit {
|
|
28
28
|
@Input() label: string
|
|
29
|
-
@Input()
|
|
30
|
-
@Output()
|
|
29
|
+
@Input() recordConstraints: Constraint[] = []
|
|
30
|
+
@Output() recordConstraintsChange: EventEmitter<Constraint[]> =
|
|
31
31
|
new EventEmitter()
|
|
32
32
|
|
|
33
|
-
choices: Licence[] = AVAILABLE_LICENSES.map((license) => ({
|
|
34
|
-
label: marker(`editor.record.form.license.${license}`),
|
|
35
|
-
value: license,
|
|
36
|
-
}))
|
|
37
|
-
|
|
38
33
|
selectedLicence: string
|
|
39
34
|
|
|
40
35
|
ngOnInit(): void {
|
|
41
|
-
if
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})?.text
|
|
49
|
-
}
|
|
50
|
-
|
|
36
|
+
// get the licence from the record constraints if it is one of the open data licence list
|
|
37
|
+
this.selectedLicence = this.recordConstraints.find((constraint) => {
|
|
38
|
+
return this.licenceOptions.find((licence) => {
|
|
39
|
+
return licence.value === constraint.text
|
|
40
|
+
})
|
|
41
|
+
})?.text
|
|
42
|
+
// otherwise pre-select the first licence option
|
|
51
43
|
if (this.selectedLicence === undefined) {
|
|
52
|
-
this.
|
|
53
|
-
|
|
54
|
-
value: this.recordLicences[0].text,
|
|
55
|
-
label: this.recordLicences[0].text,
|
|
56
|
-
},
|
|
57
|
-
...this.choices,
|
|
58
|
-
]
|
|
59
|
-
this.selectedLicence = this.recordLicences[0].text
|
|
44
|
+
this.selectedLicence = this.licenceOptions[0].value // cannot select 'etalab' as default as this would toggle the OpenData Toggle
|
|
45
|
+
this.recordConstraintsChange.emit([{ text: this.selectedLicence }])
|
|
60
46
|
}
|
|
61
47
|
}
|
|
62
48
|
|
|
49
|
+
get licenceOptions(): Licence[] {
|
|
50
|
+
return AVAILABLE_LICENSES.map((license) => ({
|
|
51
|
+
label: marker(`editor.record.form.license.${license}`),
|
|
52
|
+
value: license,
|
|
53
|
+
}))
|
|
54
|
+
}
|
|
55
|
+
|
|
63
56
|
handleLicenceSelection(licenceValue: string) {
|
|
64
57
|
this.selectedLicence = licenceValue
|
|
65
|
-
|
|
66
|
-
this.recordLicencesChange.emit([])
|
|
67
|
-
return
|
|
68
|
-
} else {
|
|
69
|
-
this.recordLicencesChange.emit([{ text: licenceValue }])
|
|
70
|
-
}
|
|
58
|
+
this.recordConstraintsChange.emit([{ text: licenceValue }])
|
|
71
59
|
}
|
|
72
60
|
}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
<gn-ui-online-service-resource-input
|
|
22
22
|
[service]="newService"
|
|
23
23
|
[disabled]="disabled$ | async"
|
|
24
|
+
(urlChange)="handleServiceUrlChange($event)"
|
|
24
25
|
(identifierSubmit)="handleIdentifierSubmit($event)"
|
|
25
26
|
></gn-ui-online-service-resource-input>
|
|
26
27
|
</div>
|
|
@@ -54,22 +55,19 @@
|
|
|
54
55
|
[(value)]="onlineResource.description"
|
|
55
56
|
></gn-ui-text-area>
|
|
56
57
|
</div>
|
|
57
|
-
<ng-container *ngIf="onlineResource.type === 'service'
|
|
58
|
+
<ng-container *ngIf="onlineResource.type === 'service'">
|
|
58
59
|
<span class="w-full border-b border-gray-300"></span>
|
|
59
60
|
<gn-ui-online-service-resource-input
|
|
60
61
|
[service]="onlineResource"
|
|
61
|
-
[modifyMode]="true"
|
|
62
62
|
></gn-ui-online-service-resource-input>
|
|
63
63
|
</ng-container>
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
></gn-ui-url-input>
|
|
72
|
-
</ng-template>
|
|
64
|
+
<span class="w-full border-b border-gray-300"></span>
|
|
65
|
+
<gn-ui-url-input
|
|
66
|
+
class="w-full"
|
|
67
|
+
[disabled]="true"
|
|
68
|
+
[value]="onlineResource.url"
|
|
69
|
+
[showValidateButton]="false"
|
|
70
|
+
></gn-ui-url-input>
|
|
73
71
|
</div>
|
|
74
72
|
</ng-template>
|
|
75
73
|
</div>
|