geonetwork-ui 2.2.0-dev.438f1ef6 → 2.2.0-dev.55bb5e18
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/repository/src/index.mjs +2 -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/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +63 -0
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +5 -2
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +4 -3
- 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/elements/src/index.mjs +2 -1
- 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 +4 -6
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +8 -3
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +22 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +6 -3
- 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/util/i18n/src/index.mjs +2 -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 +7 -0
- package/esm2022/translations/en.json +8 -1
- package/esm2022/translations/es.json +7 -0
- package/esm2022/translations/fr.json +8 -1
- package/esm2022/translations/it.json +16 -9
- package/esm2022/translations/nl.json +7 -0
- package/esm2022/translations/pt.json +7 -0
- package/fesm2022/geonetwork-ui.mjs +216 -52
- package/fesm2022/geonetwork-ui.mjs.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/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/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/feature-map.module.d.ts +13 -12
- package/libs/feature/map/src/lib/feature-map.module.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 +1 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- 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 +0 -1
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +12 -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 -1
- 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/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/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 +1 -1
- package/src/libs/api/repository/src/index.ts +1 -0
- 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/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/feature-map.module.ts +2 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +3 -1
- 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 +1 -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.html +3 -25
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +0 -4
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +26 -3
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +7 -4
- 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/util/i18n/src/index.ts +1 -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/translations/de.json +7 -0
- package/translations/en.json +8 -1
- package/translations/es.json +7 -0
- package/translations/fr.json +8 -1
- package/translations/it.json +16 -9
- package/translations/nl.json +7 -0
- package/translations/pt.json +7 -0
- package/translations/sk.json +7 -0
|
@@ -14,10 +14,7 @@ import { TranslateService } from '@ngx-translate/core'
|
|
|
14
14
|
import { StarToggleComponent } from '../../../../../../../libs/ui/inputs/src'
|
|
15
15
|
import { Observable, Subscription } from 'rxjs'
|
|
16
16
|
import { CatalogRecord } from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
17
|
-
import {
|
|
18
|
-
AuthService,
|
|
19
|
-
FavoritesService,
|
|
20
|
-
} from '../../../../../../../libs/api/repository/src/lib/gn4'
|
|
17
|
+
import { AuthService, FavoritesService } from '../../../../../../../libs/api/repository/src'
|
|
21
18
|
import { PlatformServiceInterface } from '../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
22
19
|
|
|
23
20
|
@Component({
|
|
@@ -27,6 +24,7 @@ import { PlatformServiceInterface } from '../../../../../../../libs/common/domai
|
|
|
27
24
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
25
|
})
|
|
29
26
|
export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
|
|
27
|
+
@Input() displayCount? = true
|
|
30
28
|
@Input() set record(value) {
|
|
31
29
|
this.record_ = value
|
|
32
30
|
this.favoriteCount =
|
|
@@ -23,7 +23,7 @@ import { FilterDropdownComponent } from './filter-dropdown/filter-dropdown.compo
|
|
|
23
23
|
import { Geometry } from 'geojson'
|
|
24
24
|
import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
25
25
|
import { RecordsRepositoryInterface } from '../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
26
|
-
import { Gn4Repository } from '../../../../../libs/api/repository/src
|
|
26
|
+
import { Gn4Repository } from '../../../../../libs/api/repository/src'
|
|
27
27
|
|
|
28
28
|
// this geometry will be used to filter & boost results accordingly
|
|
29
29
|
export const FILTER_GEOMETRY = new InjectionToken<Promise<Geometry>>(
|
|
@@ -43,7 +43,7 @@ import { switchMapWithSearchId } from '../utils/operators/search.operator'
|
|
|
43
43
|
import { Geometry } from 'geojson'
|
|
44
44
|
import { FILTER_GEOMETRY } from '../feature-search.module'
|
|
45
45
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
46
|
-
import { FavoritesService } from '../../../../../../libs/api/repository/src
|
|
46
|
+
import { FavoritesService } from '../../../../../../libs/api/repository/src'
|
|
47
47
|
import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
48
48
|
import { valid as validGeoJson } from 'geojson-validation'
|
|
49
49
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
FieldFilters,
|
|
14
14
|
TermBucket,
|
|
15
15
|
} from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
16
|
-
import { ElasticsearchService } from '../../../../../../../libs/api/repository/src
|
|
16
|
+
import { ElasticsearchService } from '../../../../../../../libs/api/repository/src'
|
|
17
17
|
import { LangService } from '../../../../../../../libs/util/i18n/src'
|
|
18
18
|
|
|
19
19
|
export type FieldValue = string | number
|
|
@@ -34,7 +34,7 @@ export class LanguageSwitcherComponent implements OnInit {
|
|
|
34
34
|
ngOnInit(): void {
|
|
35
35
|
const languages = this.languagePlaceholder || DEFAULT_LANGUAGES
|
|
36
36
|
this.languageList = languages.map((language) => ({
|
|
37
|
-
label:
|
|
37
|
+
label: `${language}`.toUpperCase(),
|
|
38
38
|
value: language,
|
|
39
39
|
}))
|
|
40
40
|
}
|
|
@@ -19,3 +19,4 @@ 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
21
|
export * from './lib/record-api-form/record-api-form.component'
|
|
22
|
+
export * from './lib/markdown-parser/markdown-parser.component'
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/** Body **/
|
|
2
|
+
:host /deep/ .markdown-body {
|
|
3
|
+
-ms-text-size-adjust: 100%;
|
|
4
|
+
-webkit-text-size-adjust: 100%;
|
|
5
|
+
margin: 0px 0px 1.5rem 0px;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
word-wrap: break-word;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Emphasis **/
|
|
11
|
+
|
|
12
|
+
:host /deep/ .markdown-body strong {
|
|
13
|
+
@apply font-bold;
|
|
14
|
+
color: var(--color-secondary-darker);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Headings **/
|
|
18
|
+
|
|
19
|
+
:host /deep/ .markdown-body h1,
|
|
20
|
+
:host /deep/ .markdown-body h2,
|
|
21
|
+
:host /deep/ .markdown-body h3,
|
|
22
|
+
:host /deep/ .markdown-body h4,
|
|
23
|
+
:host /deep/ .markdown-body h5,
|
|
24
|
+
:host /deep/ .markdown-body h6 {
|
|
25
|
+
margin-top: 24px;
|
|
26
|
+
margin-bottom: 16px;
|
|
27
|
+
line-height: 1.25;
|
|
28
|
+
@apply text-title font-title font-bold;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host /deep/ .markdown-body h1 {
|
|
32
|
+
margin: 0.67em 0;
|
|
33
|
+
padding-bottom: 0.3em;
|
|
34
|
+
font-size: 2em;
|
|
35
|
+
color: var(--color-primary);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host /deep/ .markdown-body h2 {
|
|
39
|
+
padding-bottom: 0.3em;
|
|
40
|
+
font-size: 1.5em;
|
|
41
|
+
color: var(--color-secondary);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host /deep/ .markdown-body h3 {
|
|
45
|
+
font-size: 1.25em;
|
|
46
|
+
color: var(--color-secondary);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host /deep/ .markdown-body h4 {
|
|
50
|
+
font-size: 1em;
|
|
51
|
+
color: var(--color-secondary);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host /deep/ .markdown-body h5 {
|
|
55
|
+
font-size: 0.875em;
|
|
56
|
+
color: var(--color-secondary);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host /deep/ .markdown-body h6 {
|
|
60
|
+
font-size: 0.85em;
|
|
61
|
+
color: var(--color-secondary-lighter);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Paragraphs **/
|
|
65
|
+
|
|
66
|
+
:host /deep/ .markdown-body p {
|
|
67
|
+
margin-top: 0;
|
|
68
|
+
margin-bottom: 10px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Links **/
|
|
72
|
+
|
|
73
|
+
:host /deep/ .markdown-body p > a {
|
|
74
|
+
margin-top: 0;
|
|
75
|
+
margin-bottom: 10px;
|
|
76
|
+
color: var(--color-primary) !important;
|
|
77
|
+
text-decoration: none !important;
|
|
78
|
+
@apply font-bold;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host /deep/ .markdown-body p > a:hover {
|
|
82
|
+
color: var(--color-primary-darker) !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Blockquotes **/
|
|
86
|
+
|
|
87
|
+
:host /deep/ .markdown-body blockquote {
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding: 0 1em;
|
|
90
|
+
color: var(--color-secondary-lighter);
|
|
91
|
+
border-left: 0.25em solid var(--color-primary-lighter);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Code **/
|
|
95
|
+
|
|
96
|
+
:host /deep/ .markdown-body pre {
|
|
97
|
+
margin-top: 0;
|
|
98
|
+
margin-bottom: 0;
|
|
99
|
+
font-size: 12px;
|
|
100
|
+
background-color: var(--color-gray-100);
|
|
101
|
+
word-wrap: normal;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host /deep/ .markdown-body pre {
|
|
105
|
+
padding: 16px;
|
|
106
|
+
overflow: auto;
|
|
107
|
+
font-size: 85%;
|
|
108
|
+
line-height: 1.45;
|
|
109
|
+
color: var(--color-secondary);
|
|
110
|
+
border-radius: 6px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:host /deep/ .markdown-body code {
|
|
114
|
+
padding: 0.2em 0.4em;
|
|
115
|
+
margin: 0;
|
|
116
|
+
font-size: 85%;
|
|
117
|
+
white-space: break-spaces;
|
|
118
|
+
border-radius: 6px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host /deep/ .markdown-body pre code {
|
|
122
|
+
display: inline;
|
|
123
|
+
max-width: auto;
|
|
124
|
+
padding: 0;
|
|
125
|
+
margin: 0;
|
|
126
|
+
overflow: visible;
|
|
127
|
+
line-height: inherit;
|
|
128
|
+
word-wrap: normal;
|
|
129
|
+
border: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Horizontal rules **/
|
|
133
|
+
|
|
134
|
+
:host /deep/ .markdown-body hr {
|
|
135
|
+
box-sizing: content-box;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
background: transparent;
|
|
138
|
+
border-bottom: 1px solid var(--color-secondary);
|
|
139
|
+
height: 0.15em;
|
|
140
|
+
padding: 0;
|
|
141
|
+
margin: 24px 0;
|
|
142
|
+
background-color: var(--color-secondary);
|
|
143
|
+
border: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host /deep/ .markdown-body hr::before {
|
|
147
|
+
display: table;
|
|
148
|
+
content: '';
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host /deep/ .markdown-body hr::after {
|
|
152
|
+
display: table;
|
|
153
|
+
clear: both;
|
|
154
|
+
content: '';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Lists **/
|
|
158
|
+
|
|
159
|
+
:host /deep/ .markdown-body ul,
|
|
160
|
+
:host /deep/ .markdown-body ol {
|
|
161
|
+
margin-top: 0;
|
|
162
|
+
margin-bottom: 0;
|
|
163
|
+
padding-left: 2em;
|
|
164
|
+
list-style: revert;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host /deep/ .markdown-body ol ol,
|
|
168
|
+
:host /deep/ .markdown-body ul ol {
|
|
169
|
+
list-style-type: lower-roman;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:host /deep/ .markdown-body ul ul ol,
|
|
173
|
+
:host /deep/ .markdown-body ul ol ol,
|
|
174
|
+
:host /deep/ .markdown-body ol ul ol,
|
|
175
|
+
:host /deep/ .markdown-body ol ol ol {
|
|
176
|
+
list-style-type: lower-alpha;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:host /deep/ .markdown-body ol[type='a s'] {
|
|
180
|
+
list-style-type: lower-alpha;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:host /deep/ .markdown-body ol[type='A s'] {
|
|
184
|
+
list-style-type: upper-alpha;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host /deep/ .markdown-body ol[type='i s'] {
|
|
188
|
+
list-style-type: lower-roman;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:host /deep/ .markdown-body ol[type='I s'] {
|
|
192
|
+
list-style-type: upper-roman;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:host /deep/ .markdown-body ol[type='1'] {
|
|
196
|
+
list-style: unset;
|
|
197
|
+
list-style-type: decimal;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host /deep/ .markdown-body div > ol:not([type]) {
|
|
201
|
+
list-style: unset;
|
|
202
|
+
list-style-type: decimal;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** Table **/
|
|
206
|
+
|
|
207
|
+
:host /deep/ .markdown-body table {
|
|
208
|
+
border-spacing: 0;
|
|
209
|
+
border-collapse: collapse;
|
|
210
|
+
display: block;
|
|
211
|
+
width: max-content;
|
|
212
|
+
max-width: 100%;
|
|
213
|
+
overflow: auto;
|
|
214
|
+
padding-bottom: 15px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:host /deep/ .markdown-body td,
|
|
218
|
+
:host /deep/ .markdown-body th {
|
|
219
|
+
padding: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:host /deep/ .markdown-body th {
|
|
223
|
+
color: var(--color-secondary);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:host /deep/ .markdown-body table th,
|
|
227
|
+
:host /deep/ .markdown-body table td {
|
|
228
|
+
padding: 6px 13px;
|
|
229
|
+
border: 1px solid var(--color-gray-500);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host /deep/ .markdown-body table td > :last-child {
|
|
233
|
+
margin-bottom: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:host /deep/ .markdown-body table tr {
|
|
237
|
+
background-color: #ffffff;
|
|
238
|
+
border-top: 1px solid var(--color-secondary-lighter);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
:host /deep/ .markdown-body table tr:nth-child(2n) {
|
|
242
|
+
background-color: var(--color-gray-100);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:host /deep/ .markdown-body table img {
|
|
246
|
+
background-color: transparent;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** Images **/
|
|
250
|
+
|
|
251
|
+
:host /deep/ .markdown-body img {
|
|
252
|
+
border-style: none;
|
|
253
|
+
max-width: 100%;
|
|
254
|
+
box-sizing: content-box;
|
|
255
|
+
background-color: transparent;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:host /deep/ .markdown-body img[align='right'] {
|
|
259
|
+
padding-left: 20px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host /deep/ .markdown-body img[align='left'] {
|
|
263
|
+
padding-right: 20px;
|
|
264
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div class="markdown-body" [innerHTML]="parsedMarkdown"></div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'
|
|
2
|
+
import { marked } from 'marked'
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'gn-ui-markdown-parser',
|
|
6
|
+
templateUrl: './markdown-parser.component.html',
|
|
7
|
+
styleUrls: ['./markdown-parser.component.css'],
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
+
})
|
|
10
|
+
export class MarkdownParserComponent {
|
|
11
|
+
@Input() textContent: string
|
|
12
|
+
|
|
13
|
+
get parsedMarkdown() {
|
|
14
|
+
return marked.parse(this.textContent)
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,32 +1,98 @@
|
|
|
1
|
-
<div
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div class="py-5 px-5 rounded bg-gray-100 text-black mb-6 sm:mb-12">
|
|
2
|
+
<div class="grid gap-3">
|
|
3
|
+
<div>
|
|
4
|
+
<p class="text-sm font-medium" translate>record.metadata.contact</p>
|
|
5
|
+
</div>
|
|
6
6
|
<div
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
*ngIf="shownOrganization?.logoUrl?.href"
|
|
8
|
+
class="flex items-center justify-center border-solid border border-gray-300 rounded-md bg-white h-32 overflow-hidden"
|
|
9
9
|
>
|
|
10
|
-
|
|
10
|
+
<gn-ui-thumbnail
|
|
11
|
+
class="relative h-full w-full"
|
|
12
|
+
[thumbnailUrl]="shownOrganization.logoUrl.href"
|
|
13
|
+
fit="contain"
|
|
14
|
+
></gn-ui-thumbnail>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="grid gap-1">
|
|
17
|
+
<div class="flex">
|
|
18
|
+
<div
|
|
19
|
+
class="text-primary font-title text-21 mr-2 cursor-pointer hover:underline"
|
|
20
|
+
(click)="onOrganizationClick()"
|
|
21
|
+
data-cy="organization-name"
|
|
22
|
+
>
|
|
23
|
+
{{ shownOrganization.name }}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div *ngIf="shownOrganization?.website">
|
|
27
|
+
<a
|
|
28
|
+
[href]="shownOrganization.website"
|
|
29
|
+
target="_blank"
|
|
30
|
+
class="contact-website text-primary text-sm cursor-pointer hover:underline transition-all"
|
|
31
|
+
>{{ shownOrganization.website }}
|
|
32
|
+
<mat-icon
|
|
33
|
+
class="material-symbols-outlined !w-[12px] !h-[12px] !text-[12px] opacity-75 shrink-0"
|
|
34
|
+
>open_in_new</mat-icon
|
|
35
|
+
>
|
|
36
|
+
</a>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="grid gap-5 py-3 overflow-hidden">
|
|
40
|
+
<div *ngIf="contacts[0]?.phone">
|
|
41
|
+
<div class="flex">
|
|
42
|
+
<mat-icon
|
|
43
|
+
class="material-symbols-outlined !w-5 !h-5 !text-[20px] opacity-75 shrink-0"
|
|
44
|
+
>call_outline</mat-icon
|
|
45
|
+
>
|
|
46
|
+
<div class="flex flex-col ml-2">
|
|
47
|
+
<p class="text-sm">{{ contacts[0].phone }}</p>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div *ngIf="contacts[0]?.email">
|
|
52
|
+
<div class="flex">
|
|
53
|
+
<mat-icon
|
|
54
|
+
class="material-symbols-outlined !w-5 !h-5 !text-[20px] opacity-75 shrink-0"
|
|
55
|
+
>
|
|
56
|
+
mail_outline</mat-icon
|
|
57
|
+
>
|
|
58
|
+
<a
|
|
59
|
+
*ngIf="contacts.length"
|
|
60
|
+
[href]="'mailto:' + contacts[0].email"
|
|
61
|
+
class="text-sm hover:underline ml-2"
|
|
62
|
+
target="_blank"
|
|
63
|
+
data-cy="contact-email"
|
|
64
|
+
>{{ contacts[0].email }}</a
|
|
65
|
+
>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div *ngIf="contacts[0]?.firstName || contacts[0]?.lastName">
|
|
69
|
+
<div class="flex">
|
|
70
|
+
<mat-icon
|
|
71
|
+
class="material-symbols-outlined !w-5 !h-5 !text-[20px] opacity-75 shrink-0"
|
|
72
|
+
>person_outline</mat-icon
|
|
73
|
+
>
|
|
74
|
+
<div class="flex flex-col ml-2">
|
|
75
|
+
<p class="text-sm">
|
|
76
|
+
{{ contacts[0]?.firstName || '' }}
|
|
77
|
+
{{ contacts[0]?.lastName || '' }}
|
|
78
|
+
</p>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div *ngIf="contacts[0]?.address">
|
|
83
|
+
<div class="flex">
|
|
84
|
+
<mat-icon
|
|
85
|
+
class="material-symbols-outlined !w-5 !h-5 !text-[20px] opacity-75 shrink-0"
|
|
86
|
+
>
|
|
87
|
+
location_on</mat-icon
|
|
88
|
+
>
|
|
89
|
+
<div class="flex flex-col ml-2">
|
|
90
|
+
<p *ngFor="let addressPart of address" class="text-sm">
|
|
91
|
+
{{ addressPart }}
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
11
96
|
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<a
|
|
14
|
-
*ngIf="contacts.length"
|
|
15
|
-
[href]="'mailto:' + contacts[0].email"
|
|
16
|
-
class="text-gray-700 text-sm hover:underline"
|
|
17
|
-
target="_blank"
|
|
18
|
-
>{{ contacts[0].email }}</a
|
|
19
|
-
>
|
|
20
|
-
<div *ngIf="shownOrganization.website" class="mb-2">
|
|
21
|
-
<a
|
|
22
|
-
[href]="shownOrganization.website"
|
|
23
|
-
target="_blank"
|
|
24
|
-
class="contact-website text-primary text-sm cursor-pointer hover:underline transition-all"
|
|
25
|
-
>{{ shownOrganization.website }}
|
|
26
|
-
<mat-icon
|
|
27
|
-
class="material-symbols-outlined !w-[12px] !h-[12px] !text-[12px] opacity-75"
|
|
28
|
-
>open_in_new</mat-icon
|
|
29
|
-
>
|
|
30
|
-
</a>
|
|
31
97
|
</div>
|
|
32
98
|
</div>
|
|
@@ -34,6 +34,13 @@ export class MetadataContactComponent {
|
|
|
34
34
|
)
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
get address() {
|
|
38
|
+
const addressParts = this.contacts[0].address
|
|
39
|
+
.split(',')
|
|
40
|
+
.map((part) => part.trim())
|
|
41
|
+
return addressParts
|
|
42
|
+
}
|
|
43
|
+
|
|
37
44
|
onOrganizationClick() {
|
|
38
45
|
this.organizationClick.emit(this.shownOrganization)
|
|
39
46
|
}
|
|
@@ -1,32 +1,10 @@
|
|
|
1
|
-
<p
|
|
2
|
-
class="text-[28px] text-title text-center mb-6 font-title sm:text-left"
|
|
3
|
-
translate
|
|
4
|
-
>
|
|
5
|
-
record.metadata.about
|
|
6
|
-
</p>
|
|
7
1
|
<div class="mb-6 md-description sm:mb-4 sm:pr-16">
|
|
8
2
|
<gn-ui-content-ghost ghostClass="h-32" [showContent]="fieldReady('abstract')">
|
|
9
3
|
<gn-ui-max-lines [maxLines]="6" *ngIf="metadata.abstract">
|
|
10
4
|
<div>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
gnUiLinkify
|
|
15
|
-
></p>
|
|
16
|
-
<ng-container *ngIf="metadata.keywords?.length">
|
|
17
|
-
<p class="mb-3 font-medium text-primary text-sm" translate>
|
|
18
|
-
record.metadata.keywords
|
|
19
|
-
</p>
|
|
20
|
-
<div class="sm:pb-4 sm:pr-16">
|
|
21
|
-
<gn-ui-badge
|
|
22
|
-
class="inline-block mr-2 mb-2 lowercase"
|
|
23
|
-
(click)="onKeywordClick(keyword)"
|
|
24
|
-
[clickable]="true"
|
|
25
|
-
*ngFor="let keyword of metadata.keywords"
|
|
26
|
-
>{{ keyword }}</gn-ui-badge
|
|
27
|
-
>
|
|
28
|
-
</div>
|
|
29
|
-
</ng-container>
|
|
5
|
+
<gn-ui-markdown-parser
|
|
6
|
+
[textContent]="metadata.abstract"
|
|
7
|
+
></gn-ui-markdown-parser>
|
|
30
8
|
</div>
|
|
31
9
|
</gn-ui-max-lines>
|
|
32
10
|
</gn-ui-content-ghost>
|
|
@@ -29,6 +29,7 @@ import { GnUiLinkifyDirective } from './metadata-info/linkify.directive'
|
|
|
29
29
|
import { PaginationButtonsComponent } from './pagination-buttons/pagination-buttons.component'
|
|
30
30
|
import { MaxLinesComponent } from './max-lines/max-lines.component'
|
|
31
31
|
import { RecordApiFormComponent } from './record-api-form/record-api-form.component'
|
|
32
|
+
import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
|
|
32
33
|
|
|
33
34
|
@NgModule({
|
|
34
35
|
imports: [
|
|
@@ -65,6 +66,7 @@ import { RecordApiFormComponent } from './record-api-form/record-api-form.compon
|
|
|
65
66
|
PaginationButtonsComponent,
|
|
66
67
|
MaxLinesComponent,
|
|
67
68
|
RecordApiFormComponent,
|
|
69
|
+
MarkdownParserComponent,
|
|
68
70
|
],
|
|
69
71
|
exports: [
|
|
70
72
|
MetadataInfoComponent,
|
|
@@ -85,6 +87,7 @@ import { RecordApiFormComponent } from './record-api-form/record-api-form.compon
|
|
|
85
87
|
UserPreviewComponent,
|
|
86
88
|
PaginationButtonsComponent,
|
|
87
89
|
RecordApiFormComponent,
|
|
90
|
+
MarkdownParserComponent,
|
|
88
91
|
],
|
|
89
92
|
})
|
|
90
93
|
export class UiElementsModule {}
|
|
@@ -14,14 +14,37 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
|
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
15
|
})
|
|
16
16
|
export class ButtonComponent {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
private btnClass: string
|
|
18
|
+
|
|
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) {
|
|
24
|
+
case 'primary':
|
|
25
|
+
this.btnClass = 'btn-primary'
|
|
26
|
+
break
|
|
27
|
+
case 'secondary':
|
|
28
|
+
this.btnClass = 'btn-secondary'
|
|
29
|
+
break
|
|
30
|
+
case 'outline':
|
|
31
|
+
this.btnClass = 'btn-outline'
|
|
32
|
+
break
|
|
33
|
+
case 'light':
|
|
34
|
+
this.btnClass = 'btn-light'
|
|
35
|
+
break
|
|
36
|
+
default:
|
|
37
|
+
this.btnClass = 'btn-default'
|
|
38
|
+
break
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
19
42
|
@Input() disabled = false
|
|
20
43
|
@Input() extraClass = ''
|
|
21
44
|
@Output() buttonClick = new EventEmitter<void>()
|
|
22
45
|
|
|
23
46
|
get classList() {
|
|
24
|
-
return
|
|
47
|
+
return `${this.btnClass} ${this.extraClass}`
|
|
25
48
|
}
|
|
26
49
|
|
|
27
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 {
|
|
@@ -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>
|