geonetwork-ui 2.1.0 → 2.2.0-dev.0c467200
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/atomic-operations.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +36 -2
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +2 -1
- package/esm2022/libs/api/repository/src/index.mjs +2 -1
- package/esm2022/libs/api/repository/src/lib/gn4/index.mjs +3 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/feature/auth/src/lib/feature-auth.module.mjs +2 -2
- package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +2 -2
- package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +4 -15
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +5 -4
- package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +5 -3
- package/esm2022/libs/feature/map/src/index.mjs +2 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +106 -0
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +64 -0
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +63 -0
- package/esm2022/libs/feature/map/src/lib/constant/index.mjs +2 -1
- package/esm2022/libs/feature/map/src/lib/constant/projections.mjs +2 -0
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +26 -3
- package/esm2022/libs/feature/map/src/lib/geocoding/geocoding.component.mjs +93 -0
- package/esm2022/libs/feature/map/src/lib/geocoding.service.mjs +40 -0
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +6 -3
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +3 -1
- package/esm2022/libs/feature/map/src/lib/utils/index.mjs +1 -3
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +60 -29
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +29 -20
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +9 -6
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +2 -2
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/state/effects.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +2 -2
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/index.mjs +4 -1
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +27 -0
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +17 -0
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +10 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +12 -6
- package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +7 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +15 -3
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +19 -40
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +6 -3
- package/esm2022/libs/ui/inputs/src/lib/editable-label/editable-label.directive.mjs +45 -0
- package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +2 -2
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -3
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +2 -2
- package/esm2022/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-table/record-table.component.mjs +3 -3
- package/esm2022/libs/util/app-config/src/lib/app-config.mjs +5 -1
- package/esm2022/libs/util/app-config/src/lib/model.mjs +1 -1
- package/esm2022/libs/util/i18n/src/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +29 -13
- package/esm2022/libs/util/shared/src/lib/services/theme.service.mjs +8 -1
- package/esm2022/libs/util/shared/src/lib/utils/fuzzy-filter.mjs +27 -0
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/translations/de.json +102 -84
- package/esm2022/translations/en.json +40 -22
- package/esm2022/translations/es.json +18 -0
- package/esm2022/translations/fr.json +26 -8
- package/esm2022/translations/it.json +27 -6
- package/esm2022/translations/nl.json +18 -0
- package/esm2022/translations/pt.json +18 -0
- package/fesm2022/geonetwork-ui.mjs +963 -332
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.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/gn4.metadata.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/index.d.ts +1 -0
- package/libs/api/repository/src/index.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/index.d.ts +2 -0
- package/libs/api/repository/src/lib/gn4/index.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +10 -5
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/organisations/organisations.component.d.ts +0 -1
- package/libs/feature/catalog/src/lib/organisations/organisations.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -2
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +15 -2
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +1 -1
- package/libs/feature/map/src/index.d.ts +1 -0
- package/libs/feature/map/src/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts +22 -0
- package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts +22 -0
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts +22 -0
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/constant/index.d.ts +1 -0
- package/libs/feature/map/src/lib/constant/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/constant/projections.d.ts.map +1 -0
- package/libs/feature/map/src/lib/feature-map.module.d.ts +16 -12
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts +25 -0
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/geocoding.service.d.ts +18 -0
- package/libs/feature/map/src/lib/geocoding.service.d.ts.map +1 -0
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts +1 -0
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/index.d.ts +0 -2
- package/libs/feature/map/src/lib/utils/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts +13 -11
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +1 -3
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts +3 -2
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/effects.d.ts +1 -1
- package/libs/feature/search/src/lib/state/effects.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.d.ts +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +3 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.d.ts +10 -0
- package/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts +8 -0
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +3 -2
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +13 -11
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +2 -4
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/editable-label/editable-label.directive.d.ts +13 -0
- package/libs/ui/inputs/src/lib/editable-label/editable-label.directive.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +18 -17
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/app-config.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/model.d.ts +2 -0
- package/libs/util/app-config/src/lib/model.d.ts.map +1 -1
- package/libs/util/i18n/src/index.d.ts +1 -0
- package/libs/util/i18n/src/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +19 -7
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/services/theme.service.d.ts +1 -0
- package/libs/util/shared/src/lib/services/theme.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/fuzzy-filter.d.ts +9 -0
- package/libs/util/shared/src/lib/utils/fuzzy-filter.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/package.json +11 -6
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +43 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +1 -0
- package/src/libs/api/repository/src/index.ts +1 -0
- package/src/libs/api/repository/src/lib/gn4/index.ts +2 -0
- package/src/libs/common/domain/src/lib/index.ts +2 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +12 -7
- package/src/libs/feature/auth/src/lib/feature-auth.module.ts +1 -1
- package/src/libs/feature/catalog/src/lib/feature-catalog.module.ts +1 -1
- package/src/libs/feature/catalog/src/lib/organisations/organisations.component.ts +3 -17
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +8 -5
- package/src/libs/feature/editor/src/lib/record-form/record-form.component.ts +2 -1
- package/src/libs/feature/map/src/index.ts +1 -0
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +21 -0
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.ts +107 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.html +37 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.ts +64 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.html +55 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.ts +63 -0
- package/src/libs/feature/map/src/lib/constant/index.ts +1 -0
- package/src/libs/feature/map/src/lib/feature-map.module.ts +14 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.css +0 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.html +39 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +99 -0
- package/src/libs/feature/map/src/lib/geocoding.service.ts +59 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +9 -3
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +6 -0
- package/src/libs/feature/map/src/lib/utils/index.ts +0 -2
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +85 -50
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +18 -3
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +12 -4
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +2 -4
- package/src/libs/feature/search/src/lib/feature-search.module.ts +1 -1
- package/src/libs/feature/search/src/lib/state/effects.ts +1 -1
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +1 -1
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -0
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts +1 -1
- package/src/libs/ui/elements/src/index.ts +3 -0
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +4 -1
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.css +0 -0
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +30 -0
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.ts +15 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +264 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.html +1 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +16 -0
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +93 -27
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.ts +7 -0
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +4 -0
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +59 -32
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +5 -0
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +1 -1
- package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +4 -0
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +7 -0
- package/src/libs/ui/inputs/src/lib/button/button.component.css +1 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +22 -42
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +7 -4
- package/src/libs/ui/inputs/src/lib/editable-label/editable-label.directive.ts +47 -0
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +8 -3
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.css +1 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -0
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +1 -1
- package/src/libs/ui/search/src/lib/record-table/record-table.component.html +2 -2
- package/src/libs/util/app-config/src/lib/app-config.ts +4 -0
- package/src/libs/util/app-config/src/lib/model.ts +2 -0
- package/src/libs/util/i18n/src/index.ts +1 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +34 -11
- package/src/libs/util/shared/src/lib/services/theme.service.ts +9 -0
- package/src/libs/util/shared/src/lib/utils/fuzzy-filter.ts +32 -0
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/tailwind.base.css +31 -1
- package/translations/de.json +102 -84
- package/translations/en.json +40 -22
- package/translations/es.json +18 -0
- package/translations/fr.json +26 -8
- package/translations/it.json +27 -6
- package/translations/nl.json +18 -0
- package/translations/pt.json +18 -0
- package/translations/sk.json +18 -0
- package/esm2022/libs/feature/map/src/lib/utils/map-utils-wms.service.mjs +0 -55
- package/esm2022/libs/feature/map/src/lib/utils/projections.mjs +0 -2
- package/libs/feature/map/src/lib/utils/map-utils-wms.service.d.ts +0 -17
- package/libs/feature/map/src/lib/utils/map-utils-wms.service.d.ts.map +0 -1
- package/libs/feature/map/src/lib/utils/projections.d.ts.map +0 -1
- package/src/libs/feature/map/src/lib/utils/map-utils-wms.service.ts +0 -58
- /package/libs/feature/map/src/lib/{utils → constant}/projections.d.ts +0 -0
- /package/src/libs/feature/map/src/lib/{utils → constant}/projections.ts +0 -0
|
@@ -14,57 +14,37 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
|
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
15
|
})
|
|
16
16
|
export class ButtonComponent {
|
|
17
|
-
|
|
18
|
-
'default'
|
|
19
|
-
@Input() disabled = false
|
|
20
|
-
@Input() extraClass = ''
|
|
21
|
-
@Output() buttonClick = new EventEmitter<void>()
|
|
22
|
-
|
|
23
|
-
get classList() {
|
|
24
|
-
return `${this.color} ${this.textColor} ${this.borderColor} ${this.extraClass}`
|
|
25
|
-
}
|
|
17
|
+
private btnClass: string
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
// btn-classes are explicited to allow tailwind recognize them and add it in css.
|
|
20
|
+
@Input() set type(
|
|
21
|
+
value: 'primary' | 'secondary' | 'default' | 'outline' | 'light'
|
|
22
|
+
) {
|
|
23
|
+
switch (value) {
|
|
31
24
|
case 'primary':
|
|
32
|
-
|
|
25
|
+
this.btnClass = 'btn-primary'
|
|
26
|
+
break
|
|
33
27
|
case 'secondary':
|
|
34
|
-
|
|
28
|
+
this.btnClass = 'btn-secondary'
|
|
29
|
+
break
|
|
35
30
|
case 'outline':
|
|
36
|
-
|
|
31
|
+
this.btnClass = 'btn-outline'
|
|
32
|
+
break
|
|
37
33
|
case 'light':
|
|
38
|
-
|
|
34
|
+
this.btnClass = 'btn-light'
|
|
35
|
+
break
|
|
36
|
+
default:
|
|
37
|
+
this.btnClass = 'btn-default'
|
|
38
|
+
break
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
case 'secondary':
|
|
46
|
-
case 'primary':
|
|
47
|
-
return 'text-white'
|
|
48
|
-
case 'outline':
|
|
49
|
-
return 'text-main hover:text-primary-darker focus:text-primary-darker active:text-primary-black'
|
|
50
|
-
case 'light':
|
|
51
|
-
return 'text-main'
|
|
52
|
-
}
|
|
53
|
-
}
|
|
42
|
+
@Input() disabled = false
|
|
43
|
+
@Input() extraClass = ''
|
|
44
|
+
@Output() buttonClick = new EventEmitter<void>()
|
|
54
45
|
|
|
55
|
-
get
|
|
56
|
-
|
|
57
|
-
case 'default':
|
|
58
|
-
return 'border border-gray-700 focus:ring-4 focus:ring-gray-200'
|
|
59
|
-
case 'secondary':
|
|
60
|
-
return 'border border-secondary focus:ring-4 focus:ring-secondary-lightest'
|
|
61
|
-
case 'primary':
|
|
62
|
-
return 'border border-primary focus:ring-4 focus:ring-primary-lightest'
|
|
63
|
-
case 'outline':
|
|
64
|
-
return 'border border-gray-300 hover:border-primary-lighter focus:border-primary-lighter focus:ring-4 focus:ring-primary-lightest active:border-primary-darker'
|
|
65
|
-
case 'light':
|
|
66
|
-
return 'border border-white focus:ring-4 focus:ring-gray-300'
|
|
67
|
-
}
|
|
46
|
+
get classList() {
|
|
47
|
+
return `${this.btnClass} ${this.extraClass}`
|
|
68
48
|
}
|
|
69
49
|
|
|
70
50
|
handleClick(event: Event) {
|
|
@@ -17,7 +17,10 @@ import {
|
|
|
17
17
|
} from '@angular/cdk/overlay'
|
|
18
18
|
import { take } from 'rxjs/operators'
|
|
19
19
|
import { Choice } from './dropdown-multiselect.model'
|
|
20
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
createFuzzyFilter,
|
|
22
|
+
propagateToDocumentOnly,
|
|
23
|
+
} from '../../../../../../libs/util/shared/src'
|
|
21
24
|
|
|
22
25
|
@Component({
|
|
23
26
|
selector: 'gn-ui-dropdown-multiselect',
|
|
@@ -74,9 +77,9 @@ export class DropdownMultiselectComponent {
|
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
get filteredChoicesByText() {
|
|
77
|
-
return this.choices
|
|
78
|
-
|
|
79
|
-
)
|
|
80
|
+
if (!this.searchInputValue) return this.choices
|
|
81
|
+
const filter = createFuzzyFilter(this.searchInputValue)
|
|
82
|
+
return this.choices.filter((choice) => filter(choice.label))
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
get focusedIndex(): number | -1 {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Directive,
|
|
3
|
+
ElementRef,
|
|
4
|
+
Renderer2,
|
|
5
|
+
AfterViewInit,
|
|
6
|
+
EventEmitter,
|
|
7
|
+
Output,
|
|
8
|
+
Input,
|
|
9
|
+
} from '@angular/core'
|
|
10
|
+
|
|
11
|
+
@Directive({
|
|
12
|
+
selector: '[gnUiEditableLabel]',
|
|
13
|
+
})
|
|
14
|
+
export class EditableLabelDirective implements AfterViewInit {
|
|
15
|
+
@Output() editableLabelChanged = new EventEmitter<string>()
|
|
16
|
+
@Input() gnUiEditableLabel?: boolean
|
|
17
|
+
|
|
18
|
+
constructor(private el: ElementRef, private renderer: Renderer2) {}
|
|
19
|
+
|
|
20
|
+
ngAfterViewInit() {
|
|
21
|
+
if (this.gnUiEditableLabel !== false) {
|
|
22
|
+
const appendedInput = this.renderer.createElement('input')
|
|
23
|
+
|
|
24
|
+
this.renderer.setStyle(appendedInput, 'background', 'inherit')
|
|
25
|
+
this.renderer.setStyle(appendedInput, 'color', 'inherit')
|
|
26
|
+
this.renderer.setStyle(appendedInput, 'font', 'inherit')
|
|
27
|
+
this.renderer.setStyle(appendedInput, 'border', 'inherit')
|
|
28
|
+
this.renderer.setStyle(appendedInput, 'width', '100%')
|
|
29
|
+
this.renderer.setStyle(appendedInput, 'padding', 'inherit')
|
|
30
|
+
this.renderer.setStyle(appendedInput, 'margin', '0')
|
|
31
|
+
this.renderer.setStyle(appendedInput, 'height', 'inherit')
|
|
32
|
+
this.renderer.setStyle(appendedInput, 'line-height', 'inherit')
|
|
33
|
+
this.renderer.setStyle(appendedInput, 'text-decoration', 'inherit')
|
|
34
|
+
|
|
35
|
+
const hostContent = this.el.nativeElement.textContent || ''
|
|
36
|
+
const formattedContent = hostContent.replace(/\s+/g, ' ').trim()
|
|
37
|
+
this.renderer.setProperty(appendedInput, 'value', formattedContent)
|
|
38
|
+
this.renderer.setProperty(this.el.nativeElement, 'innerHTML', '')
|
|
39
|
+
|
|
40
|
+
this.renderer.listen(appendedInput, 'input', (event) => {
|
|
41
|
+
this.editableLabelChanged.emit(event.target.value)
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
this.renderer.appendChild(this.el.nativeElement, appendedInput)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<button
|
|
2
|
-
class="group flex items-center justify-center backdrop-blur p-1 bg-primary-opacity-
|
|
2
|
+
class="group flex items-center justify-center gap-1 backdrop-blur p-1 bg-primary-opacity-30 text-white rounded content-center"
|
|
3
3
|
>
|
|
4
|
-
<mat-icon class="material-symbols-outlined align-middle">{{
|
|
5
|
-
|
|
4
|
+
<mat-icon class="material-symbols-outlined align-middle w-[18px]">{{
|
|
5
|
+
icon
|
|
6
|
+
}}</mat-icon>
|
|
7
|
+
<span
|
|
8
|
+
class="mx-2 mt-0.5 text-[16px] tracking-widest content-center opacity-75"
|
|
9
|
+
>{{ label.toUpperCase() }}</span
|
|
10
|
+
>
|
|
6
11
|
</button>
|
|
@@ -41,6 +41,7 @@ import { MatFormFieldModule } from '@angular/material/form-field'
|
|
|
41
41
|
import { MatInputModule } from '@angular/material/input'
|
|
42
42
|
import { MatDatepickerModule } from '@angular/material/datepicker'
|
|
43
43
|
import { MatNativeDateModule } from '@angular/material/core'
|
|
44
|
+
import { EditableLabelDirective } from './editable-label/editable-label.directive'
|
|
44
45
|
|
|
45
46
|
@NgModule({
|
|
46
47
|
declarations: [
|
|
@@ -68,6 +69,7 @@ import { MatNativeDateModule } from '@angular/material/core'
|
|
|
68
69
|
CheckboxComponent,
|
|
69
70
|
SearchInputComponent,
|
|
70
71
|
DateRangePickerComponent,
|
|
72
|
+
EditableLabelDirective,
|
|
71
73
|
],
|
|
72
74
|
imports: [
|
|
73
75
|
CommonModule,
|
|
@@ -106,6 +108,7 @@ import { MatNativeDateModule } from '@angular/material/core'
|
|
|
106
108
|
CheckboxComponent,
|
|
107
109
|
SearchInputComponent,
|
|
108
110
|
DateRangePickerComponent,
|
|
111
|
+
EditableLabelDirective,
|
|
109
112
|
],
|
|
110
113
|
})
|
|
111
114
|
export class UiInputsModule {}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
<div
|
|
40
40
|
class="contents hover:text-gray-900 text-gray-800 cursor-pointer"
|
|
41
|
-
(click)="
|
|
41
|
+
(click)="recordsSelect.emit([record])"
|
|
42
42
|
*ngFor="let record of records"
|
|
43
43
|
>
|
|
44
44
|
<div class="record-table-col text-16">
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</div>
|
|
158
158
|
<div
|
|
159
159
|
class="contents hover:text-gray-900 text-gray-800 cursor-pointer"
|
|
160
|
-
(click)="
|
|
160
|
+
(click)="recordsSelect.emit([record])"
|
|
161
161
|
*ngFor="let record of records"
|
|
162
162
|
>
|
|
163
163
|
<div class="record-table-col">
|
|
@@ -100,6 +100,7 @@ export function loadAppConfig() {
|
|
|
100
100
|
'login_url',
|
|
101
101
|
'web_component_embedder_url',
|
|
102
102
|
'languages',
|
|
103
|
+
'contact_email',
|
|
103
104
|
],
|
|
104
105
|
warnings,
|
|
105
106
|
errors
|
|
@@ -126,6 +127,7 @@ export function loadAppConfig() {
|
|
|
126
127
|
WEB_COMPONENT_EMBEDDER_URL:
|
|
127
128
|
parsedGlobalSection.web_component_embedder_url,
|
|
128
129
|
LANGUAGES: parsedGlobalSection.languages,
|
|
130
|
+
CONTACT_EMAIL: parsedGlobalSection.contact_email,
|
|
129
131
|
} as GlobalConfig)
|
|
130
132
|
|
|
131
133
|
const parsedLayersSections = parseMultiConfigSection(
|
|
@@ -185,6 +187,7 @@ export function loadAppConfig() {
|
|
|
185
187
|
'fonts_stylesheet_url',
|
|
186
188
|
'thumbnail_placeholder',
|
|
187
189
|
'header_background',
|
|
190
|
+
'favicon',
|
|
188
191
|
],
|
|
189
192
|
warnings,
|
|
190
193
|
errors
|
|
@@ -204,6 +207,7 @@ export function loadAppConfig() {
|
|
|
204
207
|
TITLE_FONT: parsedThemeSection.title_font,
|
|
205
208
|
MAIN_FONT: parsedThemeSection.main_font,
|
|
206
209
|
FONTS_STYLESHEET_URL: parsedThemeSection.fonts_stylesheet_url,
|
|
210
|
+
FAVICON: parsedThemeSection.favicon,
|
|
207
211
|
} as ThemeConfig)
|
|
208
212
|
|
|
209
213
|
const parsedSearchSection = parseConfigSection(
|
|
@@ -8,6 +8,7 @@ export interface GlobalConfig {
|
|
|
8
8
|
LOGIN_URL?: string
|
|
9
9
|
WEB_COMPONENT_EMBEDDER_URL?: string
|
|
10
10
|
LANGUAGES?: string[]
|
|
11
|
+
CONTACT_EMAIL?: string
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export interface LayerConfig {
|
|
@@ -37,6 +38,7 @@ export interface ThemeConfig {
|
|
|
37
38
|
MAIN_FONT?: string
|
|
38
39
|
TITLE_FONT?: string
|
|
39
40
|
FONTS_STYLESHEET_URL?: string
|
|
41
|
+
FAVICON?: string
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
export interface SearchPreset {
|
|
@@ -43,9 +43,15 @@ export const FORMATS = {
|
|
|
43
43
|
color: '#328556',
|
|
44
44
|
mimeTypes: ['x-gis/x-shapefile'],
|
|
45
45
|
},
|
|
46
|
+
gml: {
|
|
47
|
+
extensions: ['gml'],
|
|
48
|
+
priority: 5,
|
|
49
|
+
color: '#c92bce',
|
|
50
|
+
mimeTypes: ['application/gml+xml', 'text/xml; subtype=gml'],
|
|
51
|
+
},
|
|
46
52
|
kml: {
|
|
47
53
|
extensions: ['kml', 'kmz'],
|
|
48
|
-
priority:
|
|
54
|
+
priority: 6,
|
|
49
55
|
color: '#348009',
|
|
50
56
|
mimeTypes: [
|
|
51
57
|
'application/vnd.google-earth.kml+xml',
|
|
@@ -54,34 +60,40 @@ export const FORMATS = {
|
|
|
54
60
|
},
|
|
55
61
|
gpkg: {
|
|
56
62
|
extensions: ['gpkg', 'geopackage'],
|
|
57
|
-
priority:
|
|
63
|
+
priority: 7,
|
|
58
64
|
color: '#ea79ba',
|
|
59
65
|
mimeTypes: ['application/geopackage+sqlite3'],
|
|
60
66
|
},
|
|
61
67
|
zip: {
|
|
62
68
|
extensions: ['zip', 'tar.gz'],
|
|
63
|
-
priority:
|
|
69
|
+
priority: 8,
|
|
64
70
|
color: '#f2bb3a',
|
|
65
71
|
mimeTypes: ['application/zip', 'application/x-zip'],
|
|
66
72
|
},
|
|
67
73
|
pdf: {
|
|
68
74
|
extensions: ['pdf'],
|
|
69
|
-
priority:
|
|
75
|
+
priority: 9,
|
|
70
76
|
color: '#db544a',
|
|
71
77
|
mimeTypes: ['application/pdf'],
|
|
72
78
|
},
|
|
73
79
|
jpg: {
|
|
74
80
|
extensions: ['jpg', 'jpeg', 'jfif', 'pjpeg', 'pjp'],
|
|
75
|
-
priority:
|
|
81
|
+
priority: 9,
|
|
76
82
|
color: '#673ab7',
|
|
77
83
|
mimeTypes: ['image/jpg'],
|
|
78
84
|
},
|
|
79
85
|
svg: {
|
|
80
86
|
extensions: ['svg'],
|
|
81
|
-
priority:
|
|
87
|
+
priority: 10,
|
|
82
88
|
color: '#d98294',
|
|
83
89
|
mimeTypes: ['image/svg+xml'],
|
|
84
90
|
},
|
|
91
|
+
dxf: {
|
|
92
|
+
extensions: ['dxf'],
|
|
93
|
+
priority: 11,
|
|
94
|
+
color: '#de630b',
|
|
95
|
+
mimeTypes: ['application/x-dxf', 'image/x-dxf'],
|
|
96
|
+
},
|
|
85
97
|
} as const
|
|
86
98
|
|
|
87
99
|
export type FileFormat = keyof typeof FORMATS
|
|
@@ -102,13 +114,24 @@ export function getLinkPriority(link: DatasetDistribution): number {
|
|
|
102
114
|
return getFormatPriority(getFileFormat(link))
|
|
103
115
|
}
|
|
104
116
|
|
|
105
|
-
export function
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
117
|
+
export function getFileFormatFromServiceOutput(
|
|
118
|
+
serviceOutput: string
|
|
119
|
+
): FileFormat | null {
|
|
120
|
+
function formatMatcher(format: typeof FORMATS[FileFormat]): boolean {
|
|
121
|
+
const output = serviceOutput.toLowerCase()
|
|
122
|
+
return (
|
|
123
|
+
format.extensions.some((extension: string) =>
|
|
124
|
+
output.includes(extension)
|
|
125
|
+
) ||
|
|
126
|
+
format.mimeTypes.some((mimeType: string) => output.includes(mimeType))
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
for (const formatName in FORMATS) {
|
|
130
|
+
if (formatMatcher(FORMATS[formatName])) {
|
|
131
|
+
return formatName as FileFormat
|
|
109
132
|
}
|
|
110
133
|
}
|
|
111
|
-
return
|
|
134
|
+
return null
|
|
112
135
|
}
|
|
113
136
|
|
|
114
137
|
export function getFileFormat(link: DatasetDistribution): FileFormat {
|
|
@@ -140,4 +140,13 @@ export class ThemeService {
|
|
|
140
140
|
}
|
|
141
141
|
return chroma.hsl(hue % 360, saturation, lightness).css()
|
|
142
142
|
}
|
|
143
|
+
|
|
144
|
+
static setFavicon(faviconPath: string): void {
|
|
145
|
+
const link =
|
|
146
|
+
document.querySelector("link[rel*='icon']") ||
|
|
147
|
+
document.createElement('link')
|
|
148
|
+
link['rel'] = 'icon'
|
|
149
|
+
link['href'] = faviconPath
|
|
150
|
+
document.getElementsByTagName('head')[0].appendChild(link)
|
|
151
|
+
}
|
|
143
152
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type FuzzyFilter = (input: string) => boolean
|
|
2
|
+
|
|
3
|
+
function normalize(input: string) {
|
|
4
|
+
return input
|
|
5
|
+
.toLowerCase()
|
|
6
|
+
.normalize('NFD') // explode composite chars (e.g. é) into multiple chars
|
|
7
|
+
.replace(/[\u0300-\u036f]/g, '') // remove accents
|
|
8
|
+
.replace(/œ/g, 'oe') // remove accents
|
|
9
|
+
.replace(/[^a-z0-9\s]/g, ' ') // replace special characters with space
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function asNormalizedParts(input: string): string[] {
|
|
13
|
+
return normalize(input)
|
|
14
|
+
.split(/\s+/)
|
|
15
|
+
.map((part) => part.trim())
|
|
16
|
+
.filter((part) => part.length > 0)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* This creates a filter function based on a pattern (typically a user-input
|
|
21
|
+
* search text).
|
|
22
|
+
* @param pattern
|
|
23
|
+
*/
|
|
24
|
+
export function createFuzzyFilter(pattern: string): FuzzyFilter {
|
|
25
|
+
const patternParts = asNormalizedParts(pattern)
|
|
26
|
+
return (input: string) => {
|
|
27
|
+
const inputParts = asNormalizedParts(input)
|
|
28
|
+
return patternParts.every((patternPart) =>
|
|
29
|
+
inputParts.some((part) => part.includes(patternPart))
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
}
|
package/tailwind.base.css
CHANGED
|
@@ -7,8 +7,38 @@
|
|
|
7
7
|
@apply shadow-xl hover:shadow-xl-hover transition-shadow;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.btn {
|
|
11
|
+
@apply flex flex-row items-center text-[1em] leading-none p-[1em] rounded-[0.25em] transition-all duration-100 focus:outline-none disabled:opacity-50;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
.btn-default {
|
|
11
|
-
@apply
|
|
15
|
+
@apply btn text-white
|
|
16
|
+
bg-gray-700 hover:bg-gray-800 active:bg-gray-900
|
|
17
|
+
border border-gray-700 focus:ring-4 focus:ring-gray-200;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.btn-primary {
|
|
21
|
+
@apply btn text-white
|
|
22
|
+
bg-primary hover:bg-primary-darker focus:bg-primary-darker active:bg-primary-darkest
|
|
23
|
+
border border-primary focus:ring-4 focus:ring-primary-lightest;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.btn-secondary {
|
|
27
|
+
@apply btn text-white
|
|
28
|
+
bg-secondary hover:bg-secondary-darker focus:bg-secondary-darker active:bg-secondary-darkest
|
|
29
|
+
border border-secondary focus:ring-4 focus:ring-secondary-lightest;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.btn-outline {
|
|
33
|
+
@apply btn text-main
|
|
34
|
+
bg-white hover:text-primary-darker focus:text-primary-darker active:text-primary-black
|
|
35
|
+
border border-gray-300 hover:border-primary-lighter focus:border-primary-lighter focus:ring-4 focus:ring-primary-lightest active:border-primary-darker;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.btn-light {
|
|
39
|
+
@apply btn text-main
|
|
40
|
+
bg-white hover:bg-gray-50 focus:bg-gray-50 active:bg-gray-100
|
|
41
|
+
border border-white focus:ring-4 focus:ring-gray-300;
|
|
12
42
|
}
|
|
13
43
|
|
|
14
44
|
.badge-btn {
|