geonetwork-ui 2.6.0-dev.d216c4dea → 2.6.0-dev.e61ca542f
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/index.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/common/resource-types.mjs +17 -15
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +18 -0
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
- package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +3 -3
- package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/index.mjs +2 -2
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +12 -5
- package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +41 -0
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +70 -1
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -3
- package/esm2022/libs/ui/elements/src/index.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +51 -0
- package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.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/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
- package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.mjs +42 -0
- package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.mjs +2 -0
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -9
- package/esm2022/libs/ui/layout/src/index.mjs +2 -1
- package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
- package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +56 -0
- package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
- 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/results-hits-number/results-hits-number.component.mjs +3 -3
- package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +53 -0
- package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +11 -3
- package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
- package/esm2022/translations/de.json +8 -1
- package/esm2022/translations/en.json +10 -1
- package/esm2022/translations/es.json +8 -1
- package/esm2022/translations/fr.json +11 -2
- package/esm2022/translations/it.json +8 -1
- package/esm2022/translations/nl.json +8 -1
- package/esm2022/translations/pt.json +8 -1
- package/fesm2022/geonetwork-ui.mjs +527 -145
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/index.d.ts +1 -0
- package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts +21 -0
- package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
- package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
- package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
- package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
- package/libs/feature/search/src/index.d.ts +1 -1
- package/libs/feature/search/src/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/feature-search.module.d.ts +4 -2
- package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +21 -0
- package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -0
- package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -0
- package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.service.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/download-item/download-item.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +11 -0
- package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +1 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts +14 -0
- package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts +6 -0
- package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -24
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- 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/block-list/block-list.component.d.ts +9 -2
- package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +18 -0
- package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/ui-layout.module.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-hits-search-kind/results-hits-search-kind.component.d.ts +17 -0
- package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -0
- package/libs/ui/search/src/lib/ui-search.module.d.ts +21 -19
- package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/common/resource-types.ts +29 -15
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +14 -10
- package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
- package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
- package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +21 -15
- package/src/libs/feature/search/src/index.ts +1 -1
- package/src/libs/feature/search/src/lib/feature-search.module.ts +9 -2
- package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.css +0 -0
- package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.html +16 -0
- package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +59 -0
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +4 -5
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +99 -0
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
- package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
- package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.css +6 -0
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +9 -0
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +51 -0
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
- package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +9 -9
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +1 -1
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +7 -3
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +1 -1
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
- package/src/libs/ui/inputs/src/index.ts +1 -0
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.html +23 -0
- package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.ts +44 -0
- package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.ts +5 -0
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +0 -0
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +2 -2
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
- package/src/libs/ui/layout/src/index.ts +1 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
- package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
- package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
- package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
- package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +46 -0
- package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +62 -0
- package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
- 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/results-hits-number/results-hits-number.component.html +1 -1
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +24 -0
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +53 -0
- package/src/libs/ui/search/src/lib/ui-search.module.ts +5 -0
- package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -1
- package/tailwind.base.config.js +3 -0
- package/tailwind.base.css +1 -13
- package/translations/de.json +8 -1
- package/translations/en.json +10 -1
- package/translations/es.json +8 -1
- package/translations/fr.json +11 -2
- package/translations/it.json +8 -1
- package/translations/nl.json +8 -1
- package/translations/pt.json +8 -1
- package/translations/sk.json +8 -1
- package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +0 -18
- package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts +0 -9
- package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts.map +0 -1
- package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.html +0 -4
- package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.ts +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-layout.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/layout/src/lib/ui-layout.module.ts"],"names":[],"mappings":";;;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"ui-layout.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/layout/src/lib/ui-layout.module.ts"],"names":[],"mappings":";;;;;;AAOA,qBAMa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spatial-extent.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGlC,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;;AAEnG,qBAOa,sBAAsB;IACjC,IAAa,cAAc,CAAC,KAAK,EAAE,oBAAoB,EAAE,EAExD;IACD,eAAe,0CAAkD;IACjE,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"spatial-extent.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGlC,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;;AAEnG,qBAOa,sBAAsB;IACjC,IAAa,cAAc,CAAC,KAAK,EAAE,oBAAoB,EAAE,EAExD;IACD,eAAe,0CAAkD;IACjE,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC,CAyClC;IAED,KAAK,SAAK;IAEV,oBAAoB,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ;yCAlD3D,sBAAsB;2CAAtB,sBAAsB;CA+DlC"}
|
|
@@ -16,6 +16,7 @@ export * from './lib/record-preview-text/record-preview-text.component';
|
|
|
16
16
|
export * from './lib/record-preview-title/record-preview-title.component';
|
|
17
17
|
export * from './lib/record-metric/record-metric.component';
|
|
18
18
|
export * from './lib/results-list-item/results-list-item.component';
|
|
19
|
+
export * from './lib/results-hits-search-kind/results-hits-search-kind.component';
|
|
19
20
|
export * from './lib/results-hits-number/results-hits-number.component';
|
|
20
21
|
export * from './lib/results-table/results-table.component';
|
|
21
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/search/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3E,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,wBAAwB,CAAA;AACtC,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AACzD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,yDAAyD,CAAA;AACvE,cAAc,uDAAuD,CAAA;AACrE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,qDAAqD,CAAA;AACnE,cAAc,yDAAyD,CAAA;AACvE,cAAc,6CAA6C,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/search/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3E,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,wBAAwB,CAAA;AACtC,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AACzD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,yDAAyD,CAAA;AACvE,cAAc,uDAAuD,CAAA;AACrE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,qDAAqD,CAAA;AACnE,cAAc,mEAAmE,CAAA;AACjF,cAAc,yDAAyD,CAAA;AACvE,cAAc,6CAA6C,CAAA"}
|
package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Choice } from '../../../../../../libs/ui/inputs/src';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ResultsHitsSearchKindComponent implements OnChanges {
|
|
5
|
+
selected: string[];
|
|
6
|
+
choices: Choice[];
|
|
7
|
+
selectionChanged: EventEmitter<string[]>;
|
|
8
|
+
availableChoices: Choice[];
|
|
9
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
+
buildFilterChoices(availableValues: Choice[]): Choice[];
|
|
11
|
+
onSelectedValues(values: string[]): void;
|
|
12
|
+
isSelectedChoice(choiceValue: string): boolean;
|
|
13
|
+
isAllChoice(choiceValue: string): boolean;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResultsHitsSearchKindComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResultsHitsSearchKindComponent, "gn-ui-results-hits-search-kind", never, { "selected": { "alias": "selected"; "required": false; }; "choices": { "alias": "choices"; "required": false; }; }, { "selectionChanged": "selectionChanged"; }, never, never, false, never>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=results-hits-search-kind.component.d.ts.map
|
package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"results-hits-search-kind.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAEZ,SAAS,EACT,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAA;;AAE7D,qBAIa,8BAA+B,YAAW,SAAS;IACrD,QAAQ,EAAE,MAAM,EAAE,CAAK;IACvB,OAAO,EAAE,MAAM,EAAE,CAAK;IACrB,gBAAgB,yBAA+B;IAEzD,gBAAgB,EAAE,MAAM,EAAE,CAAK;IAE/B,WAAW,CAAC,OAAO,EAAE,aAAa;IAMlC,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE;IAY5C,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE;IAMjC,gBAAgB,CAAC,WAAW,EAAE,MAAM;IAIpC,WAAW,CAAC,WAAW,EAAE,MAAM;yCAnCpB,8BAA8B;2CAA9B,8BAA8B;CAsC1C"}
|
|
@@ -7,27 +7,29 @@ import * as i5 from "./record-preview-title/record-preview-title.component";
|
|
|
7
7
|
import * as i6 from "./record-metric/record-metric.component";
|
|
8
8
|
import * as i7 from "./results-list/results-list.component";
|
|
9
9
|
import * as i8 from "./results-hits-number/results-hits-number.component";
|
|
10
|
-
import * as i9 from "./results-
|
|
11
|
-
import * as i10 from "./
|
|
12
|
-
import * as i11 from "./record-preview-
|
|
13
|
-
import * as i12 from "
|
|
14
|
-
import * as i13 from "@
|
|
15
|
-
import * as i14 from "ngx-
|
|
16
|
-
import * as i15 from "
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "
|
|
19
|
-
import * as i18 from "
|
|
20
|
-
import * as i19 from "
|
|
21
|
-
import * as i20 from "../../../
|
|
22
|
-
import * as i21 from "../../../
|
|
23
|
-
import * as i22 from "
|
|
24
|
-
import * as i23 from "@angular/
|
|
25
|
-
import * as i24 from "
|
|
26
|
-
import * as i25 from "
|
|
27
|
-
import * as i26 from "
|
|
10
|
+
import * as i9 from "./results-hits-search-kind/results-hits-search-kind.component";
|
|
11
|
+
import * as i10 from "./results-list-item/results-list-item.component";
|
|
12
|
+
import * as i11 from "./record-preview-feed/record-preview-feed.component";
|
|
13
|
+
import * as i12 from "./record-preview-row/record-preview-row.component";
|
|
14
|
+
import * as i13 from "@angular/common";
|
|
15
|
+
import * as i14 from "@ngx-translate/core";
|
|
16
|
+
import * as i15 from "ngx-dropzone";
|
|
17
|
+
import * as i16 from "./facets/facets.module";
|
|
18
|
+
import * as i17 from "@angular/forms";
|
|
19
|
+
import * as i18 from "ngx-chips";
|
|
20
|
+
import * as i19 from "../../../../util/shared/src/lib/util-shared.module";
|
|
21
|
+
import * as i20 from "../../../widgets/src/lib/ui-widgets.module";
|
|
22
|
+
import * as i21 from "../../../inputs/src/lib/ui-inputs.module";
|
|
23
|
+
import * as i22 from "../../../elements/src/lib/ui-elements.module";
|
|
24
|
+
import * as i23 from "@angular/material/checkbox";
|
|
25
|
+
import * as i24 from "@angular/router";
|
|
26
|
+
import * as i25 from "../../../layout/src/lib/interactive-table/interactive-table.component";
|
|
27
|
+
import * as i26 from "@ng-icons/core";
|
|
28
|
+
import * as i27 from "../../../elements/src/lib/kind-badge/kind-badge.component";
|
|
29
|
+
import * as i28 from "../../../elements/src/lib/metadata-quality/metadata-quality.component";
|
|
28
30
|
export declare class UiSearchModule {
|
|
29
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiSearchModule, never>;
|
|
30
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<UiSearchModule, [typeof i1.RecordPreviewComponent, typeof i2.RecordPreviewListComponent, typeof i3.RecordPreviewCardComponent, typeof i4.RecordPreviewTextComponent, typeof i5.RecordPreviewTitleComponent, typeof i6.RecordMetricComponent, typeof i7.ResultsListComponent, typeof i8.ResultsHitsNumberComponent, typeof i9.
|
|
32
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UiSearchModule, [typeof i1.RecordPreviewComponent, typeof i2.RecordPreviewListComponent, typeof i3.RecordPreviewCardComponent, typeof i4.RecordPreviewTextComponent, typeof i5.RecordPreviewTitleComponent, typeof i6.RecordMetricComponent, typeof i7.ResultsListComponent, typeof i8.ResultsHitsNumberComponent, typeof i9.ResultsHitsSearchKindComponent, typeof i10.ResultsListItemComponent, typeof i11.RecordPreviewFeedComponent, typeof i12.RecordPreviewRowComponent], [typeof i13.CommonModule, typeof i14.TranslateModule, typeof i15.NgxDropzoneModule, typeof i16.FacetsModule, typeof i17.FormsModule, typeof i17.ReactiveFormsModule, typeof i18.TagInputModule, typeof i19.UtilSharedModule, typeof i20.UiWidgetsModule, typeof i21.UiInputsModule, typeof i22.UiElementsModule, typeof i23.MatCheckboxModule, typeof i24.RouterLink, typeof i25.InteractiveTableComponent, typeof i26.NgIconsModule, typeof i27.KindBadgeComponent, typeof i28.MetadataQualityComponent], [typeof i2.RecordPreviewListComponent, typeof i3.RecordPreviewCardComponent, typeof i4.RecordPreviewTextComponent, typeof i5.RecordPreviewTitleComponent, typeof i6.RecordMetricComponent, typeof i7.ResultsListComponent, typeof i16.FacetsModule, typeof i1.RecordPreviewComponent, typeof i8.ResultsHitsNumberComponent, typeof i9.ResultsHitsSearchKindComponent, typeof i11.RecordPreviewFeedComponent, typeof i12.RecordPreviewRowComponent]>;
|
|
31
33
|
static ɵinj: i0.ɵɵInjectorDeclaration<UiSearchModule>;
|
|
32
34
|
}
|
|
33
35
|
//# sourceMappingURL=ui-search.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-search.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/search/src/lib/ui-search.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui-search.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/search/src/lib/ui-search.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,qBA6Da,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
|
package/package.json
CHANGED
|
@@ -4,23 +4,37 @@ import {
|
|
|
4
4
|
ReuseType,
|
|
5
5
|
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
export const PossibleResourceTypes = {
|
|
8
|
+
application: 'reuse',
|
|
9
|
+
dataset: 'dataset',
|
|
10
|
+
interactiveMap: 'reuse',
|
|
11
|
+
map: 'reuse',
|
|
12
|
+
'map/static': 'reuse', // old index field
|
|
13
|
+
'map/interactive': 'reuse', // old index field
|
|
14
|
+
'map-interactive': 'reuse', // new index field since Oct 10, 2024
|
|
15
|
+
'map-static': 'reuse', // new index field
|
|
16
|
+
mapDigital: 'reuse',
|
|
17
|
+
series: 'dataset',
|
|
18
|
+
service: 'service',
|
|
19
|
+
staticMap: 'reuse',
|
|
20
|
+
} as const
|
|
21
|
+
|
|
22
|
+
type KindType = keyof typeof PossibleResourceTypes
|
|
23
|
+
type ResourceType = 'reuse' | 'dataset' | 'service'
|
|
24
|
+
type PossibleResourceTypesGrouped = {
|
|
25
|
+
[K in ResourceType]: KindType[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const PossibleResourceTypesDefinition = Object.entries(
|
|
29
|
+
PossibleResourceTypes
|
|
30
|
+
).reduce(
|
|
31
|
+
(acc, [key, val]) => ((acc[val] ??= []).push(key), acc),
|
|
32
|
+
{}
|
|
33
|
+
) as PossibleResourceTypesGrouped
|
|
21
34
|
|
|
35
|
+
export function getResourceType(type: string): RecordKind {
|
|
22
36
|
return (
|
|
23
|
-
|
|
37
|
+
PossibleResourceTypes[type as keyof typeof PossibleResourceTypes] ||
|
|
24
38
|
'dataset'
|
|
25
39
|
)
|
|
26
40
|
}
|
|
@@ -11,3 +11,4 @@ export * from './lib/components/wizard/wizard.component'
|
|
|
11
11
|
export * from './lib/components/wizard-field/wizard-field.component'
|
|
12
12
|
export * from './lib/components/wizard-summarize/wizard-summarize.component'
|
|
13
13
|
export * from './lib/components/record-form/form-field'
|
|
14
|
+
export * from './lib/components/multilingual-panel/multilingual-panel.component'
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="flex flex-col h-full w-[302px] bg-neutral-100 border-l border-gray-300 py-9 px-3 gap-8"
|
|
3
|
+
>
|
|
4
|
+
<span class="text-3xl font-title text-black/80 px-2" translate
|
|
5
|
+
>editor.record.form.multilingual.title</span
|
|
6
|
+
>
|
|
7
|
+
<gn-ui-check-toggle
|
|
8
|
+
class="p-2"
|
|
9
|
+
[label]="'editor.record.form.multilingual.enable' | translate"
|
|
10
|
+
[color]="'primary'"
|
|
11
|
+
[value]="translationsEnabled"
|
|
12
|
+
(toggled)="translationsEnabled = $event"
|
|
13
|
+
></gn-ui-check-toggle>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import { CheckToggleComponent } from '../../../../../../../libs/ui/inputs/src'
|
|
4
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'gn-ui-multilingual-panel',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [CommonModule, CheckToggleComponent, TranslateModule],
|
|
10
|
+
templateUrl: './multilingual-panel.component.html',
|
|
11
|
+
styleUrl: './multilingual-panel.component.css',
|
|
12
|
+
})
|
|
13
|
+
export class MultilingualPanelComponent {
|
|
14
|
+
translationsEnabled = false
|
|
15
|
+
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
<div class="w-full h-full flex flex-col
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<div class="w-full h-full flex flex-col gap-[13px]">
|
|
2
|
+
<div
|
|
3
|
+
class="w-full py-4 px-5 bg-white border border-color-border rounded-lg mt-6"
|
|
4
|
+
>
|
|
5
|
+
<gn-ui-dropdown-selector
|
|
6
|
+
*ngIf="dropdownChoices$ | async as choices"
|
|
7
|
+
[ngClass]="{ hidden: !displaySource }"
|
|
8
|
+
[title]="'table.select.data' | translate"
|
|
9
|
+
class="h-[44px] w-full"
|
|
10
|
+
extraBtnClass="font-sans font-bold"
|
|
11
|
+
[choices]="choices"
|
|
12
|
+
(selectValue)="selectLink($event)"
|
|
13
|
+
></gn-ui-dropdown-selector>
|
|
14
|
+
</div>
|
|
11
15
|
<ng-container *ngIf="hidePreview; else dataView">
|
|
12
16
|
<gn-ui-popup-alert
|
|
13
17
|
type="warning"
|
package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<gn-ui-button
|
|
2
2
|
*ngIf="externalViewer"
|
|
3
3
|
(buttonClick)="openInExternalViewer()"
|
|
4
|
-
type="
|
|
4
|
+
type="primary"
|
|
5
5
|
[title]="'record.externalViewer.open' | translate"
|
|
6
|
-
extraClass="ms-2 !rounded-lg"
|
|
6
|
+
[extraClass]="extraClass + 'bg-primary ms-2 !rounded-lg'"
|
|
7
7
|
>
|
|
8
8
|
<ng-icon name="matOpenInNew"></ng-icon>
|
|
9
9
|
</gn-ui-button>
|
package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts
CHANGED
|
@@ -36,6 +36,7 @@ export const EXTERNAL_VIEWER_OPEN_NEW_TAB = new InjectionToken<boolean>(
|
|
|
36
36
|
})
|
|
37
37
|
export class ExternalViewerButtonComponent {
|
|
38
38
|
@Input() link: DatasetOnlineResource
|
|
39
|
+
@Input() extraClass = ''
|
|
39
40
|
|
|
40
41
|
get externalViewer() {
|
|
41
42
|
return !!this.urlTemplate && !!this.supportedLinkLayerType
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
<div class="w-full h-full flex flex-col
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
>
|
|
15
|
-
|
|
1
|
+
<div class="w-full h-full flex flex-col gap-[13px]">
|
|
2
|
+
<div
|
|
3
|
+
class="flex py-4 px-5 bg-white border border-color-border rounded-lg mt-6"
|
|
4
|
+
>
|
|
5
|
+
<div class="grow min-w-0">
|
|
6
|
+
<gn-ui-dropdown-selector
|
|
7
|
+
[ngClass]="{ hidden: !displaySource }"
|
|
8
|
+
class="w-full"
|
|
9
|
+
extraBtnClass="font-sans font-bold"
|
|
10
|
+
[title]="'map.select.layer' | translate"
|
|
11
|
+
[choices]="dropdownChoices$ | async"
|
|
12
|
+
(selectValue)="selectLinkToDisplay($event)"
|
|
13
|
+
></gn-ui-dropdown-selector>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="self-end">
|
|
16
|
+
<gn-ui-external-viewer-button
|
|
17
|
+
extraClass="w-[44px] h-[44px]"
|
|
18
|
+
[link]="selectedLink$ | async"
|
|
19
|
+
>
|
|
20
|
+
</gn-ui-external-viewer-button>
|
|
21
|
+
</div>
|
|
16
22
|
</div>
|
|
17
23
|
<ng-container *ngIf="hidePreview; else mapView">
|
|
18
24
|
<gn-ui-popup-alert
|
|
@@ -17,7 +17,7 @@ export * from './lib/facets/facets.module'
|
|
|
17
17
|
export * from './lib/facets/facets-container/facets-container.component'
|
|
18
18
|
export * from './lib/records-metrics/records-metrics.component'
|
|
19
19
|
export * from './lib/favorites/favorite-star/favorite-star.component'
|
|
20
|
-
export * from './lib/results-hits
|
|
20
|
+
export * from './lib/results-hits/results-hits.container.component'
|
|
21
21
|
export * from './lib/results-layout/results-layout.component'
|
|
22
22
|
export * from './lib/sort-by/sort-by.component'
|
|
23
23
|
export * from './lib/state/container/search-state.container.directive'
|
|
@@ -4,6 +4,7 @@ import { UiSearchModule } from '../../../../../libs/ui/search/src'
|
|
|
4
4
|
import { EffectsModule } from '@ngrx/effects'
|
|
5
5
|
import { StoreModule } from '@ngrx/store'
|
|
6
6
|
import { TranslateModule } from '@ngx-translate/core'
|
|
7
|
+
import { NgIconsModule } from '@ng-icons/core'
|
|
7
8
|
import { FacetsModule } from './facets/facets.module'
|
|
8
9
|
import { FuzzySearchComponent } from './fuzzy-search/fuzzy-search.component'
|
|
9
10
|
import { RecordsMetricsComponent } from './records-metrics/records-metrics.component'
|
|
@@ -12,7 +13,7 @@ import { ResultsListContainerComponent } from './results-list/results-list.conta
|
|
|
12
13
|
import { SortByComponent } from './sort-by/sort-by.component'
|
|
13
14
|
import { SearchEffects } from './state/effects'
|
|
14
15
|
import { initialState, reducer, SEARCH_FEATURE_KEY } from './state/reducer'
|
|
15
|
-
import { ResultsHitsContainerComponent } from './results-hits
|
|
16
|
+
import { ResultsHitsContainerComponent } from './results-hits/results-hits.container.component'
|
|
16
17
|
import { SearchStateContainerDirective } from './state/container/search-state.container.directive'
|
|
17
18
|
import {
|
|
18
19
|
AutocompleteComponent,
|
|
@@ -20,7 +21,11 @@ import {
|
|
|
20
21
|
UiInputsModule,
|
|
21
22
|
} from '../../../../../libs/ui/inputs/src'
|
|
22
23
|
import { NgModule } from '@angular/core'
|
|
23
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
ErrorComponent,
|
|
26
|
+
KindBadgeComponent,
|
|
27
|
+
UiElementsModule,
|
|
28
|
+
} from '../../../../../libs/ui/elements/src'
|
|
24
29
|
import { FilterDropdownComponent } from './filter-dropdown/filter-dropdown.component'
|
|
25
30
|
import {
|
|
26
31
|
SpinningLoaderComponent,
|
|
@@ -58,6 +63,8 @@ import { FavoriteStarComponent } from './favorites/favorite-star/favorite-star.c
|
|
|
58
63
|
ErrorComponent,
|
|
59
64
|
FavoriteStarComponent,
|
|
60
65
|
DateRangeDropdownComponent,
|
|
66
|
+
NgIconsModule,
|
|
67
|
+
KindBadgeComponent,
|
|
61
68
|
],
|
|
62
69
|
exports: [
|
|
63
70
|
SortByComponent,
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="flex flex-col gap-3 sm:flex-row justify-between"
|
|
3
|
+
[ngClass]="{
|
|
4
|
+
'sm:items-center': (searchFacade.resultsHits$ | async) !== 0,
|
|
5
|
+
}"
|
|
6
|
+
>
|
|
7
|
+
<gn-ui-results-hits-number
|
|
8
|
+
[loading]="searchFacade.isLoading$ | async"
|
|
9
|
+
[hits]="searchFacade.resultsHits$ | async"
|
|
10
|
+
></gn-ui-results-hits-number>
|
|
11
|
+
<gn-ui-results-hits-search-kind
|
|
12
|
+
(selectionChanged)="onSelectionChanged($event)"
|
|
13
|
+
[choices]="filterChoices$ | async"
|
|
14
|
+
[selected]="selected$ | async"
|
|
15
|
+
></gn-ui-results-hits-search-kind>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError,
|
|
3
|
+
filter,
|
|
4
|
+
map,
|
|
5
|
+
Observable,
|
|
6
|
+
of,
|
|
7
|
+
startWith,
|
|
8
|
+
switchMap,
|
|
9
|
+
} from 'rxjs'
|
|
10
|
+
import { Component, OnInit } from '@angular/core'
|
|
11
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
12
|
+
import { SearchFacade } from '../state/search.facade'
|
|
13
|
+
import { FieldAvailableValue, FieldValue } from '../utils/service/fields'
|
|
14
|
+
import { SearchService } from '../utils/service/search.service'
|
|
15
|
+
import { FieldsService } from '../utils/service/fields.service'
|
|
16
|
+
|
|
17
|
+
marker('search.filters.recordKind.all')
|
|
18
|
+
marker('search.filters.recordKind.dataset')
|
|
19
|
+
marker('search.filters.recordKind.service')
|
|
20
|
+
marker('search.filters.recordKind.reuse')
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
selector: 'gn-ui-results-hits',
|
|
24
|
+
templateUrl: './results-hits.container.component.html',
|
|
25
|
+
styleUrls: ['./results-hits.container.component.css'],
|
|
26
|
+
})
|
|
27
|
+
export class ResultsHitsContainerComponent implements OnInit {
|
|
28
|
+
fieldName = 'recordKind'
|
|
29
|
+
filterChoices$: Observable<FieldAvailableValue[]>
|
|
30
|
+
selected$: Observable<FieldValue[]>
|
|
31
|
+
|
|
32
|
+
constructor(
|
|
33
|
+
protected searchFacade: SearchFacade,
|
|
34
|
+
private searchService: SearchService,
|
|
35
|
+
private fieldsService: FieldsService
|
|
36
|
+
) {}
|
|
37
|
+
|
|
38
|
+
ngOnInit() {
|
|
39
|
+
this.selected$ = this.searchFacade.searchFilters$.pipe(
|
|
40
|
+
switchMap((filters) =>
|
|
41
|
+
this.fieldsService.readFieldValuesFromFilters(filters)
|
|
42
|
+
),
|
|
43
|
+
map((fieldValues) => fieldValues[this.fieldName]),
|
|
44
|
+
filter((selected) => !!selected),
|
|
45
|
+
startWith([]),
|
|
46
|
+
catchError(() => of([]))
|
|
47
|
+
) as Observable<FieldValue[]>
|
|
48
|
+
|
|
49
|
+
this.filterChoices$ = <Observable<FieldAvailableValue[]>>(
|
|
50
|
+
this.fieldsService.getAvailableValues(this.fieldName)
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
onSelectionChanged(values: string[]) {
|
|
55
|
+
this.fieldsService
|
|
56
|
+
.buildFiltersFromFieldValues({ [this.fieldName]: values })
|
|
57
|
+
.subscribe((filters) => this.searchService.updateFilters(filters))
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -10,8 +10,10 @@ import {
|
|
|
10
10
|
MultilingualSearchField,
|
|
11
11
|
OrganizationSearchField,
|
|
12
12
|
OwnerSearchField,
|
|
13
|
+
ResourceTypeLegacyField,
|
|
13
14
|
SimpleSearchField,
|
|
14
15
|
TranslatedSearchField,
|
|
16
|
+
RecordKindField,
|
|
15
17
|
UserSearchField,
|
|
16
18
|
} from './fields'
|
|
17
19
|
import { forkJoin, Observable, of } from 'rxjs'
|
|
@@ -47,11 +49,8 @@ export class FieldsService {
|
|
|
47
49
|
protected fields = {
|
|
48
50
|
organization: new OrganizationSearchField(this.injector),
|
|
49
51
|
format: new SimpleSearchField('format', this.injector, 'asc'),
|
|
50
|
-
resourceType: new
|
|
51
|
-
|
|
52
|
-
this.injector,
|
|
53
|
-
'asc'
|
|
54
|
-
),
|
|
52
|
+
resourceType: new ResourceTypeLegacyField(this.injector), // Deprecated, use `recordKind` instead
|
|
53
|
+
recordKind: new RecordKindField(this.injector),
|
|
55
54
|
representationType: new TranslatedSearchField(
|
|
56
55
|
'cl_spatialRepresentationType.key',
|
|
57
56
|
this.injector,
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
} from '../../../../../../../libs/api/repository/src'
|
|
23
23
|
import { LangService } from '../../../../../../../libs/util/i18n/src'
|
|
24
24
|
import { formatUserInfo } from '../../../../../../../libs/util/shared/src'
|
|
25
|
+
import { PossibleResourceTypes } from '../../../../../../../libs/api/metadata-converter/src'
|
|
25
26
|
|
|
26
27
|
export type FieldType = 'values' | 'dateRange'
|
|
27
28
|
|
|
@@ -29,6 +30,7 @@ export type FieldValue = string | number
|
|
|
29
30
|
export interface FieldAvailableValue {
|
|
30
31
|
value: FieldValue
|
|
31
32
|
label: string
|
|
33
|
+
count?: number
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export abstract class AbstractSearchField {
|
|
@@ -80,6 +82,7 @@ export class SimpleSearchField implements AbstractSearchField {
|
|
|
80
82
|
const bucketPromises = buckets.map(async (bucket) => ({
|
|
81
83
|
label: `${await this.getBucketLabel(bucket)} (${bucket.count})`,
|
|
82
84
|
value: bucket.term.toString(),
|
|
85
|
+
count: bucket.count,
|
|
83
86
|
}))
|
|
84
87
|
return Promise.all(bucketPromises)
|
|
85
88
|
})
|
|
@@ -480,3 +483,99 @@ export class AvailableServicesField extends SimpleSearchField {
|
|
|
480
483
|
return of(values)
|
|
481
484
|
}
|
|
482
485
|
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* This class is meant to be used with the legacy filter on `resourceType` (now deprecated, the use of `recordKind` field is recommended).
|
|
489
|
+
* Since creating filters on the same ES field is not possible, in order to make the resource type filter still working,
|
|
490
|
+
* we create an ES on the fly: `resourceTypeLegacy` that references the `resourceType` under the hood.
|
|
491
|
+
* @deprecated Use `recordKind` field instead.
|
|
492
|
+
*/
|
|
493
|
+
export class ResourceTypeLegacyField extends TranslatedSearchField {
|
|
494
|
+
constructor(injector: Injector) {
|
|
495
|
+
super('resourceTypeLegacy', injector, 'asc')
|
|
496
|
+
|
|
497
|
+
// Ask ES to create a field on the fly: 'resourceTypeLegacy' that is in fact, 'resourceType'
|
|
498
|
+
this.esService.registerRuntimeField(
|
|
499
|
+
'resourceTypeLegacy',
|
|
500
|
+
`for (resourceType in doc.resourceType) { emit(resourceType) }`
|
|
501
|
+
)
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export class RecordKindField extends SimpleSearchField {
|
|
506
|
+
TYPE_MAPPING = {
|
|
507
|
+
dataset: ['dataset', 'series', 'featureCatalog'],
|
|
508
|
+
service: ['service'],
|
|
509
|
+
reuse: Object.entries(PossibleResourceTypes)
|
|
510
|
+
.filter(([_, v]) => v === 'reuse')
|
|
511
|
+
.map(([k]) => k), // = ['application', 'map', 'staticMap', 'interactiveMap', ...]
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
constructor(injector: Injector) {
|
|
515
|
+
super('resourceType', injector, 'asc')
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
getAvailableValues(): Observable<FieldAvailableValue[]> {
|
|
519
|
+
return this.repository.aggregate(this.getAggregations()).pipe(
|
|
520
|
+
map(
|
|
521
|
+
(response) =>
|
|
522
|
+
(response[this.esFieldName] as AggregationBuckets).buckets || []
|
|
523
|
+
),
|
|
524
|
+
map((buckets: TermBucket[]) => {
|
|
525
|
+
const counts = buckets.reduce(
|
|
526
|
+
(acc, { term, count }) => {
|
|
527
|
+
const value = term.toString()
|
|
528
|
+
const key = this.TYPE_MAPPING.reuse.includes(value)
|
|
529
|
+
? 'reuse'
|
|
530
|
+
: this.TYPE_MAPPING.dataset.includes(value)
|
|
531
|
+
? 'dataset'
|
|
532
|
+
: value
|
|
533
|
+
|
|
534
|
+
acc[key] = (acc[key] || 0) + count
|
|
535
|
+
return acc
|
|
536
|
+
},
|
|
537
|
+
{} as Record<string, number>
|
|
538
|
+
)
|
|
539
|
+
|
|
540
|
+
return Object.keys(this.TYPE_MAPPING).map((type) => ({
|
|
541
|
+
label: type,
|
|
542
|
+
value: type,
|
|
543
|
+
count: counts[type] ?? 0,
|
|
544
|
+
}))
|
|
545
|
+
})
|
|
546
|
+
)
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
getFiltersForValues(values: FieldValue[]): Observable<FieldFilters> {
|
|
550
|
+
const filters = {
|
|
551
|
+
[this.esFieldName]: values.reduce((acc, value) => {
|
|
552
|
+
if (value === '') return { ...acc, [value]: true }
|
|
553
|
+
|
|
554
|
+
const keysToAdd = this.TYPE_MAPPING[value] || [value]
|
|
555
|
+
keysToAdd.forEach((key: string) => (acc[key] = true))
|
|
556
|
+
|
|
557
|
+
return acc
|
|
558
|
+
}, {}),
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
return of(filters)
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
getValuesForFilter(filters: FieldFilters): Observable<FieldValue[]> {
|
|
565
|
+
const filter = filters[this.esFieldName]
|
|
566
|
+
if (!filter) return of([])
|
|
567
|
+
|
|
568
|
+
const activeValues = Object.keys(filter).filter((v) => filter[v])
|
|
569
|
+
const activeTypes = Object.keys(this.TYPE_MAPPING).filter((type) =>
|
|
570
|
+
this.TYPE_MAPPING[type].every((t: string) => activeValues.includes(t))
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
// Allow unknown values eg. 'type=somethingnotexist' (for UI to select none)
|
|
574
|
+
const allTypes = [].concat(...Object.values(this.TYPE_MAPPING))
|
|
575
|
+
const unknownValues = activeValues.filter(
|
|
576
|
+
(value) => !allTypes.includes(value)
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
return of([...activeTypes, ...unknownValues])
|
|
580
|
+
}
|
|
581
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from './lib/downloads-list/downloads-list.component'
|
|
|
7
7
|
export * from './lib/error/error.component'
|
|
8
8
|
export * from './lib/image-input/image-input.component'
|
|
9
9
|
export * from './lib/image-overlay-preview/image-overlay-preview.component'
|
|
10
|
+
export * from './lib/kind-badge/kind-badge.component'
|
|
10
11
|
export * from './lib/link-card/link-card.component'
|
|
11
12
|
export * from './lib/markdown-editor/markdown-editor.component'
|
|
12
13
|
export * from './lib/markdown-parser/markdown-parser.component'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="group flex justify-between rounded filter overflow-hidden"
|
|
2
|
+
class="group flex justify-between rounded filter overflow-hidden card-shadow"
|
|
3
3
|
[ngClass]="cardClass"
|
|
4
4
|
>
|
|
5
5
|
<ng-container *ngIf="size !== 'S'">
|
|
6
|
-
<div>
|
|
6
|
+
<div class="flex-1 min-w-0">
|
|
7
7
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="flex items-center">
|
|
9
|
+
<div class="flex items-center min-w-[32px]">
|
|
10
10
|
<ng-container *ngTemplateOutlet="buttons"></ng-container>
|
|
11
11
|
</div>
|
|
12
12
|
</ng-container>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</ng-template>
|
|
52
52
|
|
|
53
53
|
<ng-template #content>
|
|
54
|
-
<div>
|
|
54
|
+
<div class="flex-1 min-w-0">
|
|
55
55
|
<div class="gn-ui-card-title">
|
|
56
56
|
{{ link.description || link.name }}
|
|
57
57
|
</div>
|