geonetwork-ui 2.4.1-dev.7a0dc5e3f → 2.4.1-dev.89bb09dfa
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.converter.mjs +4 -3
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +5 -2
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/update-frequency.mapper.mjs +6 -62
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +19 -1
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +27 -16
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +27 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +7 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +3 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +18 -14
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +15 -5
- package/esm2022/libs/feature/editor/src/lib/+state/editor.reducer.mjs +10 -4
- package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +6 -5
- package/esm2022/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/import-record/import-record.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +95 -12
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +36 -23
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +7 -12
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.mjs +17 -12
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +7 -13
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +36 -60
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +11 -15
- package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +9 -5
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +3 -4
- package/esm2022/libs/ui/dataviz/src/lib/figure/figure.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/index.mjs +3 -2
- package/esm2022/libs/ui/elements/src/lib/image-input/image-input.component.mjs +213 -0
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +19 -13
- package/esm2022/libs/ui/inputs/src/index.mjs +5 -6
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +5 -5
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +19 -25
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +6 -6
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +9 -4
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +10 -10
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +40 -1
- package/esm2022/translations/de.json +52 -17
- package/esm2022/translations/en.json +32 -16
- package/esm2022/translations/es.json +50 -15
- package/esm2022/translations/fr.json +36 -20
- package/esm2022/translations/it.json +265 -228
- package/esm2022/translations/nl.json +50 -15
- package/esm2022/translations/pt.json +50 -15
- package/fesm2022/geonetwork-ui.mjs +1774 -1420
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/update-frequency.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +4 -3
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +2 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +4 -3
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts +3 -0
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts +10 -2
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts +6 -2
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +5 -2
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts +2 -1
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts +2 -1
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts +24 -4
- 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-link-resources/form-field-online-link-resources.component.d.ts +1 -4
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.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 +6 -5
- 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/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +1 -4
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +0 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +2 -1
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/image-input/image-input.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +4 -5
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +6 -7
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts +2 -2
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +2 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -3
- 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/api/metadata-converter/src/lib/gn4/gn4.converter.ts +4 -3
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +8 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/update-frequency.mapper.ts +9 -62
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +18 -0
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +53 -27
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +29 -7
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +5 -4
- package/src/libs/common/fixtures/src/lib/elasticsearch/full-response.fixtures.ts +2 -2
- package/src/libs/common/fixtures/src/lib/elasticsearch/search-responses.fixtures.ts +16 -16
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +163 -0
- package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +24 -4
- package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +10 -1
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +57 -31
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +15 -9
- package/src/libs/feature/editor/src/lib/+state/editor.reducer.ts +18 -12
- package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +13 -8
- package/src/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +62 -6
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +108 -4
- 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 +31 -19
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +1 -10
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.ts +1 -7
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.html +12 -25
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts +15 -10
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +0 -9
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +3 -9
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +6 -6
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +46 -74
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +3 -3
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +3 -6
- package/src/libs/feature/editor/src/lib/fields.config.ts +10 -14
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +18 -16
- 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 -3
- package/src/libs/ui/dataviz/src/lib/figure/figure.component.html +1 -0
- package/src/libs/ui/elements/src/index.ts +2 -1
- package/src/libs/ui/{inputs → elements}/src/lib/image-input/image-input.component.html +4 -19
- package/src/libs/ui/{inputs → elements}/src/lib/image-input/image-input.component.ts +13 -9
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +13 -10
- package/src/libs/ui/inputs/src/index.ts +4 -5
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.ts +1 -1
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +22 -25
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +5 -3
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +1 -1
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +12 -1
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +4 -6
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +23 -6
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +6 -6
- package/src/libs/util/shared/src/lib/links/link-utils.ts +51 -1
- package/tailwind.base.config.js +2 -0
- package/translations/de.json +52 -17
- package/translations/en.json +32 -16
- package/translations/es.json +50 -15
- package/translations/fr.json +36 -20
- package/translations/it.json +265 -228
- package/translations/nl.json +50 -15
- package/translations/pt.json +50 -15
- package/translations/sk.json +50 -15
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +0 -214
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +0 -1
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/update-frequency.mapper.ts +0 -67
- /package/libs/ui/{inputs → elements}/src/lib/image-input/image-input.component.d.ts +0 -0
- /package/src/libs/ui/{inputs → elements}/src/lib/image-input/image-input.component.css +0 -0
|
@@ -38,9 +38,6 @@ export class ResultsTableContainerComponent implements OnDestroy {
|
|
|
38
38
|
hasDraft = (record: CatalogRecord): boolean =>
|
|
39
39
|
this.recordsRepository.recordHasDraft(record.uniqueIdentifier)
|
|
40
40
|
|
|
41
|
-
isUnsavedDraft = (record: CatalogRecord): boolean =>
|
|
42
|
-
this.recordsRepository.isRecordNotYetSaved(record.uniqueIdentifier)
|
|
43
|
-
|
|
44
41
|
constructor(
|
|
45
42
|
protected searchFacade: SearchFacade,
|
|
46
43
|
private searchService: SearchService,
|
|
@@ -5,6 +5,7 @@ export * from './lib/content-ghost/content-ghost.component'
|
|
|
5
5
|
export * from './lib/download-item/download-item.component'
|
|
6
6
|
export * from './lib/downloads-list/downloads-list.component'
|
|
7
7
|
export * from './lib/error/error.component'
|
|
8
|
+
export * from './lib/image-input/image-input.component'
|
|
8
9
|
export * from './lib/image-overlay-preview/image-overlay-preview.component'
|
|
9
10
|
export * from './lib/link-card/link-card.component'
|
|
10
11
|
export * from './lib/markdown-editor/markdown-editor.component'
|
|
@@ -19,5 +20,5 @@ export * from './lib/record-api-form/record-api-form.component'
|
|
|
19
20
|
export * from './lib/related-record-card/related-record-card.component'
|
|
20
21
|
export * from './lib/thumbnail/thumbnail.component'
|
|
21
22
|
export * from './lib/ui-elements.module'
|
|
22
|
-
export * from './lib/user-preview/user-preview.component'
|
|
23
23
|
export * from './lib/user-feedback-item/user-feedback-item.component'
|
|
24
|
+
export * from './lib/user-preview/user-preview.component'
|
|
@@ -2,31 +2,16 @@
|
|
|
2
2
|
</ng-container>
|
|
3
3
|
|
|
4
4
|
<ng-template #withImage>
|
|
5
|
-
<div class="w-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
class="w-full object-cover border-2 border-gray-300 rounded-lg h-[172px]"
|
|
9
|
-
[alt]="altText"
|
|
10
|
-
loading="lazy"
|
|
11
|
-
[src]="previewUrl"
|
|
12
|
-
/>
|
|
13
|
-
<gn-ui-button
|
|
14
|
-
type="outline"
|
|
15
|
-
style="--gn-ui-button-height: 40px; --gn-ui-button-width: 40px"
|
|
16
|
-
extraClass="absolute right-2 bottom-2 invisible group-hover:visible bg-background"
|
|
17
|
-
(buttonClick)="handleDelete()"
|
|
18
|
-
[disabled]="disabled"
|
|
19
|
-
>
|
|
20
|
-
<ng-icon name="iconoirBin"></ng-icon>
|
|
21
|
-
</gn-ui-button>
|
|
22
|
-
</div>
|
|
5
|
+
<div class="w-80 h-full flex flex-col gap-2">
|
|
6
|
+
<gn-ui-image-overlay-preview class="h-48" [imageUrl]="previewUrl">
|
|
7
|
+
</gn-ui-image-overlay-preview>
|
|
23
8
|
<gn-ui-text-input
|
|
24
9
|
*ngIf="showAltTextInput"
|
|
25
10
|
[placeholder]="'input.image.altTextPlaceholder' | translate"
|
|
26
11
|
[value]="altText ?? ''"
|
|
27
12
|
(valueChange)="handleAltTextChange($event)"
|
|
28
13
|
extraClass="gn-ui-editor-textarea"
|
|
29
|
-
[disabled]="
|
|
14
|
+
[disabled]="true"
|
|
30
15
|
></gn-ui-text-input>
|
|
31
16
|
<div class="flex flex-row gap-2 mt-2">
|
|
32
17
|
<gn-ui-button type="gray" (buttonClick)="handleDelete()">
|
|
@@ -9,27 +9,30 @@ import {
|
|
|
9
9
|
Output,
|
|
10
10
|
} from '@angular/core'
|
|
11
11
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'
|
|
12
|
-
import { downgradeImage, megabytesToBytes } from '../../../../../../libs/util/shared/src'
|
|
13
|
-
import { firstValueFrom } from 'rxjs'
|
|
14
|
-
import { ButtonComponent } from '../button/button.component'
|
|
15
|
-
import { FilesDropDirective } from '../files-drop/files-drop.directive'
|
|
16
|
-
import { TranslateModule } from '@ngx-translate/core'
|
|
17
12
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
18
|
-
import {
|
|
19
|
-
|
|
13
|
+
import {
|
|
14
|
+
ButtonComponent,
|
|
15
|
+
FilesDropDirective,
|
|
16
|
+
TextInputComponent,
|
|
17
|
+
UrlInputComponent,
|
|
18
|
+
} from '../../../../../../libs/ui/inputs/src'
|
|
19
|
+
import { downgradeImage, megabytesToBytes } from '../../../../../../libs/util/shared/src'
|
|
20
20
|
import {
|
|
21
21
|
NgIconComponent,
|
|
22
22
|
provideIcons,
|
|
23
23
|
provideNgIconsConfig,
|
|
24
24
|
} from '@ng-icons/core'
|
|
25
25
|
import {
|
|
26
|
+
iconoirBin,
|
|
26
27
|
iconoirFramePlusIn,
|
|
28
|
+
iconoirLink,
|
|
27
29
|
iconoirMediaImage,
|
|
28
30
|
iconoirMediaImageXmark,
|
|
29
|
-
iconoirBin,
|
|
30
31
|
iconoirPlus,
|
|
31
|
-
iconoirLink,
|
|
32
32
|
} from '@ng-icons/iconoir'
|
|
33
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
34
|
+
import { firstValueFrom } from 'rxjs'
|
|
35
|
+
import { ImageOverlayPreviewComponent } from '../image-overlay-preview/image-overlay-preview.component'
|
|
33
36
|
|
|
34
37
|
@Component({
|
|
35
38
|
selector: 'gn-ui-image-input',
|
|
@@ -46,6 +49,7 @@ import {
|
|
|
46
49
|
UrlInputComponent,
|
|
47
50
|
TextInputComponent,
|
|
48
51
|
NgIconComponent,
|
|
52
|
+
ImageOverlayPreviewComponent,
|
|
49
53
|
],
|
|
50
54
|
providers: [
|
|
51
55
|
provideIcons({
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core'
|
|
2
1
|
import { CommonModule, NgOptimizedImage } from '@angular/common'
|
|
3
|
-
import {
|
|
2
|
+
import { NgModule } from '@angular/core'
|
|
3
|
+
import { FormsModule } from '@angular/forms'
|
|
4
4
|
import { MatTooltipModule } from '@angular/material/tooltip'
|
|
5
|
-
import {
|
|
6
|
-
import { PopoverComponent, UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
7
|
-
import { MaxLinesComponent, UiLayoutModule } from '../../../../../libs/ui/layout/src'
|
|
8
|
-
import { TranslateModule } from '@ngx-translate/core'
|
|
9
|
-
import { ThumbnailComponent } from './thumbnail/thumbnail.component'
|
|
5
|
+
import { RouterModule } from '@angular/router'
|
|
10
6
|
import {
|
|
11
7
|
BadgeComponent,
|
|
12
8
|
TextInputComponent,
|
|
13
9
|
UiInputsModule,
|
|
14
10
|
} from '../../../../../libs/ui/inputs/src'
|
|
15
|
-
import {
|
|
11
|
+
import { MaxLinesComponent, UiLayoutModule } from '../../../../../libs/ui/layout/src'
|
|
12
|
+
import { PopoverComponent, UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
13
|
+
import { UtilSharedModule } from '../../../../../libs/util/shared/src'
|
|
14
|
+
import { provideNgIconsConfig } from '@ng-icons/core'
|
|
15
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
16
16
|
import { AvatarComponent } from './avatar/avatar.component'
|
|
17
|
-
import {
|
|
17
|
+
import { ImageInputComponent } from './image-input/image-input.component'
|
|
18
18
|
import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
|
|
19
|
+
import { ThumbnailComponent } from './thumbnail/thumbnail.component'
|
|
19
20
|
import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
|
|
20
|
-
import {
|
|
21
|
+
import { UserPreviewComponent } from './user-preview/user-preview.component'
|
|
21
22
|
|
|
22
23
|
@NgModule({
|
|
23
24
|
imports: [
|
|
@@ -38,6 +39,7 @@ import { provideNgIconsConfig } from '@ng-icons/core'
|
|
|
38
39
|
BadgeComponent,
|
|
39
40
|
MaxLinesComponent,
|
|
40
41
|
TextInputComponent,
|
|
42
|
+
ImageInputComponent,
|
|
41
43
|
],
|
|
42
44
|
providers: [
|
|
43
45
|
provideNgIconsConfig({
|
|
@@ -50,6 +52,7 @@ import { provideNgIconsConfig } from '@ng-icons/core'
|
|
|
50
52
|
AvatarComponent,
|
|
51
53
|
UserPreviewComponent,
|
|
52
54
|
MarkdownParserComponent,
|
|
55
|
+
ImageInputComponent,
|
|
53
56
|
],
|
|
54
57
|
})
|
|
55
58
|
export class UiElementsModule {}
|
|
@@ -6,23 +6,22 @@ export * from './lib/checkbox/checkbox.component'
|
|
|
6
6
|
export * from './lib/chips-input/chips-input.component'
|
|
7
7
|
export * from './lib/copy-text-button/copy-text-button.component'
|
|
8
8
|
export * from './lib/date-picker/date-picker.component'
|
|
9
|
-
export * from './lib/date-range-picker/date-range-picker.component'
|
|
10
9
|
export * from './lib/date-range-dropdown/date-range-dropdown.component'
|
|
10
|
+
export * from './lib/date-range-picker/date-range-picker.component'
|
|
11
11
|
export * from './lib/drag-and-drop-file-input/drag-and-drop-file-input.component'
|
|
12
12
|
export * from './lib/dropdown-multiselect/dropdown-multiselect.component'
|
|
13
13
|
export * from './lib/dropdown-multiselect/dropdown-multiselect.model'
|
|
14
14
|
export * from './lib/dropdown-selector/dropdown-selector.component'
|
|
15
15
|
export * from './lib/dropdown-selector/dropdown-selector.model'
|
|
16
16
|
export * from './lib/editable-label/editable-label.directive'
|
|
17
|
+
export * from './lib/file-input/file-input.component'
|
|
18
|
+
export * from './lib/files-drop/files-drop.directive'
|
|
17
19
|
export * from './lib/navigation-button/navigation-button.component'
|
|
18
20
|
export * from './lib/search-input/search-input.component'
|
|
19
21
|
export * from './lib/star-toggle/star-toggle.component'
|
|
22
|
+
export * from './lib/switch-toggle/switch-toggle.component'
|
|
20
23
|
export * from './lib/text-area/text-area.component'
|
|
21
24
|
export * from './lib/text-input/text-input.component'
|
|
22
25
|
export * from './lib/ui-inputs.module'
|
|
23
26
|
export * from './lib/url-input/url-input.component'
|
|
24
27
|
export * from './lib/viewport-intersector/viewport-intersector.component'
|
|
25
|
-
export * from './lib/switch-toggle/switch-toggle.component'
|
|
26
|
-
export * from './lib/file-input/file-input.component'
|
|
27
|
-
export * from './lib/image-input/image-input.component'
|
|
28
|
-
export * from './lib/url-input/url-input.component'
|
|
@@ -62,9 +62,10 @@ export class ButtonComponent {
|
|
|
62
62
|
return `${this.btnClass} ${this.extraClass}`
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
handleClick(event:
|
|
65
|
+
handleClick(event: MouseEvent) {
|
|
66
66
|
this.buttonClick.emit()
|
|
67
67
|
event.preventDefault()
|
|
68
|
+
;(event.currentTarget as HTMLElement).blur()
|
|
68
69
|
propagateToDocumentOnly(event)
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -48,10 +48,10 @@ import { iconoirCloudUpload, iconoirFramePlusIn } from '@ng-icons/iconoir'
|
|
|
48
48
|
export class FileInputComponent {
|
|
49
49
|
@Input() maxSizeMB: number
|
|
50
50
|
@Input() uploadProgress?: number
|
|
51
|
-
@Input() disabled? = false
|
|
52
51
|
@Output() fileChange: EventEmitter<File> = new EventEmitter()
|
|
53
52
|
@Output() urlChange: EventEmitter<string> = new EventEmitter()
|
|
54
53
|
@Output() uploadCancel: EventEmitter<void> = new EventEmitter()
|
|
54
|
+
@Input() disabled? = false
|
|
55
55
|
|
|
56
56
|
dragFilesOver = false
|
|
57
57
|
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
+
import { OverlayModule } from '@angular/cdk/overlay'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
1
3
|
import { NgModule } from '@angular/core'
|
|
2
4
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
|
3
|
-
import { UtilSharedModule } from '../../../../../libs/util/shared/src'
|
|
4
|
-
import { TranslateModule } from '@ngx-translate/core'
|
|
5
|
-
import { TagInputModule } from 'ngx-chips'
|
|
6
|
-
import { NgxDropzoneModule } from 'ngx-dropzone'
|
|
7
|
-
import { ButtonComponent } from './button/button.component'
|
|
8
|
-
import { BadgeComponent } from './badge/badge.component'
|
|
9
|
-
import { ChipsInputComponent } from './chips-input/chips-input.component'
|
|
10
|
-
import { DragAndDropFileInputComponent } from './drag-and-drop-file-input/drag-and-drop-file-input.component'
|
|
11
|
-
import { DropdownSelectorComponent } from './dropdown-selector/dropdown-selector.component'
|
|
12
|
-
import { TextAreaComponent } from './text-area/text-area.component'
|
|
13
5
|
import { MatAutocompleteModule } from '@angular/material/autocomplete'
|
|
14
|
-
import { DropdownMultiselectComponent } from './dropdown-multiselect/dropdown-multiselect.component'
|
|
15
|
-
import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
16
|
-
import { OverlayModule } from '@angular/cdk/overlay'
|
|
17
6
|
import { MatCheckboxModule } from '@angular/material/checkbox'
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { MatTooltipModule } from '@angular/material/tooltip'
|
|
21
|
-
import { CommonModule } from '@angular/common'
|
|
22
|
-
import { CheckboxComponent } from './checkbox/checkbox.component'
|
|
23
|
-
import { DateRangePickerComponent } from './date-range-picker/date-range-picker.component'
|
|
7
|
+
import { MatNativeDateModule } from '@angular/material/core'
|
|
8
|
+
import { MatDatepickerModule } from '@angular/material/datepicker'
|
|
24
9
|
import { MatFormFieldModule } from '@angular/material/form-field'
|
|
25
10
|
import { MatInputModule } from '@angular/material/input'
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { ImageInputComponent } from './image-input/image-input.component'
|
|
11
|
+
import { MatTooltipModule } from '@angular/material/tooltip'
|
|
12
|
+
import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
13
|
+
import { UtilSharedModule } from '../../../../../libs/util/shared/src'
|
|
30
14
|
import {
|
|
31
15
|
NgIconComponent,
|
|
32
16
|
provideIcons,
|
|
@@ -37,6 +21,21 @@ import {
|
|
|
37
21
|
matExpandLess,
|
|
38
22
|
matExpandMore,
|
|
39
23
|
} from '@ng-icons/material-icons/baseline'
|
|
24
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
25
|
+
import { TagInputModule } from 'ngx-chips'
|
|
26
|
+
import { NgxDropzoneModule } from 'ngx-dropzone'
|
|
27
|
+
import { BadgeComponent } from './badge/badge.component'
|
|
28
|
+
import { ButtonComponent } from './button/button.component'
|
|
29
|
+
import { CheckToggleComponent } from './check-toggle/check-toggle.component'
|
|
30
|
+
import { CheckboxComponent } from './checkbox/checkbox.component'
|
|
31
|
+
import { ChipsInputComponent } from './chips-input/chips-input.component'
|
|
32
|
+
import { DateRangePickerComponent } from './date-range-picker/date-range-picker.component'
|
|
33
|
+
import { DragAndDropFileInputComponent } from './drag-and-drop-file-input/drag-and-drop-file-input.component'
|
|
34
|
+
import { DropdownMultiselectComponent } from './dropdown-multiselect/dropdown-multiselect.component'
|
|
35
|
+
import { DropdownSelectorComponent } from './dropdown-selector/dropdown-selector.component'
|
|
36
|
+
import { EditableLabelDirective } from './editable-label/editable-label.directive'
|
|
37
|
+
import { TextAreaComponent } from './text-area/text-area.component'
|
|
38
|
+
import { ViewportIntersectorComponent } from './viewport-intersector/viewport-intersector.component'
|
|
40
39
|
|
|
41
40
|
@NgModule({
|
|
42
41
|
declarations: [
|
|
@@ -66,7 +65,6 @@ import {
|
|
|
66
65
|
EditableLabelDirective,
|
|
67
66
|
TextAreaComponent,
|
|
68
67
|
ButtonComponent,
|
|
69
|
-
ImageInputComponent,
|
|
70
68
|
DropdownSelectorComponent,
|
|
71
69
|
DateRangePickerComponent,
|
|
72
70
|
CheckToggleComponent,
|
|
@@ -95,7 +93,6 @@ import {
|
|
|
95
93
|
CheckboxComponent,
|
|
96
94
|
DateRangePickerComponent,
|
|
97
95
|
EditableLabelDirective,
|
|
98
|
-
ImageInputComponent,
|
|
99
96
|
BadgeComponent,
|
|
100
97
|
],
|
|
101
98
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<span class="w-full inline-block relative">
|
|
2
2
|
<input
|
|
3
3
|
#input
|
|
4
|
-
class="gn-ui-text-input px-[var(--text-padding)]"
|
|
4
|
+
class="gn-ui-text-input gn-ui-url-input px-[var(--text-padding)]"
|
|
5
5
|
[ngClass]="extraClass"
|
|
6
6
|
type="url"
|
|
7
7
|
[value]="inputValue"
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
<ng-icon name="iconoirLink"></ng-icon>
|
|
22
22
|
</div>
|
|
23
23
|
<gn-ui-button
|
|
24
|
-
*ngIf="
|
|
24
|
+
*ngIf="showValidateButton"
|
|
25
25
|
extraClass="absolute inset-y-[var(--side-padding)] right-[var(--side-padding)]"
|
|
26
26
|
type="primary"
|
|
27
27
|
[disabled]="disabled || input.value === '' || !isValidUrl(input.value)"
|
|
28
28
|
(buttonClick)="handleUpload(input)"
|
|
29
29
|
>
|
|
30
|
-
<ng-
|
|
30
|
+
<ng-content>
|
|
31
|
+
<ng-icon name="iconoirArrowUp"></ng-icon>
|
|
32
|
+
</ng-content>
|
|
31
33
|
</gn-ui-button>
|
|
32
34
|
</span>
|
|
@@ -45,7 +45,7 @@ export class UrlInputComponent {
|
|
|
45
45
|
@Input() extraClass = ''
|
|
46
46
|
@Input() placeholder = 'https://'
|
|
47
47
|
@Input() disabled: boolean
|
|
48
|
-
@Input()
|
|
48
|
+
@Input() showValidateButton = true
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* This will emit null if the field is emptied
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
*ngFor="let item of items"
|
|
32
32
|
(click)="handleRowClick(item)"
|
|
33
33
|
data-cy="table-row"
|
|
34
|
+
[title]="
|
|
35
|
+
!item.extras?.edit && !isDraftPage
|
|
36
|
+
? ('editor.record.lock.reason' | translate)
|
|
37
|
+
: ''
|
|
38
|
+
"
|
|
34
39
|
>
|
|
35
40
|
<div
|
|
36
41
|
class="relative h-0"
|
|
@@ -44,7 +49,13 @@
|
|
|
44
49
|
</div>
|
|
45
50
|
<ng-container *ngFor="let column of columns">
|
|
46
51
|
<div
|
|
47
|
-
class="table-row-cell px-3 py-1.5 flex items-center bg-white transition-colors duration-75 truncate
|
|
52
|
+
class="table-row-cell px-3 py-1.5 flex items-center bg-white transition-colors duration-75 truncate border-b border-gray-200"
|
|
53
|
+
[ngClass]="{
|
|
54
|
+
'text-purple-light cursor-default':
|
|
55
|
+
!item.extras?.edit && !isDraftPage,
|
|
56
|
+
'group-hover:text-main group-hover:bg-gray-50':
|
|
57
|
+
item.extras?.edit || isDraftPage,
|
|
58
|
+
}"
|
|
48
59
|
>
|
|
49
60
|
<ng-container
|
|
50
61
|
*ngTemplateOutlet="column.cell; context: { $implicit: item }"
|
|
@@ -9,12 +9,9 @@ import {
|
|
|
9
9
|
} from '@angular/core'
|
|
10
10
|
import { InteractiveTableColumnComponent } from './interactive-table-column/interactive-table-column.component'
|
|
11
11
|
import { CommonModule } from '@angular/common'
|
|
12
|
-
import {
|
|
13
|
-
NgIconComponent,
|
|
14
|
-
provideIcons,
|
|
15
|
-
provideNgIconsConfig,
|
|
16
|
-
} from '@ng-icons/core'
|
|
12
|
+
import { NgIconComponent, provideIcons } from '@ng-icons/core'
|
|
17
13
|
import { iconoirNavArrowDown, iconoirNavArrowUp } from '@ng-icons/iconoir'
|
|
14
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
18
15
|
|
|
19
16
|
@Component({
|
|
20
17
|
selector: 'gn-ui-interactive-table',
|
|
@@ -22,7 +19,7 @@ import { iconoirNavArrowDown, iconoirNavArrowUp } from '@ng-icons/iconoir'
|
|
|
22
19
|
styleUrls: ['./interactive-table.component.css'],
|
|
23
20
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
21
|
standalone: true,
|
|
25
|
-
imports: [CommonModule,
|
|
22
|
+
imports: [CommonModule, NgIconComponent, TranslateModule],
|
|
26
23
|
providers: [provideIcons({ iconoirNavArrowDown, iconoirNavArrowUp })],
|
|
27
24
|
})
|
|
28
25
|
export class InteractiveTableComponent {
|
|
@@ -30,6 +27,7 @@ export class InteractiveTableComponent {
|
|
|
30
27
|
columns: QueryList<InteractiveTableColumnComponent>
|
|
31
28
|
|
|
32
29
|
@Input() items: unknown[] = []
|
|
30
|
+
@Input() isDraftPage = false
|
|
33
31
|
@Output() itemClick = new EventEmitter<unknown>()
|
|
34
32
|
|
|
35
33
|
get gridStyle() {
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
<gn-ui-interactive-table
|
|
2
2
|
[items]="records"
|
|
3
|
+
[isDraftPage]="isDraftPage"
|
|
3
4
|
(itemClick)="handleRecordClick($event)"
|
|
4
5
|
>
|
|
5
6
|
<!-- SELECTED COLUMN -->
|
|
6
7
|
<gn-ui-interactive-table-column [width]="'3rem'">
|
|
7
|
-
<ng-template #cell let-item>
|
|
8
|
+
<ng-template #cell let-item let-i="index">
|
|
9
|
+
<ng-icon
|
|
10
|
+
name="iconoirLock"
|
|
11
|
+
class="text-purple"
|
|
12
|
+
*ngIf="!item.extras?.edit && !isDraftPage"
|
|
13
|
+
></ng-icon>
|
|
8
14
|
<gn-ui-checkbox
|
|
15
|
+
*ngIf="item.extras?.edit || isDraftPage"
|
|
9
16
|
[checked]="isChecked(item)"
|
|
10
17
|
(changed)="handleRecordSelectedChange($event, item)"
|
|
11
18
|
class="-m-2"
|
|
@@ -102,9 +109,9 @@
|
|
|
102
109
|
<ng-template #cell let-item>
|
|
103
110
|
<span class="text-xs">
|
|
104
111
|
{{
|
|
105
|
-
(
|
|
106
|
-
? 'record.metadata.status.
|
|
107
|
-
: 'record.metadata.status.
|
|
112
|
+
(item.extras?.['isPublishedToAll']
|
|
113
|
+
? 'record.metadata.status.published'
|
|
114
|
+
: 'record.metadata.status.notPublished'
|
|
108
115
|
) | translate
|
|
109
116
|
}}</span
|
|
110
117
|
>
|
|
@@ -123,7 +130,11 @@
|
|
|
123
130
|
</ng-template>
|
|
124
131
|
<ng-template #cell let-item>
|
|
125
132
|
<div class="flex text-left w-full text-xs">
|
|
126
|
-
{{
|
|
133
|
+
{{
|
|
134
|
+
item.extras?.['isPublishedToAll']
|
|
135
|
+
? dateToString(item.recordUpdated)
|
|
136
|
+
: '-'
|
|
137
|
+
}}
|
|
127
138
|
</div>
|
|
128
139
|
</ng-template>
|
|
129
140
|
</gn-ui-interactive-table-column>
|
|
@@ -138,8 +149,14 @@
|
|
|
138
149
|
(buttonClick)="openActionMenu(item, template)"
|
|
139
150
|
type="light"
|
|
140
151
|
data-test="record-menu-button"
|
|
152
|
+
[disabled]="!item.extras?.edit && !isDraftPage"
|
|
141
153
|
>
|
|
142
|
-
<ng-icon
|
|
154
|
+
<ng-icon
|
|
155
|
+
[ngClass]="{
|
|
156
|
+
'text-purple-light': !item.extras?.edit && !isDraftPage,
|
|
157
|
+
}"
|
|
158
|
+
name="matMoreVert"
|
|
159
|
+
></ng-icon>
|
|
143
160
|
</gn-ui-button>
|
|
144
161
|
<ng-template #template>
|
|
145
162
|
<gn-ui-action-menu
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import { TranslateModule } from '@ngx-translate/core'
|
|
31
31
|
import { ActionMenuComponent } from './action-menu/action-menu.component'
|
|
32
32
|
import { NgIconComponent, provideIcons } from '@ng-icons/core'
|
|
33
|
-
import { iconoirUser } from '@ng-icons/iconoir'
|
|
33
|
+
import { iconoirUser, iconoirLock } from '@ng-icons/iconoir'
|
|
34
34
|
import {
|
|
35
35
|
CdkConnectedOverlay,
|
|
36
36
|
CdkOverlayOrigin,
|
|
@@ -55,9 +55,8 @@ import { matMoreVert } from '@ng-icons/material-icons/baseline'
|
|
|
55
55
|
ActionMenuComponent,
|
|
56
56
|
NgIconComponent,
|
|
57
57
|
CdkOverlayOrigin,
|
|
58
|
-
CdkConnectedOverlay,
|
|
59
58
|
],
|
|
60
|
-
providers: [provideIcons({ iconoirUser, matMoreVert })],
|
|
59
|
+
providers: [provideIcons({ iconoirUser, iconoirLock, matMoreVert })],
|
|
61
60
|
})
|
|
62
61
|
export class ResultsTableComponent {
|
|
63
62
|
@Input() records: CatalogRecord[] = []
|
|
@@ -65,8 +64,8 @@ export class ResultsTableComponent {
|
|
|
65
64
|
@Input() sortOrder: SortByField = null
|
|
66
65
|
@Input() hasDraft: (record: CatalogRecord) => boolean = () => false
|
|
67
66
|
@Input() canDuplicate: (record: CatalogRecord) => boolean = () => true
|
|
68
|
-
@Input() isUnsavedDraft: (record: CatalogRecord) => boolean = () => true
|
|
69
67
|
@Input() canDelete: (record: CatalogRecord) => boolean = () => true
|
|
68
|
+
@Input() isDraftPage = false
|
|
70
69
|
|
|
71
70
|
// emits the column (field) as well as the order
|
|
72
71
|
@Output() sortByChange = new EventEmitter<[string, 'asc' | 'desc']>()
|
|
@@ -170,8 +169,9 @@ export class ResultsTableComponent {
|
|
|
170
169
|
return getBadgeColor(format)
|
|
171
170
|
}
|
|
172
171
|
|
|
173
|
-
handleRecordClick(item:
|
|
174
|
-
|
|
172
|
+
handleRecordClick(item: CatalogRecord) {
|
|
173
|
+
if (item?.extras?.edit || this.isDraftPage)
|
|
174
|
+
this.recordClick.emit(item as CatalogRecord)
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
handleDuplicate(item: unknown) {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
DatasetOnlineResource,
|
|
4
|
+
ServiceProtocol,
|
|
5
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
6
|
+
import {
|
|
7
|
+
OgcApiEndpoint,
|
|
8
|
+
WfsEndpoint,
|
|
9
|
+
WmsEndpoint,
|
|
10
|
+
WmtsEndpoint,
|
|
11
|
+
} from '@camptocamp/ogc-client'
|
|
3
12
|
|
|
4
13
|
marker('downloads.wfs.featuretype.not.found')
|
|
5
14
|
|
|
@@ -242,6 +251,47 @@ export function getLinkLabel(link: DatasetOnlineResource): string {
|
|
|
242
251
|
return format ? `${label} (${format})` : label
|
|
243
252
|
}
|
|
244
253
|
|
|
254
|
+
export async function getLayers(url: string, serviceProtocol: ServiceProtocol) {
|
|
255
|
+
switch (serviceProtocol) {
|
|
256
|
+
case 'ogcFeatures': {
|
|
257
|
+
const layers = await new OgcApiEndpoint(url).allCollections
|
|
258
|
+
return layers
|
|
259
|
+
}
|
|
260
|
+
case 'wfs': {
|
|
261
|
+
const endpointWfs = new WfsEndpoint(url)
|
|
262
|
+
await endpointWfs.isReady()
|
|
263
|
+
return endpointWfs.getFeatureTypes()
|
|
264
|
+
}
|
|
265
|
+
case 'wms': {
|
|
266
|
+
const endpointWms = new WmsEndpoint(url)
|
|
267
|
+
await endpointWms.isReady()
|
|
268
|
+
return endpointWms
|
|
269
|
+
.getLayers()
|
|
270
|
+
.flatMap(wmsLayerFlatten)
|
|
271
|
+
.filter((l) => l.name)
|
|
272
|
+
}
|
|
273
|
+
case 'wmts': {
|
|
274
|
+
const endpointWmts = new WmtsEndpoint(url)
|
|
275
|
+
await endpointWmts.isReady()
|
|
276
|
+
return endpointWmts.getLayers()
|
|
277
|
+
}
|
|
278
|
+
default:
|
|
279
|
+
return undefined
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function wmsLayerFlatten(layerFull) {
|
|
284
|
+
const layer = {
|
|
285
|
+
title: layerFull.title,
|
|
286
|
+
name: layerFull.name,
|
|
287
|
+
abstract: layerFull.abstract,
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return 'children' in layerFull && Array.isArray(layerFull.children)
|
|
291
|
+
? [layer, ...layerFull.children.flatMap(wmsLayerFlatten)]
|
|
292
|
+
: [layer]
|
|
293
|
+
}
|
|
294
|
+
|
|
245
295
|
export function getMimeTypeForFormat(format: FileFormat): string | null {
|
|
246
296
|
return format in FORMATS ? FORMATS[format.toLowerCase()].mimeTypes[0] : null
|
|
247
297
|
}
|
package/tailwind.base.config.js
CHANGED
|
@@ -44,6 +44,8 @@ module.exports = {
|
|
|
44
44
|
800: '#8a2c0d',
|
|
45
45
|
900: '#73230d',
|
|
46
46
|
},
|
|
47
|
+
purple: '#9747FF',
|
|
48
|
+
'purple-light': '#DDC3FF',
|
|
47
49
|
},
|
|
48
50
|
fontFamily: {
|
|
49
51
|
sans: 'var(--font-family-main, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji")',
|