geonetwork-ui 2.6.0-dev.5b83cdcc5 → 2.6.0-dev.609dd7257
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/common/distribution.mapper.mjs +3 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +40 -4
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +8 -4
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +5 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +4 -4
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +5 -2
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +79 -16
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +7 -1
- package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +2 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
- package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
- package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +266 -11
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/index.mjs +2 -3
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +68 -16
- package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +3 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +13 -13
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +7 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +3 -1
- package/esm2022/libs/feature/search/src/lib/constants.mjs +4 -2
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +5 -3
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +13 -10
- package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
- package/esm2022/libs/ui/elements/src/index.mjs +3 -2
- package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
- package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +42 -83
- package/esm2022/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.mjs +59 -0
- package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +22 -5
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +37 -12
- package/esm2022/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.mjs +5 -1
- package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +72 -0
- package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +14 -4
- package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/index.mjs +2 -1
- package/esm2022/libs/ui/layout/src/lib/cell-popin/cell-popin.component.mjs +110 -0
- package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +20 -10
- package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +38 -21
- package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +2 -2
- package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
- package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
- package/esm2022/libs/ui/search/src/index.mjs +2 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
- package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +3 -3
- package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
- package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
- package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +21 -12
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +39 -18
- package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +10 -4
- package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +42 -1
- package/esm2022/libs/util/i18n/src/lib/language-codes.mjs +24 -2
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
- package/esm2022/translations/de.json +47 -7
- package/esm2022/translations/en.json +47 -9
- package/esm2022/translations/es.json +46 -6
- package/esm2022/translations/fr.json +47 -9
- package/esm2022/translations/it.json +76 -36
- package/esm2022/translations/nl.json +46 -6
- package/esm2022/translations/pt.json +46 -6
- package/fesm2022/geonetwork-ui.mjs +2475 -1201
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/common/distribution.mapper.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 +0 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +1 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.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/elasticsearch/constant.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +13 -2
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +2 -0
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +21 -15
- 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 +6 -0
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +48 -3
- package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -1
- package/libs/feature/record/src/index.d.ts +1 -2
- package/libs/feature/record/src/index.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +13 -5
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts +10 -0
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts +6 -0
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +28 -21
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +2 -0
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
- package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts +2 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
- package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +6 -5
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
- package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
- package/libs/ui/dataviz/src/lib/data-table/data-table.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/geo-data-badge/geo-data-badge.component.d.ts +15 -0
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +6 -13
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.d.ts +14 -0
- package/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +3 -1
- package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts +3 -0
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +27 -0
- package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +1 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
- package/libs/ui/layout/src/index.d.ts +1 -0
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/cell-popin/cell-popin.component.d.ts +28 -0
- package/libs/ui/layout/src/lib/cell-popin/cell-popin.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
- package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +4 -2
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +13 -9
- package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
- package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
- package/libs/ui/search/src/index.d.ts +1 -0
- package/libs/ui/search/src/index.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +4 -3
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +10 -4
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/ui-search.module.d.ts +2 -1
- package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
- package/libs/util/i18n/src/lib/i18n.constants.d.ts +1 -0
- package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
- package/libs/util/i18n/src/lib/language-codes.d.ts +23 -1
- package/libs/util/i18n/src/lib/language-codes.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +62 -4
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +0 -1
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +13 -3
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +5 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +8 -4
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +4 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +4 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +3 -3
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +118 -16
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +11 -0
- package/src/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.ts +3 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +22 -9
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +6 -0
- package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +62 -1
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +117 -11
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +316 -6
- package/src/libs/feature/record/src/index.ts +1 -2
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +31 -10
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +106 -18
- package/src/libs/feature/record/src/lib/state/mdview.actions.ts +10 -0
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +22 -0
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +22 -15
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +12 -0
- package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +9 -0
- package/src/libs/feature/search/src/lib/constants.ts +3 -1
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -1
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +1 -0
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +1 -0
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +13 -3
- package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
- package/src/libs/ui/elements/src/index.ts +2 -1
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +68 -141
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +38 -97
- package/src/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.html +69 -0
- package/src/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.ts +61 -0
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +7 -5
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +21 -2
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +6 -3
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -0
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -1
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +48 -9
- package/src/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.ts +4 -0
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +107 -0
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +83 -0
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +15 -1
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +5 -1
- package/src/libs/ui/inputs/src/index.ts +1 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +1 -2
- package/src/libs/ui/layout/src/index.ts +1 -0
- package/src/libs/ui/layout/src/lib/cell-popin/cell-popin.component.html +40 -0
- package/src/libs/ui/layout/src/lib/cell-popin/cell-popin.component.ts +141 -0
- package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
- package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +3 -2
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +13 -6
- package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +25 -44
- package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +46 -17
- package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -1
- package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
- package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
- package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
- package/src/libs/ui/search/src/index.ts +1 -0
- package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -0
- package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
- package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
- package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +16 -6
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +15 -11
- package/src/libs/ui/search/src/lib/results-table/results-table.component.css +4 -0
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +31 -27
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +33 -15
- package/src/libs/ui/search/src/lib/ui-search.module.ts +3 -0
- package/src/libs/util/i18n/src/lib/i18n.constants.ts +42 -0
- package/src/libs/util/i18n/src/lib/language-codes.ts +23 -1
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
- package/tailwind.base.css +1 -1
- package/translations/de.json +47 -7
- package/translations/en.json +47 -9
- package/translations/es.json +46 -6
- package/translations/fr.json +47 -9
- package/translations/it.json +76 -36
- package/translations/nl.json +46 -6
- package/translations/pt.json +46 -6
- package/translations/sk.json +46 -6
- package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +0 -46
- package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +0 -12
- package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +0 -1
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +0 -30
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +0 -48
- /package/src/libs/ui/{elements/src/lib/related-record-card/related-record-card.component.css → inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css} +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Component, ElementRef, Input, ViewChild } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
4
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
5
|
+
import {
|
|
6
|
+
DatasetFeatureAttribute,
|
|
7
|
+
DatasetFeatureCatalog,
|
|
8
|
+
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
9
|
+
import { ButtonComponent } from '../../../../../../../libs/ui/inputs/src'
|
|
10
|
+
import {
|
|
11
|
+
CellPopinComponent,
|
|
12
|
+
ExpandablePanelComponent,
|
|
13
|
+
TruncatedTextComponent,
|
|
14
|
+
} from '../../../../../../../libs/ui/layout/src'
|
|
15
|
+
import { CdkScrollable, ScrollingModule } from '@angular/cdk/scrolling'
|
|
16
|
+
import { provideIcons, NgIconComponent } from '@ng-icons/core'
|
|
17
|
+
import { iconoirList } from '@ng-icons/iconoir'
|
|
18
|
+
|
|
19
|
+
marker('feature.catalog.attribute.type')
|
|
20
|
+
marker('feature.catalog.attribute.name')
|
|
21
|
+
marker('feature.catalog.attribute.code')
|
|
22
|
+
marker('feature.catalog.attribute.definition')
|
|
23
|
+
marker('feature.catalog.attribute.values')
|
|
24
|
+
|
|
25
|
+
interface ColumnDefinition {
|
|
26
|
+
key: string
|
|
27
|
+
width: string
|
|
28
|
+
class?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@Component({
|
|
32
|
+
selector: 'gn-ui-feature-catalog-list',
|
|
33
|
+
templateUrl: './feature-catalog-list.component.html',
|
|
34
|
+
styleUrls: [],
|
|
35
|
+
standalone: true,
|
|
36
|
+
imports: [
|
|
37
|
+
ButtonComponent,
|
|
38
|
+
CellPopinComponent,
|
|
39
|
+
CommonModule,
|
|
40
|
+
TranslateModule,
|
|
41
|
+
ExpandablePanelComponent,
|
|
42
|
+
TruncatedTextComponent,
|
|
43
|
+
NgIconComponent,
|
|
44
|
+
ScrollingModule,
|
|
45
|
+
],
|
|
46
|
+
providers: [provideIcons({ iconoirList })],
|
|
47
|
+
})
|
|
48
|
+
export class FeatureCatalogListComponent {
|
|
49
|
+
@Input() filteredFeatureCatalog!: DatasetFeatureCatalog
|
|
50
|
+
|
|
51
|
+
@ViewChild('scrollContainer') scrollContainer!: ElementRef
|
|
52
|
+
@ViewChild(CdkScrollable, { static: true }) scrollable!: CdkScrollable
|
|
53
|
+
@ViewChild('expanel', { read: ExpandablePanelComponent, static: true })
|
|
54
|
+
panelComponent: ExpandablePanelComponent
|
|
55
|
+
|
|
56
|
+
readonly COLUMNS_DEFAULT: ColumnDefinition[] = [
|
|
57
|
+
{ key: 'type', width: '17%' },
|
|
58
|
+
{ key: 'name', width: '32%' },
|
|
59
|
+
{ key: 'code', width: '17%' },
|
|
60
|
+
{ key: 'definition', width: 'minmax(0px, 1fr)' },
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
readonly COLUMN_VALUES: ColumnDefinition = {
|
|
64
|
+
key: 'values',
|
|
65
|
+
width: '73px',
|
|
66
|
+
class: 'text-center',
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
getColumnsDefinition(attrs: DatasetFeatureAttribute[]): ColumnDefinition[] {
|
|
70
|
+
const hasValues = attrs.some((a) => a.values?.length > 0)
|
|
71
|
+
return [...this.COLUMNS_DEFAULT, ...(hasValues ? [this.COLUMN_VALUES] : [])]
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
getGridTemplateColumns(attributes: DatasetFeatureAttribute[]) {
|
|
75
|
+
return this.getColumnsDefinition(attributes)
|
|
76
|
+
.map((col) => col.width)
|
|
77
|
+
.join(' ')
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
trackByColumn(_i: number, col: { key: string }) {
|
|
81
|
+
return col.key
|
|
82
|
+
}
|
|
83
|
+
}
|
package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html
CHANGED
|
@@ -16,17 +16,31 @@
|
|
|
16
16
|
<div class="h-14 md:w-2/5 w-full mb-4 flex flex-row relative">
|
|
17
17
|
<gn-ui-text-input
|
|
18
18
|
class="w-full"
|
|
19
|
+
[(value)]="searchQuery"
|
|
19
20
|
[extraClass]="getExtraInputClass()"
|
|
20
21
|
[placeholder]="'service.metadata.search' | translate"
|
|
21
22
|
(input)="onSearchChange($event)"
|
|
22
23
|
(keydown.enter)="onSearchEnter($event)"
|
|
23
24
|
>
|
|
24
25
|
</gn-ui-text-input>
|
|
26
|
+
<div
|
|
27
|
+
class="absolute right-14 h-14 w-14 flex items-center justify-center"
|
|
28
|
+
>
|
|
29
|
+
<button
|
|
30
|
+
#inputBtn
|
|
31
|
+
*ngIf="searchQuery"
|
|
32
|
+
[aria-label]="'service.metadata.search.clear' | translate"
|
|
33
|
+
(click)="clearSearch()"
|
|
34
|
+
class="h-12 w-12 border-0 flex items-center justify-center"
|
|
35
|
+
>
|
|
36
|
+
<ng-icon name="matClose"></ng-icon>
|
|
37
|
+
</button>
|
|
38
|
+
</div>
|
|
25
39
|
<div class="border-l absolute border-gray-200 right-0 h-14 w-14">
|
|
26
40
|
<gn-ui-button
|
|
27
41
|
#inputBtn
|
|
28
42
|
type="outline"
|
|
29
|
-
extraClass="h-12 w-12 border-0 absolute right-1 top-1"
|
|
43
|
+
extraClass="h-12 w-12 border-0 absolute right-1 top-1 bg-white"
|
|
30
44
|
(buttonClick)="searchLayers()"
|
|
31
45
|
>
|
|
32
46
|
<ng-icon name="iconoirSearch"></ng-icon>
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
WmsLayerFull,
|
|
17
17
|
WmtsLayer,
|
|
18
18
|
} from '@camptocamp/ogc-client'
|
|
19
|
+
import { matClose } from '@ng-icons/material-icons/baseline'
|
|
19
20
|
|
|
20
21
|
marker(`service.metadata.search`)
|
|
21
22
|
marker(`service.metadata.capabilities.title`)
|
|
@@ -48,6 +49,7 @@ marker(`service.metadata.capabilities.attribution`)
|
|
|
48
49
|
provideIcons({
|
|
49
50
|
iconoirSearch,
|
|
50
51
|
matInfoOutline,
|
|
52
|
+
matClose,
|
|
51
53
|
}),
|
|
52
54
|
],
|
|
53
55
|
templateUrl: './service-capabilities.component.html',
|
|
@@ -104,6 +106,12 @@ export class ServiceCapabilitiesComponent implements OnInit {
|
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
|
|
109
|
+
clearSearch() {
|
|
110
|
+
this.searchActive = false
|
|
111
|
+
this.searchQuery = ''
|
|
112
|
+
this.filteredLayers = this.availableLayers
|
|
113
|
+
}
|
|
114
|
+
|
|
107
115
|
async loadLayers() {
|
|
108
116
|
if (
|
|
109
117
|
this.apiLinks.length > 0 &&
|
|
@@ -176,7 +184,7 @@ export class ServiceCapabilitiesComponent implements OnInit {
|
|
|
176
184
|
}
|
|
177
185
|
|
|
178
186
|
getExtraClass(layerItem) {
|
|
179
|
-
return layerItem
|
|
187
|
+
return layerItem === this.selectedLayer
|
|
180
188
|
? `h-8 rounded-lg bg-primary-darker text-white hover:text-primary-darker hover:bg-white`
|
|
181
189
|
: `h-8 rounded-lg`
|
|
182
190
|
}
|
|
@@ -15,6 +15,7 @@ import { provideNgIconsConfig } from '@ng-icons/core'
|
|
|
15
15
|
import { TranslateModule } from '@ngx-translate/core'
|
|
16
16
|
import { AvatarComponent } from './avatar/avatar.component'
|
|
17
17
|
import { ImageInputComponent } from './image-input/image-input.component'
|
|
18
|
+
import { GeoDataBadgeComponent } from './geo-data-badge/geo-data-badge.component'
|
|
18
19
|
import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
|
|
19
20
|
import { KindBadgeComponent } from './kind-badge/kind-badge.component'
|
|
20
21
|
import { ThumbnailComponent } from './thumbnail/thumbnail.component'
|
|
@@ -23,7 +24,7 @@ import { UserPreviewComponent } from './user-preview/user-preview.component'
|
|
|
23
24
|
import { ApplicationBannerComponent } from './application-banner/application-banner.component'
|
|
24
25
|
import { InternalLinkCardComponent } from './internal-link-card/internal-link-card.component'
|
|
25
26
|
import { ServiceCapabilitiesComponent } from './service-capabilities/service-capabilities.component'
|
|
26
|
-
|
|
27
|
+
import { ScrollingModule } from '@angular/cdk/scrolling'
|
|
27
28
|
@NgModule({
|
|
28
29
|
imports: [
|
|
29
30
|
CommonModule,
|
|
@@ -48,6 +49,8 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
|
|
|
48
49
|
InternalLinkCardComponent,
|
|
49
50
|
ServiceCapabilitiesComponent,
|
|
50
51
|
KindBadgeComponent,
|
|
52
|
+
GeoDataBadgeComponent,
|
|
53
|
+
ScrollingModule,
|
|
51
54
|
],
|
|
52
55
|
providers: [
|
|
53
56
|
provideNgIconsConfig({
|
|
@@ -65,6 +68,7 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
|
|
|
65
68
|
InternalLinkCardComponent,
|
|
66
69
|
ServiceCapabilitiesComponent,
|
|
67
70
|
KindBadgeComponent,
|
|
71
|
+
GeoDataBadgeComponent,
|
|
68
72
|
],
|
|
69
73
|
})
|
|
70
74
|
export class UiElementsModule {}
|
|
@@ -24,3 +24,4 @@ export * from './lib/text-input/text-input.component'
|
|
|
24
24
|
export * from './lib/ui-inputs.module'
|
|
25
25
|
export * from './lib/url-input/url-input.component'
|
|
26
26
|
export * from './lib/viewport-intersector/viewport-intersector.component'
|
|
27
|
+
export * from './lib/search-feature-catalog/search-feature-catalog.component'
|
package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="flex items-center justify-between p-3 mt-8 bg-white rounded-lg border-b solid border-gray-300"
|
|
3
|
+
>
|
|
4
|
+
<div
|
|
5
|
+
class="relative shrink-0"
|
|
6
|
+
*ngIf="featureCatalog?.featureTypes?.length > 1"
|
|
7
|
+
>
|
|
8
|
+
<input
|
|
9
|
+
type="text"
|
|
10
|
+
[placeholder]="'search.filter.into.feature.catalog' | translate"
|
|
11
|
+
class="w-[220px] h-8 pl-3 pr-10 py-2 border rounded-md"
|
|
12
|
+
[(ngModel)]="searchTerm"
|
|
13
|
+
(ngModelChange)="filterAction(searchTerm)"
|
|
14
|
+
/>
|
|
15
|
+
<ng-icon
|
|
16
|
+
class="absolute right-2.5 top-1 w-6 h-6 text-black"
|
|
17
|
+
name="iconoirSearch"
|
|
18
|
+
></ng-icon>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="text-sm px-1 ml-auto hidden sm:inline">
|
|
21
|
+
<ng-container *ngIf="featureCatalog?.featureTypes?.length > 1">
|
|
22
|
+
<span
|
|
23
|
+
class="text-sm font-medium text-gray-900"
|
|
24
|
+
data-cy="total-objects-label"
|
|
25
|
+
translate
|
|
26
|
+
>record.feature.catalog.number.total.object</span
|
|
27
|
+
><span
|
|
28
|
+
class="text-sm font-bold px-1 text-gray-900"
|
|
29
|
+
data-cy="total-objects"
|
|
30
|
+
>{{ totalObjects }}</span
|
|
31
|
+
>
|
|
32
|
+
<span class="px-1.5">|</span>
|
|
33
|
+
</ng-container>
|
|
34
|
+
<span
|
|
35
|
+
class="text-sm font-medium px-1 text-gray-900"
|
|
36
|
+
data-cy="total-attributes-label"
|
|
37
|
+
translate
|
|
38
|
+
>record.feature.catalog.number.total.attribute</span
|
|
39
|
+
><span class="text-sm font-bold text-gray-900" data-cy="total-attributes">{{
|
|
40
|
+
totalAttributes
|
|
41
|
+
}}</span>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
4
|
+
import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
|
|
5
|
+
import { DatasetFeatureCatalog } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
6
|
+
import { FormsModule } from '@angular/forms'
|
|
7
|
+
import { of } from 'rxjs'
|
|
8
|
+
import { debounceTime, distinctUntilChanged, tap } from 'rxjs/operators'
|
|
9
|
+
import { createFuzzyFilter } from '../../../../../../libs/util/shared/src'
|
|
10
|
+
import { iconoirSearch } from '@ng-icons/iconoir'
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'gn-ui-search-feature-catalog',
|
|
14
|
+
templateUrl: './search-feature-catalog.component.html',
|
|
15
|
+
styleUrls: ['./search-feature-catalog.component.css'],
|
|
16
|
+
standalone: true,
|
|
17
|
+
imports: [CommonModule, NgIcon, TranslateModule, FormsModule],
|
|
18
|
+
viewProviders: [
|
|
19
|
+
provideIcons({ iconoirSearch }),
|
|
20
|
+
provideNgIconsConfig({
|
|
21
|
+
size: '1.5rem',
|
|
22
|
+
}),
|
|
23
|
+
],
|
|
24
|
+
})
|
|
25
|
+
export class SearchFeatureCatalogComponent {
|
|
26
|
+
private _featureCatalog: DatasetFeatureCatalog
|
|
27
|
+
searchTerm: any
|
|
28
|
+
@Input() set featureCatalog(value: DatasetFeatureCatalog) {
|
|
29
|
+
this._featureCatalog = value
|
|
30
|
+
this.filteredFeatureCatalog = value
|
|
31
|
+
}
|
|
32
|
+
get featureCatalog(): DatasetFeatureCatalog {
|
|
33
|
+
return this._featureCatalog
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@Output() filteredFeatureCatalogChange =
|
|
37
|
+
new EventEmitter<DatasetFeatureCatalog>()
|
|
38
|
+
filteredFeatureCatalog: DatasetFeatureCatalog
|
|
39
|
+
|
|
40
|
+
filterAction = (searchTerm: string): void => {
|
|
41
|
+
of(searchTerm)
|
|
42
|
+
.pipe(
|
|
43
|
+
debounceTime(300),
|
|
44
|
+
distinctUntilChanged(),
|
|
45
|
+
tap(() => {
|
|
46
|
+
const filtered = (this.featureCatalog?.featureTypes || []).filter(
|
|
47
|
+
(featureType) => {
|
|
48
|
+
const fuzzyFilter = createFuzzyFilter(searchTerm)
|
|
49
|
+
return (
|
|
50
|
+
fuzzyFilter(featureType.name) ||
|
|
51
|
+
(featureType.definition && fuzzyFilter(featureType.definition))
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
this.filteredFeatureCatalog = {
|
|
56
|
+
...this.featureCatalog,
|
|
57
|
+
featureTypes: filtered,
|
|
58
|
+
}
|
|
59
|
+
this.filteredFeatureCatalogChange.emit(this.filteredFeatureCatalog)
|
|
60
|
+
})
|
|
61
|
+
)
|
|
62
|
+
.subscribe()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
get totalObjects(): number {
|
|
66
|
+
return this.filteredFeatureCatalog?.featureTypes?.length || 0
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
get totalAttributes(): number {
|
|
70
|
+
return (
|
|
71
|
+
this.filteredFeatureCatalog?.featureTypes?.reduce(
|
|
72
|
+
(total, featureType) => total + (featureType.attributes?.length || 0),
|
|
73
|
+
0
|
|
74
|
+
) || 0
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
<div class="inline-block relative align-middle"
|
|
1
|
+
<div class="inline-block relative align-middle">
|
|
2
2
|
<gn-ui-button
|
|
3
3
|
[type]="'outline'"
|
|
4
4
|
[disabled]="disabled"
|
|
5
|
-
class="-m-[8px] p-[8px]"
|
|
6
5
|
(buttonClick)="toggle($event)"
|
|
7
6
|
[ngClass]="{
|
|
8
7
|
enabled: toggled,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './lib/anchor-link/anchor-link.directive'
|
|
2
2
|
export * from './lib/carousel/carousel.component'
|
|
3
|
+
export * from './lib/cell-popin/cell-popin.component'
|
|
3
4
|
export * from './lib/expandable-panel-button/expandable-panel-button.component'
|
|
4
5
|
export * from './lib/expandable-panel/expandable-panel.component'
|
|
5
6
|
export * from './lib/form-field-wrapper/form-field-wrapper.component'
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="h-full flex items-center justify-center"
|
|
3
|
+
cdkOverlayOrigin
|
|
4
|
+
#anchorRef
|
|
5
|
+
#trigger="cdkOverlayOrigin"
|
|
6
|
+
[class]="extraClass"
|
|
7
|
+
data-cy="cell-popin"
|
|
8
|
+
>
|
|
9
|
+
<ng-content select="[cellContent]"></ng-content>
|
|
10
|
+
<ng-template
|
|
11
|
+
*ngIf="activePopin"
|
|
12
|
+
cdkConnectedOverlay
|
|
13
|
+
[cdkConnectedOverlayPush]="false"
|
|
14
|
+
[cdkConnectedOverlayOrigin]="trigger"
|
|
15
|
+
[cdkConnectedOverlayOpen]="isOpen"
|
|
16
|
+
[cdkConnectedOverlayPositions]="overlayPositions"
|
|
17
|
+
[cdkConnectedOverlayWidth]="'auto'"
|
|
18
|
+
[cdkConnectedOverlayFlexibleDimensions]="true"
|
|
19
|
+
[cdkConnectedOverlayGrowAfterOpen]="true"
|
|
20
|
+
(detach)="closeOverlay()"
|
|
21
|
+
>
|
|
22
|
+
<div
|
|
23
|
+
*ngIf="activePopin && isVisible"
|
|
24
|
+
class="bg-white shadow-lg border border-gray-300 relative"
|
|
25
|
+
data-cy="cell-popin-content"
|
|
26
|
+
>
|
|
27
|
+
<ng-content select="[popinContent]"></ng-content>
|
|
28
|
+
<gn-ui-button
|
|
29
|
+
data-cy="cell-popin-close"
|
|
30
|
+
[style.--gn-ui-button-background]="'bg-transparent'"
|
|
31
|
+
class="absolute top-2 right-2"
|
|
32
|
+
type="light"
|
|
33
|
+
(buttonClick)="closeOverlay()"
|
|
34
|
+
extraClass="w-10 h-8 px-1"
|
|
35
|
+
>
|
|
36
|
+
<ng-icon name="iconoirReduce" size="24"></ng-icon>
|
|
37
|
+
</gn-ui-button>
|
|
38
|
+
</div>
|
|
39
|
+
</ng-template>
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
Component,
|
|
4
|
+
Input,
|
|
5
|
+
OnDestroy,
|
|
6
|
+
ElementRef,
|
|
7
|
+
TemplateRef,
|
|
8
|
+
ViewChild,
|
|
9
|
+
Injector,
|
|
10
|
+
ChangeDetectorRef,
|
|
11
|
+
} from '@angular/core'
|
|
12
|
+
import { CommonModule } from '@angular/common'
|
|
13
|
+
import { provideIcons, NgIconComponent } from '@ng-icons/core'
|
|
14
|
+
import { iconoirReduce } from '@ng-icons/iconoir'
|
|
15
|
+
import { MatButtonModule } from '@angular/material/button'
|
|
16
|
+
import {
|
|
17
|
+
OverlayModule,
|
|
18
|
+
ConnectedPosition,
|
|
19
|
+
ScrollDispatcher,
|
|
20
|
+
CdkScrollable,
|
|
21
|
+
CdkConnectedOverlay,
|
|
22
|
+
OverlayContainer,
|
|
23
|
+
} from '@angular/cdk/overlay'
|
|
24
|
+
import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
25
|
+
@Component({
|
|
26
|
+
selector: 'gn-ui-cell-popin',
|
|
27
|
+
standalone: true,
|
|
28
|
+
imports: [
|
|
29
|
+
CommonModule,
|
|
30
|
+
MatButtonModule,
|
|
31
|
+
OverlayModule,
|
|
32
|
+
ButtonComponent,
|
|
33
|
+
NgIconComponent,
|
|
34
|
+
],
|
|
35
|
+
providers: [provideIcons({ iconoirReduce })],
|
|
36
|
+
templateUrl: './cell-popin.component.html',
|
|
37
|
+
styleUrls: [],
|
|
38
|
+
})
|
|
39
|
+
export class CellPopinComponent implements AfterViewInit, OnDestroy {
|
|
40
|
+
@Input() extraClass = ''
|
|
41
|
+
@Input() cdkScrollContainer!: CdkScrollable
|
|
42
|
+
@Input() scrollContainer!: ElementRef
|
|
43
|
+
|
|
44
|
+
@ViewChild('anchorRef') anchorRef!: ElementRef
|
|
45
|
+
|
|
46
|
+
protected isOpen = false
|
|
47
|
+
protected isVisible = true
|
|
48
|
+
protected overlayPositions: ConnectedPosition[] = [
|
|
49
|
+
{
|
|
50
|
+
originX: 'end',
|
|
51
|
+
originY: 'top',
|
|
52
|
+
overlayX: 'end',
|
|
53
|
+
overlayY: 'top',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
originX: 'start',
|
|
57
|
+
originY: 'top',
|
|
58
|
+
overlayX: 'start',
|
|
59
|
+
overlayY: 'top',
|
|
60
|
+
},
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
private firstCheck = true
|
|
64
|
+
private intersectionObserver: IntersectionObserver
|
|
65
|
+
|
|
66
|
+
private _activePopin = true
|
|
67
|
+
|
|
68
|
+
@Input()
|
|
69
|
+
set activePopin(active: boolean | undefined) {
|
|
70
|
+
this._activePopin = !!active
|
|
71
|
+
this.updateIntersectionObserver()
|
|
72
|
+
}
|
|
73
|
+
get activePopin(): boolean {
|
|
74
|
+
return this._activePopin
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
constructor(
|
|
78
|
+
private scrollDispatcher: ScrollDispatcher,
|
|
79
|
+
private cdr: ChangeDetectorRef
|
|
80
|
+
) {}
|
|
81
|
+
|
|
82
|
+
ngAfterViewInit() {
|
|
83
|
+
if (!this.activePopin) {
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (this.cdkScrollContainer) {
|
|
88
|
+
this.scrollDispatcher.register(this.cdkScrollContainer)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
this.updateIntersectionObserver()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
ngOnDestroy() {
|
|
95
|
+
this.intersectionObserver?.disconnect()
|
|
96
|
+
this.scrollDispatcher.deregister(this.cdkScrollContainer)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
updateIntersectionObserver() {
|
|
100
|
+
if (!this.scrollContainer || !this.anchorRef) {
|
|
101
|
+
return
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (this.intersectionObserver) {
|
|
105
|
+
this.intersectionObserver?.disconnect()
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
this.intersectionObserver = new IntersectionObserver(
|
|
109
|
+
([entry]) => {
|
|
110
|
+
const visible = entry.intersectionRatio >= 1
|
|
111
|
+
|
|
112
|
+
// Ignore first visibility if first time opening it
|
|
113
|
+
if (this.firstCheck && !visible) {
|
|
114
|
+
this.firstCheck = false
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
this.firstCheck = false
|
|
119
|
+
|
|
120
|
+
if (this.isVisible !== visible) {
|
|
121
|
+
this.isVisible = visible
|
|
122
|
+
this.cdr.detectChanges()
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
root: this.scrollContainer.nativeElement,
|
|
127
|
+
threshold: 1.0,
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
this.intersectionObserver.observe(this.anchorRef.nativeElement)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
openOverlay() {
|
|
135
|
+
this.isOpen = true
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
closeOverlay() {
|
|
139
|
+
this.isOpen = false
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="group flex
|
|
2
|
+
class="group flex items-center justify-between title border-b border-gray-100 cursor-pointer"
|
|
3
3
|
(click)="toggle()"
|
|
4
|
+
data-cy="expandable-panel-header"
|
|
4
5
|
>
|
|
5
|
-
<div class="grow
|
|
6
|
-
|
|
6
|
+
<div class="grow py-2.5">
|
|
7
|
+
<ng-container *ngIf="titleTemplate; else simpleTitle">
|
|
8
|
+
<div data-cy="expandable-panel-custom-title">
|
|
9
|
+
<ng-container *ngTemplateOutlet="titleTemplate"></ng-container>
|
|
10
|
+
</div>
|
|
11
|
+
</ng-container>
|
|
12
|
+
<ng-template #simpleTitle>
|
|
13
|
+
<div
|
|
14
|
+
class="font-medium text-black text-sm"
|
|
15
|
+
data-cy="expandable-panel-title"
|
|
16
|
+
>
|
|
17
|
+
{{ title }}
|
|
18
|
+
</div>
|
|
19
|
+
</ng-template>
|
|
7
20
|
</div>
|
|
8
21
|
<div
|
|
9
|
-
class="w-8 opacity-25 text-primary group-hover:opacity-100 transition-opacity"
|
|
22
|
+
class="w-8 opacity-25 text-primary group-hover:opacity-100 transition-opacity flex items-center shrink-0"
|
|
10
23
|
>
|
|
11
|
-
<ng-icon
|
|
12
|
-
|
|
24
|
+
<ng-icon
|
|
25
|
+
[name]="collapsed ? 'matAdd' : 'matRemove'"
|
|
26
|
+
[style.color]="iconColor"
|
|
27
|
+
></ng-icon>
|
|
13
28
|
</div>
|
|
14
29
|
</div>
|
|
15
30
|
<div
|
|
16
|
-
class="content overflow-hidden transition-
|
|
31
|
+
class="content overflow-hidden transition-all duration-300"
|
|
17
32
|
[ngClass]="collapsed ? 'ease-out' : 'ease-in'"
|
|
18
|
-
[style.maxHeight]="maxHeight"
|
|
19
33
|
#contentDiv
|
|
34
|
+
*ngIf="!collapsed"
|
|
35
|
+
data-cy="expandable-panel-content"
|
|
20
36
|
>
|
|
21
37
|
<ng-content></ng-content>
|
|
22
38
|
</div>
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChangeDetectionStrategy,
|
|
3
3
|
Component,
|
|
4
|
+
ContentChild,
|
|
4
5
|
ElementRef,
|
|
5
6
|
Input,
|
|
7
|
+
TemplateRef,
|
|
6
8
|
ViewChild,
|
|
9
|
+
OnDestroy,
|
|
10
|
+
ChangeDetectorRef,
|
|
11
|
+
AfterViewInit,
|
|
7
12
|
} from '@angular/core'
|
|
8
13
|
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
9
14
|
import { CommonModule } from '@angular/common'
|
|
@@ -18,20 +23,41 @@ import { matAdd, matRemove } from '@ng-icons/material-icons/baseline'
|
|
|
18
23
|
imports: [CommonModule, NgIcon],
|
|
19
24
|
viewProviders: [provideIcons({ matAdd, matRemove })],
|
|
20
25
|
})
|
|
21
|
-
export class ExpandablePanelComponent {
|
|
22
|
-
@Input() title
|
|
23
|
-
@Input()
|
|
24
|
-
@
|
|
25
|
-
|
|
26
|
+
export class ExpandablePanelComponent implements AfterViewInit, OnDestroy {
|
|
27
|
+
@Input() title?: string
|
|
28
|
+
@Input() iconColor? = ''
|
|
29
|
+
@ContentChild('titleTemplate') titleTemplate?: TemplateRef<HTMLElement>
|
|
30
|
+
@ViewChild('contentDiv') contentDiv?: ElementRef
|
|
31
|
+
|
|
32
|
+
private _collapsed = true
|
|
33
|
+
private contentObserver?: ResizeObserver
|
|
34
|
+
|
|
35
|
+
constructor(private readonly changeDetector: ChangeDetectorRef) {}
|
|
36
|
+
|
|
37
|
+
ngAfterViewInit() {
|
|
38
|
+
if (this.contentDiv) {
|
|
39
|
+
this.contentObserver = new ResizeObserver(() => {
|
|
40
|
+
this.changeDetector.detectChanges()
|
|
41
|
+
})
|
|
42
|
+
this.contentObserver.observe(this.contentDiv.nativeElement)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@Input() set collapsed(value: boolean) {
|
|
47
|
+
this._collapsed = value
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
get collapsed(): boolean {
|
|
51
|
+
return this._collapsed
|
|
52
|
+
}
|
|
26
53
|
|
|
27
54
|
toggle(): void {
|
|
28
55
|
this.collapsed = !this.collapsed
|
|
29
|
-
this.maxHeight = this.setMaxHeight()
|
|
30
56
|
}
|
|
31
57
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.
|
|
35
|
-
}
|
|
58
|
+
ngOnDestroy() {
|
|
59
|
+
if (this.contentObserver) {
|
|
60
|
+
this.contentObserver.disconnect()
|
|
61
|
+
}
|
|
36
62
|
}
|
|
37
63
|
}
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
*ngFor="let item of items"
|
|
32
32
|
(click)="handleRowClick(item)"
|
|
33
33
|
data-cy="table-row"
|
|
34
|
+
[attr.data-cy-title]="item.title"
|
|
34
35
|
[title]="getItemTitle(item) | translate"
|
|
35
36
|
>
|
|
36
37
|
<div
|
|
@@ -48,9 +49,9 @@
|
|
|
48
49
|
class="table-row-cell px-3 py-1.5 flex items-center bg-white transition-colors duration-75 truncate border-b border-gray-200"
|
|
49
50
|
[ngClass]="{
|
|
50
51
|
'text-purple-light cursor-default':
|
|
51
|
-
(
|
|
52
|
+
(canEditItem(item) | async) === false,
|
|
52
53
|
'group-hover:text-main group-hover:bg-gray-50':
|
|
53
|
-
(item
|
|
54
|
+
canEditItem(item) | async,
|
|
54
55
|
}"
|
|
55
56
|
>
|
|
56
57
|
<ng-container
|