geonetwork-ui 2.2.0-dev.46643468 → 2.2.0-dev.4db0b597
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/repository/src/lib/gn4/index.mjs +3 -1
- package/esm2022/libs/api/repository/src/lib/gn4/selection/selection.service.mjs +13 -26
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/search/aggregation.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/search/field.model.mjs +2 -0
- package/esm2022/libs/common/domain/src/lib/model/search/filter.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/search/index.mjs +2 -1
- package/esm2022/libs/common/domain/src/lib/model/search/search.model.mjs +1 -1
- package/esm2022/libs/feature/catalog/src/lib/my-org/my-org.service.mjs +4 -10
- 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/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 +17 -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/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/record/src/lib/state/mdview.reducer.mjs +2 -2
- package/esm2022/libs/feature/search/src/index.mjs +4 -1
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +2 -6
- package/esm2022/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/filter-geometry.token.mjs +4 -0
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +7 -3
- package/esm2022/libs/feature/search/src/lib/record-url.token.mjs +4 -0
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +2 -2
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +128 -0
- package/esm2022/libs/feature/search/src/lib/state/effects.mjs +6 -4
- package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +3 -2
- package/esm2022/libs/ui/elements/src/index.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +3 -1
- 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/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/editable-label/editable-label.directive.mjs +46 -0
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -3
- package/esm2022/libs/ui/layout/src/index.mjs +3 -1
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.mjs +36 -0
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +37 -0
- package/esm2022/libs/ui/search/src/index.mjs +1 -2
- package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +9 -10
- package/esm2022/libs/util/i18n/src/index.mjs +1 -2
- package/esm2022/translations/de.json +5 -3
- package/esm2022/translations/en.json +6 -4
- package/esm2022/translations/es.json +5 -3
- package/esm2022/translations/fr.json +6 -4
- package/esm2022/translations/it.json +5 -3
- package/esm2022/translations/nl.json +5 -3
- package/esm2022/translations/pt.json +5 -3
- package/fesm2022/geonetwork-ui.mjs +550 -435
- 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/repository/src/lib/gn4/index.d.ts +2 -0
- package/libs/api/repository/src/lib/gn4/index.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/selection/selection.service.d.ts +4 -5
- package/libs/api/repository/src/lib/gn4/selection/selection.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +9 -5
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/aggregation.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/search/aggregation.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/field.model.d.ts +2 -0
- package/libs/common/domain/src/lib/model/search/field.model.d.ts.map +1 -0
- package/libs/common/domain/src/lib/model/search/filter.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/search/filter.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/index.d.ts +1 -0
- package/libs/common/domain/src/lib/model/search/index.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/search.model.d.ts +2 -3
- package/libs/common/domain/src/lib/model/search/search.model.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/my-org/my-org.service.d.ts +0 -1
- package/libs/feature/catalog/src/lib/my-org/my-org.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/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 +13 -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/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/index.d.ts +3 -0
- package/libs/feature/search/src/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts +3 -3
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/feature-search.module.d.ts +0 -4
- package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
- package/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.d.ts +3 -2
- package/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/filter-geometry.token.d.ts +4 -0
- package/libs/feature/search/src/lib/filter-geometry.token.d.ts.map +1 -0
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts +1 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/record-url.token.d.ts +3 -0
- package/libs/feature/search/src/lib/record-url.token.d.ts.map +1 -0
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts +33 -0
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts.map +1 -0
- package/libs/feature/search/src/lib/state/effects.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -1
- package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +1 -1
- package/libs/ui/elements/src/index.d.ts +1 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +1 -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/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/ui-inputs.module.d.ts +2 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/layout/src/index.d.ts +2 -0
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +14 -0
- package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +15 -0
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -0
- package/libs/ui/search/src/index.d.ts +0 -1
- package/libs/ui/search/src/index.d.ts.map +1 -1
- package/libs/ui/search/src/lib/ui-search.module.d.ts +15 -15
- package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
- package/libs/util/i18n/src/index.d.ts +0 -1
- package/libs/util/i18n/src/index.d.ts.map +1 -1
- package/package.json +4 -1
- 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/repository/src/lib/gn4/index.ts +2 -0
- package/src/libs/api/repository/src/lib/gn4/selection/selection.service.ts +14 -38
- package/src/libs/common/domain/src/lib/index.ts +2 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +11 -7
- package/src/libs/common/domain/src/lib/model/search/aggregation.model.ts +1 -1
- package/src/libs/common/domain/src/lib/model/search/field.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/search/filter.model.ts +1 -1
- package/src/libs/common/domain/src/lib/model/search/index.ts +1 -0
- package/src/libs/common/domain/src/lib/model/search/search.model.ts +2 -2
- package/src/libs/common/domain/src/lib/model/user/index.ts +1 -0
- package/src/libs/feature/catalog/src/lib/my-org/my-org.service.ts +4 -16
- 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/constant/index.ts +1 -0
- package/src/libs/feature/map/src/lib/feature-map.module.ts +8 -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/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/record/src/lib/state/mdview.reducer.ts +1 -1
- package/src/libs/feature/search/src/index.ts +3 -0
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +1 -1
- package/src/libs/feature/search/src/lib/feature-search.module.ts +1 -10
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +4 -4
- package/src/libs/feature/search/src/lib/filter-geometry.token.ts +7 -0
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +9 -3
- package/src/libs/feature/search/src/lib/record-url.token.ts +4 -0
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +1 -1
- package/src/libs/feature/search/src/lib/results-table/results-table.component.css +0 -0
- package/src/libs/feature/search/src/lib/results-table/results-table.component.html +112 -0
- package/src/libs/feature/search/src/lib/results-table/results-table.component.ts +164 -0
- package/src/libs/feature/search/src/lib/state/effects.ts +5 -4
- package/src/libs/feature/search/src/lib/state/search.facade.ts +2 -1
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +3 -2
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +3 -3
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +1 -1
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -0
- 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/checkbox/checkbox.component.html +0 -1
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/editable-label/editable-label.directive.ts +48 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -0
- package/src/libs/ui/layout/src/index.ts +2 -0
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.css +0 -0
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.html +1 -0
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.ts +33 -0
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.css +15 -0
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +54 -0
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +42 -0
- package/src/libs/ui/search/src/index.ts +0 -1
- package/src/libs/ui/search/src/lib/ui-search.module.ts +2 -3
- package/src/libs/util/i18n/src/index.ts +0 -1
- package/translations/de.json +5 -3
- package/translations/en.json +6 -4
- package/translations/es.json +5 -3
- package/translations/fr.json +6 -4
- package/translations/it.json +5 -3
- package/translations/nl.json +5 -3
- package/translations/pt.json +5 -3
- package/translations/sk.json +5 -3
- 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/esm2022/libs/ui/search/src/lib/record-table/record-table.component.mjs +0 -145
- package/esm2022/libs/util/i18n/src/lib/testing/test.translate.loader.mjs +0 -24
- package/esm2022/libs/util/i18n/src/lib/testing/test.translate.module.mjs +0 -109
- package/esm2022/libs/util/i18n/src/lib/testing/translations.model.mjs +0 -6
- 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/libs/ui/search/src/lib/record-table/record-table.component.d.ts +0 -31
- package/libs/ui/search/src/lib/record-table/record-table.component.d.ts.map +0 -1
- package/libs/util/i18n/src/lib/testing/test.translate.loader.d.ts +0 -17
- package/libs/util/i18n/src/lib/testing/test.translate.loader.d.ts.map +0 -1
- package/libs/util/i18n/src/lib/testing/test.translate.module.d.ts +0 -131
- package/libs/util/i18n/src/lib/testing/test.translate.module.d.ts.map +0 -1
- package/libs/util/i18n/src/lib/testing/translations.model.d.ts +0 -21
- package/libs/util/i18n/src/lib/testing/translations.model.d.ts.map +0 -1
- package/src/libs/feature/map/src/lib/utils/map-utils-wms.service.ts +0 -58
- package/src/libs/ui/search/src/lib/record-table/record-table.component.css +0 -7
- package/src/libs/ui/search/src/lib/record-table/record-table.component.html +0 -215
- package/src/libs/ui/search/src/lib/record-table/record-table.component.ts +0 -149
- package/src/libs/util/i18n/src/lib/testing/test.translate.loader.ts +0 -26
- package/src/libs/util/i18n/src/lib/testing/test.translate.module.ts +0 -235
- package/src/libs/util/i18n/src/lib/testing/translations.model.ts +0 -28
- /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
|
@@ -10,7 +10,7 @@ import { catchError, filter, map, startWith } from 'rxjs/operators'
|
|
|
10
10
|
import { SearchFacade } from '../state/search.facade'
|
|
11
11
|
import { SearchService } from '../utils/service/search.service'
|
|
12
12
|
import { FieldsService } from '../utils/service/fields.service'
|
|
13
|
-
import { FieldAvailableValue } from '../utils/service/fields'
|
|
13
|
+
import { FieldAvailableValue, FieldValue } from '../utils/service/fields'
|
|
14
14
|
|
|
15
15
|
@Component({
|
|
16
16
|
selector: 'gn-ui-filter-dropdown',
|
|
@@ -31,11 +31,11 @@ export class FilterDropdownComponent implements OnInit {
|
|
|
31
31
|
filter((selected) => !!selected),
|
|
32
32
|
startWith([]),
|
|
33
33
|
catchError(() => of([]))
|
|
34
|
-
)
|
|
34
|
+
) as Observable<FieldValue[]>
|
|
35
35
|
|
|
36
|
-
onSelectedValues(values:
|
|
36
|
+
onSelectedValues(values: unknown[]) {
|
|
37
37
|
this.fieldsService
|
|
38
|
-
.buildFiltersFromFieldValues({ [this.fieldName]: values })
|
|
38
|
+
.buildFiltersFromFieldValues({ [this.fieldName]: values as FieldValue[] })
|
|
39
39
|
.subscribe((filters) => this.searchService.updateFilters(filters))
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -11,12 +11,13 @@ import {
|
|
|
11
11
|
AutocompleteComponent,
|
|
12
12
|
AutocompleteItem,
|
|
13
13
|
} from '../../../../../../libs/ui/inputs/src'
|
|
14
|
-
import { Observable } from 'rxjs'
|
|
14
|
+
import { Observable, firstValueFrom } from 'rxjs'
|
|
15
15
|
import { map } from 'rxjs/operators'
|
|
16
16
|
import { SearchFacade } from '../state/search.facade'
|
|
17
17
|
import { SearchService } from '../utils/service/search.service'
|
|
18
18
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
19
19
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
20
|
+
import { SearchFilters } from '../../../../../../libs/api/metadata-converter/src'
|
|
20
21
|
|
|
21
22
|
@Component({
|
|
22
23
|
selector: 'gn-ui-fuzzy-search',
|
|
@@ -75,7 +76,12 @@ export class FuzzySearchComponent implements OnInit {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
handleInputCleared() {
|
|
79
|
-
|
|
79
|
+
async handleInputCleared() {
|
|
80
|
+
const currentSearchFilters: SearchFilters = await firstValueFrom(
|
|
81
|
+
this.searchFacade.searchFilters$
|
|
82
|
+
)
|
|
83
|
+
if (currentSearchFilters.any) {
|
|
84
|
+
this.searchService.updateFilters({ any: '' })
|
|
85
|
+
}
|
|
80
86
|
}
|
|
81
87
|
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
ResultsLayoutConfigItem,
|
|
18
18
|
ResultsLayoutConfigModel,
|
|
19
19
|
} from '../../../../../../libs/ui/search/src'
|
|
20
|
-
import { RECORD_URL_TOKEN } from '../
|
|
20
|
+
import { RECORD_URL_TOKEN } from '../record-url.token'
|
|
21
21
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
22
22
|
|
|
23
23
|
export type ResultsListShowMoreStrategy = 'auto' | 'button' | 'none'
|
|
File without changes
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<gn-ui-interactive-table
|
|
2
|
+
[items]="records$ | async"
|
|
3
|
+
(itemClick)="handleRecordClick($event)"
|
|
4
|
+
>
|
|
5
|
+
<!-- SELECTED COLUMN -->
|
|
6
|
+
<gn-ui-interactive-table-column>
|
|
7
|
+
<ng-template #header>
|
|
8
|
+
<gn-ui-checkbox
|
|
9
|
+
[checked]="isAllSelected() | async"
|
|
10
|
+
[indeterminate]="isSomeSelected() | async"
|
|
11
|
+
(changed)="toggleSelectAll()"
|
|
12
|
+
type="default"
|
|
13
|
+
class="-m-2 mr-3"
|
|
14
|
+
>
|
|
15
|
+
</gn-ui-checkbox>
|
|
16
|
+
</ng-template>
|
|
17
|
+
<ng-template #cell let-item>
|
|
18
|
+
<gn-ui-checkbox
|
|
19
|
+
[checked]="isChecked(item) | async"
|
|
20
|
+
(changed)="handleRecordSelectedChange($event, item)"
|
|
21
|
+
class="-m-2"
|
|
22
|
+
type="default"
|
|
23
|
+
></gn-ui-checkbox>
|
|
24
|
+
</ng-template>
|
|
25
|
+
</gn-ui-interactive-table-column>
|
|
26
|
+
|
|
27
|
+
<!-- TITLE COLUMN -->
|
|
28
|
+
<gn-ui-interactive-table-column
|
|
29
|
+
[sortable]="true"
|
|
30
|
+
[activeSort]="isSortedBy('resourceTitleObject.default.keyword') | async"
|
|
31
|
+
(sortChange)="setSortBy('resourceTitleObject.default.keyword', $event)"
|
|
32
|
+
>
|
|
33
|
+
<ng-template #header>
|
|
34
|
+
<span translate>record.metadata.title</span>
|
|
35
|
+
</ng-template>
|
|
36
|
+
<ng-template #cell let-item>
|
|
37
|
+
{{ item.title }}
|
|
38
|
+
</ng-template>
|
|
39
|
+
</gn-ui-interactive-table-column>
|
|
40
|
+
|
|
41
|
+
<!-- FORMATS COLUMN -->
|
|
42
|
+
<gn-ui-interactive-table-column>
|
|
43
|
+
<ng-template #header>
|
|
44
|
+
<span translate>record.metadata.formats</span>
|
|
45
|
+
</ng-template>
|
|
46
|
+
<ng-template #cell let-item>
|
|
47
|
+
<div
|
|
48
|
+
class="flex justify-start items-center gap-2"
|
|
49
|
+
*ngIf="getRecordFormats(item) as formats"
|
|
50
|
+
[title]="formats.join(', ')"
|
|
51
|
+
>
|
|
52
|
+
<span
|
|
53
|
+
class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
|
|
54
|
+
[style.background-color]="getBadgeColor(formats[0])"
|
|
55
|
+
*ngIf="formats[0]"
|
|
56
|
+
>
|
|
57
|
+
{{ formats[0] }}
|
|
58
|
+
</span>
|
|
59
|
+
<span
|
|
60
|
+
class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
|
|
61
|
+
[style.background-color]="getBadgeColor(formats[1])"
|
|
62
|
+
*ngIf="formats[1]"
|
|
63
|
+
>
|
|
64
|
+
{{ formats[1] }}
|
|
65
|
+
</span>
|
|
66
|
+
<div class="flex-shrink-0" *ngIf="formats.slice(2).length > 0">
|
|
67
|
+
<span>+{{ formats.slice(2).length }}</span>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div *ngIf="!getRecordFormats(item)"></div>
|
|
71
|
+
</ng-template>
|
|
72
|
+
</gn-ui-interactive-table-column>
|
|
73
|
+
|
|
74
|
+
<!-- OWNER COLUMN -->
|
|
75
|
+
<gn-ui-interactive-table-column
|
|
76
|
+
[sortable]="true"
|
|
77
|
+
[activeSort]="isSortedBy('recordOwner') | async"
|
|
78
|
+
(sortChange)="setSortBy('recordOwner', $event)"
|
|
79
|
+
>
|
|
80
|
+
<ng-template #header>
|
|
81
|
+
<span translate>record.metadata.author</span>
|
|
82
|
+
</ng-template>
|
|
83
|
+
<ng-template #cell let-item>
|
|
84
|
+
<mat-icon class="material-symbols-outlined">person</mat-icon>
|
|
85
|
+
<span>{{ formatUserInfo(item.extras?.ownerInfo) }}</span>
|
|
86
|
+
</ng-template>
|
|
87
|
+
</gn-ui-interactive-table-column>
|
|
88
|
+
|
|
89
|
+
<!-- STATUS COLUMN -->
|
|
90
|
+
<gn-ui-interactive-table-column>
|
|
91
|
+
<ng-template #header>
|
|
92
|
+
<span translate>record.metadata.status</span>
|
|
93
|
+
</ng-template>
|
|
94
|
+
<ng-template #cell let-item>
|
|
95
|
+
{{ item.status }}
|
|
96
|
+
</ng-template>
|
|
97
|
+
</gn-ui-interactive-table-column>
|
|
98
|
+
|
|
99
|
+
<!-- UPDATE DATE COLUMN -->
|
|
100
|
+
<gn-ui-interactive-table-column
|
|
101
|
+
[sortable]="true"
|
|
102
|
+
[activeSort]="isSortedBy('changeDate') | async"
|
|
103
|
+
(sortChange)="setSortBy('changeDate', $event)"
|
|
104
|
+
>
|
|
105
|
+
<ng-template #header>
|
|
106
|
+
<span translate>record.metadata.updatedOn</span>
|
|
107
|
+
</ng-template>
|
|
108
|
+
<ng-template #cell let-item>
|
|
109
|
+
{{ dateToString(item.recordUpdated) }}
|
|
110
|
+
</ng-template>
|
|
111
|
+
</gn-ui-interactive-table-column>
|
|
112
|
+
</gn-ui-interactive-table>
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Component, EventEmitter, Output } from '@angular/core'
|
|
2
|
+
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
3
|
+
import {
|
|
4
|
+
FileFormat,
|
|
5
|
+
getBadgeColor,
|
|
6
|
+
getFileFormat,
|
|
7
|
+
getFormatPriority,
|
|
8
|
+
} from '../../../../../../libs/util/shared/src'
|
|
9
|
+
import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
|
|
10
|
+
import {
|
|
11
|
+
InteractiveTableColumnComponent,
|
|
12
|
+
InteractiveTableComponent,
|
|
13
|
+
} from '../../../../../../libs/ui/layout/src'
|
|
14
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
15
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
16
|
+
import { SearchFacade } from '../state/search.facade'
|
|
17
|
+
import { SelectionService } from '../../../../../../libs/api/repository/src'
|
|
18
|
+
import { combineLatest, firstValueFrom, Observable } from 'rxjs'
|
|
19
|
+
import { CommonModule } from '@angular/common'
|
|
20
|
+
import { map, take } from 'rxjs/operators'
|
|
21
|
+
import { FieldSort } from '../../../../../../libs/common/domain/src/lib/model/search'
|
|
22
|
+
import { SearchService } from '../utils/service/search.service'
|
|
23
|
+
|
|
24
|
+
@Component({
|
|
25
|
+
selector: 'gn-ui-results-table',
|
|
26
|
+
templateUrl: './results-table.component.html',
|
|
27
|
+
styleUrls: ['./results-table.component.css'],
|
|
28
|
+
standalone: true,
|
|
29
|
+
imports: [
|
|
30
|
+
CommonModule,
|
|
31
|
+
UiInputsModule,
|
|
32
|
+
InteractiveTableComponent,
|
|
33
|
+
InteractiveTableColumnComponent,
|
|
34
|
+
MatIconModule,
|
|
35
|
+
TranslateModule,
|
|
36
|
+
],
|
|
37
|
+
})
|
|
38
|
+
export class ResultsTableComponent {
|
|
39
|
+
@Output() recordClick = new EventEmitter<CatalogRecord>()
|
|
40
|
+
|
|
41
|
+
records$ = this.searchFacade.results$
|
|
42
|
+
selectedRecords$ = this.selectionService.selectedRecordsIdentifiers$
|
|
43
|
+
|
|
44
|
+
constructor(
|
|
45
|
+
private searchFacade: SearchFacade,
|
|
46
|
+
private searchService: SearchService,
|
|
47
|
+
private selectionService: SelectionService
|
|
48
|
+
) {}
|
|
49
|
+
|
|
50
|
+
dateToString(date: Date): string {
|
|
51
|
+
return date?.toLocaleDateString(undefined, {
|
|
52
|
+
year: 'numeric',
|
|
53
|
+
month: 'long',
|
|
54
|
+
day: 'numeric',
|
|
55
|
+
timeZone: 'UTC',
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
getStatus(isPublishedToAll: boolean | unknown) {
|
|
60
|
+
return isPublishedToAll ? 'published' : 'not published'
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getRecordFormats(record: CatalogRecord): FileFormat[] {
|
|
64
|
+
if (record.kind === 'service' || !('distributions' in record)) {
|
|
65
|
+
return []
|
|
66
|
+
}
|
|
67
|
+
const formats = Array.from(
|
|
68
|
+
new Set(
|
|
69
|
+
record.distributions.map((distribution) => getFileFormat(distribution))
|
|
70
|
+
)
|
|
71
|
+
).filter((format) => !!format)
|
|
72
|
+
formats.sort((a, b) => getFormatPriority(b) - getFormatPriority(a))
|
|
73
|
+
return formats
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
formatUserInfo(userInfo: string | unknown): string {
|
|
77
|
+
const infos = (typeof userInfo === 'string' ? userInfo : '').split('|')
|
|
78
|
+
if (infos && infos.length === 4) {
|
|
79
|
+
return `${infos[2]} ${infos[1]}`
|
|
80
|
+
}
|
|
81
|
+
return undefined
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
getBadgeColor(format: FileFormat): string {
|
|
85
|
+
return getBadgeColor(format)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
handleRecordClick(item: unknown) {
|
|
89
|
+
this.recordClick.emit(item as CatalogRecord)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
setSortBy(col: string, order: 'asc' | 'desc') {
|
|
93
|
+
this.searchService.setSortBy([order, col])
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
isSortedBy(col: string): Observable<'asc' | 'desc' | null> {
|
|
97
|
+
return this.searchFacade.sortBy$.pipe(
|
|
98
|
+
take(1),
|
|
99
|
+
map((sortOrder) => {
|
|
100
|
+
const sortArray = Array.isArray(sortOrder[0])
|
|
101
|
+
? (sortOrder as FieldSort[])
|
|
102
|
+
: ([sortOrder] as FieldSort[])
|
|
103
|
+
for (const sort of sortArray) {
|
|
104
|
+
if (sort[1] === col) {
|
|
105
|
+
return sort[0]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return null
|
|
109
|
+
})
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
isChecked(record: CatalogRecord): Observable<boolean> {
|
|
114
|
+
return this.selectedRecords$.pipe(
|
|
115
|
+
take(1),
|
|
116
|
+
map((selectedRecords) => {
|
|
117
|
+
return selectedRecords.includes(record.uniqueIdentifier)
|
|
118
|
+
})
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
handleRecordSelectedChange(selected: boolean, record: CatalogRecord) {
|
|
123
|
+
if (!selected) {
|
|
124
|
+
this.selectionService.deselectRecords([record])
|
|
125
|
+
} else {
|
|
126
|
+
this.selectionService.selectRecords([record])
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async toggleSelectAll() {
|
|
131
|
+
const records = await firstValueFrom(this.records$)
|
|
132
|
+
if (await firstValueFrom(this.isAllSelected())) {
|
|
133
|
+
this.selectionService.deselectRecords(records)
|
|
134
|
+
} else {
|
|
135
|
+
this.selectionService.selectRecords(records)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
isAllSelected(): Observable<boolean> {
|
|
140
|
+
return combineLatest([this.records$, this.selectedRecords$]).pipe(
|
|
141
|
+
take(1),
|
|
142
|
+
map(([records, selectedRecords]) => {
|
|
143
|
+
return records.every((record) =>
|
|
144
|
+
selectedRecords.includes(record.uniqueIdentifier)
|
|
145
|
+
)
|
|
146
|
+
})
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
isSomeSelected(): Observable<boolean> {
|
|
151
|
+
return combineLatest([this.records$, this.selectedRecords$]).pipe(
|
|
152
|
+
take(1),
|
|
153
|
+
map(([records, selectedRecords]) => {
|
|
154
|
+
const allSelected = records.every((record) =>
|
|
155
|
+
selectedRecords.includes(record.uniqueIdentifier)
|
|
156
|
+
)
|
|
157
|
+
const someSelected = records.some((record) =>
|
|
158
|
+
selectedRecords.includes(record.uniqueIdentifier)
|
|
159
|
+
)
|
|
160
|
+
return !allSelected && someSelected
|
|
161
|
+
})
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -41,7 +41,7 @@ import { getSearchStateSearch } from './selectors'
|
|
|
41
41
|
import { HttpErrorResponse } from '@angular/common/http'
|
|
42
42
|
import { switchMapWithSearchId } from '../utils/operators/search.operator'
|
|
43
43
|
import { Geometry } from 'geojson'
|
|
44
|
-
import { FILTER_GEOMETRY } from '../
|
|
44
|
+
import { FILTER_GEOMETRY } from '../filter-geometry.token'
|
|
45
45
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
46
46
|
import { FavoritesService } from '../../../../../../libs/api/repository/src'
|
|
47
47
|
import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
@@ -126,10 +126,11 @@ export class SearchEffects {
|
|
|
126
126
|
),
|
|
127
127
|
switchMap(([state, favorites]) => {
|
|
128
128
|
if (!state.params.useSpatialFilter || !this.filterGeometry$) {
|
|
129
|
-
return of([state, favorites,
|
|
129
|
+
return of([state, favorites, undefined])
|
|
130
130
|
}
|
|
131
131
|
return this.filterGeometry$.pipe(
|
|
132
132
|
tap((geom) => {
|
|
133
|
+
if (!geom) return
|
|
133
134
|
try {
|
|
134
135
|
const trace = validGeoJson(geom, true) as string[]
|
|
135
136
|
if (trace?.length > 0) {
|
|
@@ -145,7 +146,7 @@ export class SearchEffects {
|
|
|
145
146
|
}),
|
|
146
147
|
map((geom) => [state, favorites, geom]),
|
|
147
148
|
catchError((e) => {
|
|
148
|
-
return of([state, favorites,
|
|
149
|
+
return of([state, favorites, undefined])
|
|
149
150
|
})
|
|
150
151
|
)
|
|
151
152
|
}),
|
|
@@ -153,7 +154,7 @@ export class SearchEffects {
|
|
|
153
154
|
([state, favorites, geometry]: [
|
|
154
155
|
SearchStateSearch,
|
|
155
156
|
string[],
|
|
156
|
-
Geometry |
|
|
157
|
+
Geometry | undefined
|
|
157
158
|
]) => {
|
|
158
159
|
const { currentPage, pageSize, sort } = state.params
|
|
159
160
|
const filters = {
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
isEndOfResults,
|
|
41
41
|
totalPages,
|
|
42
42
|
} from './selectors'
|
|
43
|
-
import { FILTER_GEOMETRY } from '../
|
|
43
|
+
import { FILTER_GEOMETRY } from '../filter-geometry.token'
|
|
44
44
|
import { Geometry } from 'geojson'
|
|
45
45
|
import { catchError, map, shareReplay } from 'rxjs/operators'
|
|
46
46
|
import {
|
|
@@ -215,5 +215,6 @@ export class SearchFacade {
|
|
|
215
215
|
this.store.dispatch(new SetFilters({}, this.searchId))
|
|
216
216
|
this.store.dispatch(new SetSortBy([], this.searchId))
|
|
217
217
|
this.store.dispatch(new SetFavoritesOnly(false, this.searchId))
|
|
218
|
+
return this
|
|
218
219
|
}
|
|
219
220
|
}
|
|
@@ -18,6 +18,7 @@ export * from './lib/pagination/pagination.component'
|
|
|
18
18
|
export * from './lib/related-record-card/related-record-card.component'
|
|
19
19
|
export * from './lib/search-results-error/search-results-error.component'
|
|
20
20
|
export * from './lib/user-preview/user-preview.component'
|
|
21
|
+
export * from './lib/max-lines/max-lines.component'
|
|
21
22
|
export * from './lib/record-api-form/record-api-form.component'
|
|
22
23
|
export * from './lib/markdown-parser/markdown-parser.component'
|
|
23
24
|
export * from './lib/image-overlay-preview/image-overlay-preview.component'
|
package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<gn-ui-content-ghost
|
|
2
2
|
[showContent]="imageUrl !== undefined"
|
|
3
|
-
ghostClass="h-
|
|
3
|
+
ghostClass="h-48 mb-3"
|
|
4
4
|
>
|
|
5
5
|
<div
|
|
6
6
|
*ngIf="imageUrl"
|
|
7
|
+
[showContent]="imageUrl !== undefined"
|
|
7
8
|
data-cy="record-thumbnail"
|
|
8
|
-
class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300
|
|
9
|
+
class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
|
|
9
10
|
>
|
|
10
11
|
<gn-ui-thumbnail
|
|
11
12
|
class="relative h-full w-full"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<gn-ui-text-input
|
|
21
21
|
class="mr-2 w-20"
|
|
22
22
|
(input)="setLimit($event.target.value)"
|
|
23
|
-
[value]="limit$ | async"
|
|
23
|
+
[value]="(limit$ | async) !== '-1' ? (limit$ | async) : ''"
|
|
24
24
|
hint=""
|
|
25
25
|
>
|
|
26
26
|
</gn-ui-text-input>
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
<input
|
|
29
29
|
class="mr-2 cursor-pointer"
|
|
30
30
|
type="checkbox"
|
|
31
|
-
[checked]="(limit$ | async) === ''"
|
|
32
|
-
(change)="setLimit('')"
|
|
31
|
+
[checked]="(limit$ | async) === '-1'"
|
|
32
|
+
(change)="setLimit('-1')"
|
|
33
33
|
/>
|
|
34
34
|
<span class="text-sm" translate
|
|
35
35
|
>record.metadata.api.form.limit.all</span
|
|
@@ -88,6 +88,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
88
88
|
AvatarComponent,
|
|
89
89
|
UserPreviewComponent,
|
|
90
90
|
PaginationButtonsComponent,
|
|
91
|
+
MaxLinesComponent,
|
|
91
92
|
RecordApiFormComponent,
|
|
92
93
|
MarkdownParserComponent,
|
|
93
94
|
ImageOverlayPreviewComponent,
|
|
@@ -19,3 +19,4 @@ export * from './lib/viewport-intersector/viewport-intersector.component'
|
|
|
19
19
|
export * from './lib/checkbox/checkbox.component'
|
|
20
20
|
export * from './lib/search-input/search-input.component'
|
|
21
21
|
export * from './lib/date-range-picker/date-range-picker.component'
|
|
22
|
+
export * from './lib/editable-label/editable-label.directive'
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
standalone: true,
|
|
14
|
+
})
|
|
15
|
+
export class EditableLabelDirective implements AfterViewInit {
|
|
16
|
+
@Output() editableLabelChanged = new EventEmitter<string>()
|
|
17
|
+
@Input() gnUiEditableLabel?: boolean
|
|
18
|
+
|
|
19
|
+
constructor(private el: ElementRef, private renderer: Renderer2) {}
|
|
20
|
+
|
|
21
|
+
ngAfterViewInit() {
|
|
22
|
+
if (this.gnUiEditableLabel !== false) {
|
|
23
|
+
const appendedInput = this.renderer.createElement('input')
|
|
24
|
+
|
|
25
|
+
this.renderer.setStyle(appendedInput, 'background', 'inherit')
|
|
26
|
+
this.renderer.setStyle(appendedInput, 'color', 'inherit')
|
|
27
|
+
this.renderer.setStyle(appendedInput, 'font', 'inherit')
|
|
28
|
+
this.renderer.setStyle(appendedInput, 'border', 'inherit')
|
|
29
|
+
this.renderer.setStyle(appendedInput, 'width', '100%')
|
|
30
|
+
this.renderer.setStyle(appendedInput, 'padding', 'inherit')
|
|
31
|
+
this.renderer.setStyle(appendedInput, 'margin', '0')
|
|
32
|
+
this.renderer.setStyle(appendedInput, 'height', 'inherit')
|
|
33
|
+
this.renderer.setStyle(appendedInput, 'line-height', 'inherit')
|
|
34
|
+
this.renderer.setStyle(appendedInput, 'text-decoration', 'inherit')
|
|
35
|
+
|
|
36
|
+
const hostContent = this.el.nativeElement.textContent || ''
|
|
37
|
+
const formattedContent = hostContent.replace(/\s+/g, ' ').trim()
|
|
38
|
+
this.renderer.setProperty(appendedInput, 'value', formattedContent)
|
|
39
|
+
this.renderer.setProperty(this.el.nativeElement, 'innerHTML', '')
|
|
40
|
+
|
|
41
|
+
this.renderer.listen(appendedInput, 'input', (event) => {
|
|
42
|
+
this.editableLabelChanged.emit(event.target.value)
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
this.renderer.appendChild(this.el.nativeElement, appendedInput)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -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: [
|
|
@@ -87,6 +88,7 @@ import { MatNativeDateModule } from '@angular/material/core'
|
|
|
87
88
|
MatInputModule,
|
|
88
89
|
MatDatepickerModule,
|
|
89
90
|
MatNativeDateModule,
|
|
91
|
+
EditableLabelDirective,
|
|
90
92
|
],
|
|
91
93
|
exports: [
|
|
92
94
|
DropdownSelectorComponent,
|
|
@@ -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 {}
|
|
@@ -4,3 +4,5 @@ export * from './lib/carousel/carousel.component'
|
|
|
4
4
|
export * from './lib/expandable-panel/expandable-panel.component'
|
|
5
5
|
export * from './lib/sticky-header/sticky-header.component'
|
|
6
6
|
export * from './lib/expandable-panel-button/expandable-panel-button.component'
|
|
7
|
+
export * from './lib/interactive-table/interactive-table.component'
|
|
8
|
+
export * from './lib/interactive-table/interactive-table-column/interactive-table-column.component'
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span>empty</span>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
ContentChild,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
Input,
|
|
7
|
+
Output,
|
|
8
|
+
TemplateRef,
|
|
9
|
+
} from '@angular/core'
|
|
10
|
+
import { CommonModule } from '@angular/common'
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'gn-ui-interactive-table-column',
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [CommonModule],
|
|
16
|
+
templateUrl: './interactive-table-column.component.html',
|
|
17
|
+
styleUrls: ['./interactive-table-column.component.css'],
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
})
|
|
20
|
+
export class InteractiveTableColumnComponent {
|
|
21
|
+
@ContentChild('header') header: TemplateRef<unknown>
|
|
22
|
+
@ContentChild('cell') cell: TemplateRef<unknown>
|
|
23
|
+
|
|
24
|
+
@Input() grow = false
|
|
25
|
+
@Input() sortable = false
|
|
26
|
+
@Input() activeSort: 'asc' | 'desc' | null = null
|
|
27
|
+
@Output() sortChange = new EventEmitter<'asc' | 'desc'>()
|
|
28
|
+
|
|
29
|
+
handleSortChange() {
|
|
30
|
+
this.activeSort = this.activeSort === 'asc' ? 'desc' : 'asc'
|
|
31
|
+
this.sortChange.emit(this.activeSort)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.sort-button mat-icon {
|
|
2
|
+
padding: 0;
|
|
3
|
+
margin: 0;
|
|
4
|
+
height: 8px;
|
|
5
|
+
line-height: 8px;
|
|
6
|
+
font-size: 18px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.table-header-cell {
|
|
10
|
+
@apply text-gray-700 px-4 py-5 flex items-center truncate bg-white;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
button.table-header-cell {
|
|
14
|
+
@apply transition-colors duration-75 hover:text-main hover:bg-gray-50 focus:text-main focus:bg-gray-50;
|
|
15
|
+
}
|