@provoly/dashboard 1.2.8 → 1.2.9
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/admin/admin.module.d.ts +16 -15
- package/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.d.ts +5 -16
- package/admin/components/admin-dataset/{shared/admin-form-dataset → admin-form-dataset}/admin-form-dataset.component.d.ts +8 -7
- package/admin/components/admin-dataset/store/admin-dataset.actions.d.ts +23 -18
- package/admin/components/admin-dataset/store/admin-dataset.effects.d.ts +9 -6
- package/admin/components/admin-dataset/store/admin-dataset.service.d.ts +2 -1
- package/admin/components/shared/add-category-modal/add-category-modal.component.d.ts +39 -0
- package/admin/i18n/en.translations.d.ts +23 -8
- package/admin/i18n/fr.translations.d.ts +23 -8
- package/dataset/components/dataset.component.d.ts +6 -2
- package/dataset/dataset.module.d.ts +1 -1
- package/dataset/i18n/en.translations.d.ts +8 -0
- package/dataset/i18n/fr.translations.d.ts +8 -0
- package/dataset/style/_o-pry-dataset-card.scss +19 -11
- package/dataset/style/_o-pry-dataset.scss +43 -11
- package/esm2022/admin/admin.module.mjs +7 -4
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +22 -53
- package/esm2022/admin/components/admin-dataset/admin-edit-dataset/admin-edit-dataset.component.mjs +1 -1
- package/esm2022/admin/components/admin-dataset/admin-form-dataset/admin-form-dataset.component.mjs +115 -0
- package/esm2022/admin/components/admin-dataset/admin-new-dataset/admin-new-dataset.component.mjs +1 -1
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +3 -3
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.actions.mjs +11 -10
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.effects.mjs +2 -1
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.service.mjs +10 -4
- package/esm2022/admin/components/shared/add-category-modal/add-category-modal.component.mjs +73 -0
- package/esm2022/admin/i18n/en.translations.mjs +25 -10
- package/esm2022/admin/i18n/fr.translations.mjs +26 -11
- package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +6 -6
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +3 -3
- package/esm2022/dataset/components/dataset.component.mjs +16 -6
- package/esm2022/dataset/dataset.module.mjs +8 -5
- package/esm2022/dataset/i18n/en.translations.mjs +9 -1
- package/esm2022/dataset/i18n/fr.translations.mjs +10 -2
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/lib/core/store/data-source/data-source.actions.mjs +4 -2
- package/esm2022/lib/core/store/data-source/data-source.effects.mjs +4 -1
- package/esm2022/lib/core/store/data-source/data-source.model.mjs +1 -1
- package/esm2022/lib/core/store/data-source/data-source.reducer.mjs +6 -2
- package/esm2022/lib/core/store/data-source/data-source.selectors.mjs +4 -2
- package/esm2022/lib/core/store/data-source/data-source.service.mjs +6 -1
- package/fesm2022/provoly-dashboard-admin.mjs +194 -105
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +45 -16
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +36 -4
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/store/data-source/data-source.actions.d.ts +7 -0
- package/lib/core/store/data-source/data-source.effects.d.ts +3 -0
- package/lib/core/store/data-source/data-source.model.d.ts +3 -0
- package/lib/core/store/data-source/data-source.reducer.d.ts +2 -0
- package/lib/core/store/data-source/data-source.selectors.d.ts +1 -0
- package/lib/core/store/data-source/data-source.service.d.ts +2 -0
- package/package.json +42 -42
- package/styles/base/_typography.scss +4 -0
- package/styles/base/_utils.scss +27 -1
- package/styles/components/_a-btn.scss +4 -0
- package/styles/components/_a-chip.scss +1 -0
- package/styles/components/_o-modal.scss +0 -42
- package/styles/layout/_o-base-layout.scss +1 -7
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +0 -99
|
@@ -5,21 +5,21 @@ import { Component, ViewEncapsulation, EventEmitter, Input, Output, Optional, In
|
|
|
5
5
|
import * as i3$1 from '@angular/forms';
|
|
6
6
|
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i3 from '@provoly/dashboard';
|
|
8
|
-
import { DataSourceSelectors, DateUtils, DataSourceActions, SubscriptionnerDirective, ViewMode, DashboardSelectors, DashboardActions, SearchActions, PRY_ACCESS_TOKEN, ClassActions, FieldActions, ConfigActions, PryIconModule, PryCoreModule, PryOverlayModule, PryI18nModule, PryDashboardModule, PryModalStatusModule } from '@provoly/dashboard';
|
|
8
|
+
import { DataSourceSelectors, DateUtils, DataSourceActions, SubscriptionnerDirective, ViewMode, DashboardSelectors, DashboardActions, SearchActions, PRY_ACCESS_TOKEN, ClassActions, FieldActions, ConfigActions, PryIconModule, PryCoreModule, PryOverlayModule, PryI18nModule, PryDashboardModule, PryModalStatusModule, PrySelectModule } from '@provoly/dashboard';
|
|
9
9
|
import * as i5 from '@provoly/dashboard/components/sinceDate';
|
|
10
10
|
import { PrySinceDateModule } from '@provoly/dashboard/components/sinceDate';
|
|
11
|
-
import { map, of, BehaviorSubject, combineLatest } from 'rxjs';
|
|
11
|
+
import { map, of, BehaviorSubject, Subject, combineLatest } from 'rxjs';
|
|
12
12
|
import * as i1 from '@ngrx/store';
|
|
13
13
|
import * as i4 from '@provoly/dashboard/components/text-editor';
|
|
14
14
|
import { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';
|
|
15
15
|
|
|
16
16
|
class PryDatasetCssComponent {
|
|
17
17
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetCssComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryDatasetCssComponent, selector: "pry-dataset-css", ngImport: i0, template: '', isInline: true, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.dataset-layout{
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryDatasetCssComponent, selector: "pry-dataset-css", ngImport: i0, template: '', isInline: true, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.o-dataset-layout{padding:.625rem 1.25rem 3.125rem}.o-dataset-layout__content{width:100%;height:100%;overflow:auto}.o-pry-dataset{display:grid;grid-template-columns:repeat(auto-fill,minmax(20.625rem,0fr));grid-gap:.625rem;column-gap:1.5rem;row-gap:2rem;padding-bottom:9.375rem}.o-pry-dataset__toolbox{width:100%}.o-pry-dataset__toolbox .a-label{font-size:1rem;font-weight:700}.o-pry-dataset__toolbox .a-form-field{padding-left:3.75rem}.o-pry-dataset__toolbox .a-pry-select{padding:.46875rem .625rem}.o-pry-dataset__toolbox .a-form-field,.o-pry-dataset__toolbox .a-pry-select{border-color:#113b6e;font-size:.75rem;border-radius:.3125rem;height:2.5rem}.o-pry-dataset__toolbox .a-form-field__placeholder,.o-pry-dataset__toolbox .a-form-field::placeholder,.o-pry-dataset__toolbox .a-pry-select__placeholder,.o-pry-dataset__toolbox .a-pry-select::placeholder{color:#7b96b2;font-style:italic}.o-pry-dataset__search{flex-basis:50%;position:relative}.o-pry-dataset__search .search-icon{position:absolute;left:1.25rem;bottom:.625rem;pointer-events:none;color:#113b6e}.o-pry-dataset__categories{flex-basis:50%}.o-pry-dataset__item{display:flex;flex-direction:column;align-items:stretch}.o-dataset-layout{position:relative;overflow:hidden;height:100%}\n", ".o-pry-dataset-card{display:flex;flex-direction:column;align-items:stretch;position:relative;margin:0 auto;border-collapse:collapse;font-size:.875rem;min-width:19.375rem;height:11.25rem}.o-pry-dataset-card:hover{cursor:pointer}.o-pry-dataset-card:hover .o-pry-dataset-card__footer pry-icon{visibility:visible;opacity:1}.o-pry-dataset-card__header{display:flex;gap:.9375rem;padding:.625rem;max-width:20.625rem}.o-pry-dataset-card__date{font-size:.6875rem}.o-pry-dataset-card__description{position:relative;width:100%}.o-pry-dataset-card__description.a-tooltip[data-tooltip]:after{width:100%}.o-pry-dataset-card__content{flex-grow:1;padding:0 .9375rem;font-size:.8125rem;margin-bottom:.625rem}.o-pry-dataset-card__content .a-h3{font-size:.875rem}.o-pry-dataset-card__content.-date{margin-bottom:0}.o-pry-dataset-card__categories{max-height:1.25rem;overflow:hidden}.o-pry-dataset-card__footer{display:flex;align-items:center;justify-content:center}.o-pry-dataset-card__footer .a-btn{margin-left:1.25rem}.o-pry-dataset-card__footer pry-icon{visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear;margin-left:.1875rem}.o-pry-dataset-card .dataset-name{width:16.875rem}.o-pry-dataset-card .dataset-name.a-tooltip[data-tooltip]:after{top:calc(100% - 15px);max-width:18.75rem;word-break:break-word}\n", "pry-dataset-detail .o-dataset-layout__panel .version-information h1,pry-dataset-detail .o-dataset-layout__panel .version-information h2,pry-dataset-detail .o-dataset-layout__panel .version-information h3,pry-dataset-detail .o-dataset-layout__panel .version-information h4,pry-dataset-detail .o-dataset-layout__panel .version-information h5,pry-dataset-detail .o-dataset-layout__panel .version-information h6{padding:0;margin:0;color:#253043}pry-dataset-detail .o-dataset-layout__panel .version-information h5{font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information span,pry-dataset-detail .o-dataset-layout__panel .version-information p{font-size:.875rem;color:#263340;white-space:pre-wrap}pry-dataset-detail .o-dataset-layout__panel .version-information div{padding-bottom:10px}pry-dataset-detail .o-dataset-layout__panel .version-information ul,pry-dataset-detail .o-dataset-layout__panel .version-information ol{margin:0;line-height:1rem}pry-dataset-detail .o-dataset-layout__panel .version-information li{color:#253043;font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information table{border-collapse:collapse}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr th{padding-top:.75rem;padding-bottom:.75rem;text-align:left}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr td{padding:.75rem .5rem;text-align:left}pry-dataset-detail{height:100%;width:100%}pry-dataset-detail .o-dataset-layout{display:flex}pry-dataset-detail .o-dataset-layout__content{overflow:hidden;height:100%;padding-left:2rem;padding-top:1.25rem;flex:1}pry-dataset-detail .o-dataset-layout__panel{width:20.625rem;border-left:solid 1px #D8E7F7;padding:.625rem;font-size:.875rem;color:#263340}pry-dataset-detail .o-dataset-layout__panel .a-label{font-weight:700}pry-dataset-detail .o-dataset-layout .panel__content{gap:.9375rem}pry-dataset-detail .dashboard-container{height:100%}pry-dataset-detail .table-container{flex:1 1}pry-dataset-detail .table-container pry-icon{position:relative;top:.3125rem}pry-dataset-detail .state-button{text-decoration:underline}pry-dataset-detail .m-info-icon{margin:0 .5rem}.o-dataset-detail{height:80%}.o-dataset-detail__content{height:100%;margin:0 2rem}.o-dataset-detail__information{padding:.625rem;font-size:.875rem;color:#263340;background:#fff;border-radius:4px;gap:.9375rem}.o-dataset-detail__information .a-label{font-weight:700}.o-dataset-detail pry-tab-group .o-tabs{height:100%}.o-dataset-detail pry-tab-group .o-tabs__panel__content{height:100%}.o-dataset-detail tr{height:1.875rem}.o-dataset-detail tr.-selected{background-color:#f5f7f9}.o-dataset-detail td .a-btn+.a-btn{margin-left:.625rem}\n", ".o-dataset-version-form .a-label{font-weight:700}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
19
19
|
}
|
|
20
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetCssComponent, decorators: [{
|
|
21
21
|
type: Component,
|
|
22
|
-
args: [{ selector: 'pry-dataset-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.dataset-layout{
|
|
22
|
+
args: [{ selector: 'pry-dataset-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.o-dataset-layout{padding:.625rem 1.25rem 3.125rem}.o-dataset-layout__content{width:100%;height:100%;overflow:auto}.o-pry-dataset{display:grid;grid-template-columns:repeat(auto-fill,minmax(20.625rem,0fr));grid-gap:.625rem;column-gap:1.5rem;row-gap:2rem;padding-bottom:9.375rem}.o-pry-dataset__toolbox{width:100%}.o-pry-dataset__toolbox .a-label{font-size:1rem;font-weight:700}.o-pry-dataset__toolbox .a-form-field{padding-left:3.75rem}.o-pry-dataset__toolbox .a-pry-select{padding:.46875rem .625rem}.o-pry-dataset__toolbox .a-form-field,.o-pry-dataset__toolbox .a-pry-select{border-color:#113b6e;font-size:.75rem;border-radius:.3125rem;height:2.5rem}.o-pry-dataset__toolbox .a-form-field__placeholder,.o-pry-dataset__toolbox .a-form-field::placeholder,.o-pry-dataset__toolbox .a-pry-select__placeholder,.o-pry-dataset__toolbox .a-pry-select::placeholder{color:#7b96b2;font-style:italic}.o-pry-dataset__search{flex-basis:50%;position:relative}.o-pry-dataset__search .search-icon{position:absolute;left:1.25rem;bottom:.625rem;pointer-events:none;color:#113b6e}.o-pry-dataset__categories{flex-basis:50%}.o-pry-dataset__item{display:flex;flex-direction:column;align-items:stretch}.o-dataset-layout{position:relative;overflow:hidden;height:100%}\n", ".o-pry-dataset-card{display:flex;flex-direction:column;align-items:stretch;position:relative;margin:0 auto;border-collapse:collapse;font-size:.875rem;min-width:19.375rem;height:11.25rem}.o-pry-dataset-card:hover{cursor:pointer}.o-pry-dataset-card:hover .o-pry-dataset-card__footer pry-icon{visibility:visible;opacity:1}.o-pry-dataset-card__header{display:flex;gap:.9375rem;padding:.625rem;max-width:20.625rem}.o-pry-dataset-card__date{font-size:.6875rem}.o-pry-dataset-card__description{position:relative;width:100%}.o-pry-dataset-card__description.a-tooltip[data-tooltip]:after{width:100%}.o-pry-dataset-card__content{flex-grow:1;padding:0 .9375rem;font-size:.8125rem;margin-bottom:.625rem}.o-pry-dataset-card__content .a-h3{font-size:.875rem}.o-pry-dataset-card__content.-date{margin-bottom:0}.o-pry-dataset-card__categories{max-height:1.25rem;overflow:hidden}.o-pry-dataset-card__footer{display:flex;align-items:center;justify-content:center}.o-pry-dataset-card__footer .a-btn{margin-left:1.25rem}.o-pry-dataset-card__footer pry-icon{visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear;margin-left:.1875rem}.o-pry-dataset-card .dataset-name{width:16.875rem}.o-pry-dataset-card .dataset-name.a-tooltip[data-tooltip]:after{top:calc(100% - 15px);max-width:18.75rem;word-break:break-word}\n", "pry-dataset-detail .o-dataset-layout__panel .version-information h1,pry-dataset-detail .o-dataset-layout__panel .version-information h2,pry-dataset-detail .o-dataset-layout__panel .version-information h3,pry-dataset-detail .o-dataset-layout__panel .version-information h4,pry-dataset-detail .o-dataset-layout__panel .version-information h5,pry-dataset-detail .o-dataset-layout__panel .version-information h6{padding:0;margin:0;color:#253043}pry-dataset-detail .o-dataset-layout__panel .version-information h5{font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information span,pry-dataset-detail .o-dataset-layout__panel .version-information p{font-size:.875rem;color:#263340;white-space:pre-wrap}pry-dataset-detail .o-dataset-layout__panel .version-information div{padding-bottom:10px}pry-dataset-detail .o-dataset-layout__panel .version-information ul,pry-dataset-detail .o-dataset-layout__panel .version-information ol{margin:0;line-height:1rem}pry-dataset-detail .o-dataset-layout__panel .version-information li{color:#253043;font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information table{border-collapse:collapse}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr th{padding-top:.75rem;padding-bottom:.75rem;text-align:left}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr td{padding:.75rem .5rem;text-align:left}pry-dataset-detail{height:100%;width:100%}pry-dataset-detail .o-dataset-layout{display:flex}pry-dataset-detail .o-dataset-layout__content{overflow:hidden;height:100%;padding-left:2rem;padding-top:1.25rem;flex:1}pry-dataset-detail .o-dataset-layout__panel{width:20.625rem;border-left:solid 1px #D8E7F7;padding:.625rem;font-size:.875rem;color:#263340}pry-dataset-detail .o-dataset-layout__panel .a-label{font-weight:700}pry-dataset-detail .o-dataset-layout .panel__content{gap:.9375rem}pry-dataset-detail .dashboard-container{height:100%}pry-dataset-detail .table-container{flex:1 1}pry-dataset-detail .table-container pry-icon{position:relative;top:.3125rem}pry-dataset-detail .state-button{text-decoration:underline}pry-dataset-detail .m-info-icon{margin:0 .5rem}.o-dataset-detail{height:80%}.o-dataset-detail__content{height:100%;margin:0 2rem}.o-dataset-detail__information{padding:.625rem;font-size:.875rem;color:#263340;background:#fff;border-radius:4px;gap:.9375rem}.o-dataset-detail__information .a-label{font-weight:700}.o-dataset-detail pry-tab-group .o-tabs{height:100%}.o-dataset-detail pry-tab-group .o-tabs__panel__content{height:100%}.o-dataset-detail tr{height:1.875rem}.o-dataset-detail tr.-selected{background-color:#f5f7f9}.o-dataset-detail td .a-btn+.a-btn{margin-left:.625rem}\n", ".o-dataset-version-form .a-label{font-weight:700}\n"] }]
|
|
23
23
|
}] });
|
|
24
24
|
|
|
25
25
|
class PryDatasetCardComponent {
|
|
@@ -43,11 +43,11 @@ class PryDatasetCardComponent {
|
|
|
43
43
|
this.consult.emit(this.dataset);
|
|
44
44
|
}
|
|
45
45
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetCardComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryDatasetCardComponent, selector: "pry-dataset-card", inputs: { dataset: "dataset" }, outputs: { consult: "consult" }, ngImport: i0, template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-pry-dataset-card\" (click)=\"goToDetailView()\">\n <div class=\"o-pry-dataset-card__header\">\n <img\n alt=\"\"\n [height]=\"25\"\n [width]=\"25\"\n [src]=\"dataset.id | translateId: { type: 'datasource', output: 'icon' } | async\"\n />\n <div class=\"dataset-name\" ellipsis textElementSelector=\".a-h4\">\n <h4 class=\"a-h4\">{{ dataset.name }}</h4>\n </div>\n </div>\n <div class=\"o-pry-dataset-card__content u-display-flex -column -gap-10\">\n @if (dataset.description) {\n <div class=\"o-pry-dataset-card__description\" ellipsis textElementSelector=\".description\">\n <div class=\"description\">{{ truncateDescription(dataset.description, 100) }}</div>\n </div>\n } @else {\n <div class=\"o-pry-dataset-card__description -italic\">{{ '@pry.dataset.noDescription' | i18n }}</div>\n }\n\n <span class=\"o-pry-dataset-card__date\">\n @if (activeVersion$ | async) {\n {{ '@pry.dataset.since_day' | i18n }} {{ (activeVersion$ | async)! | sinceDate }}\n } @else {\n <span class=\"-italic\">{{ '@pry.dataset.noActiveVersion' | i18n }}</span>\n }\n </span>\n @if (dataset.categories && dataset.categories.length > 0) {\n <div class=\"o-pry-dataset-card__categories u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\">{{ category.name }}</span>\n }\n </div>\n }\n </div>\n\n <div class=\"o-pry-dataset-card__footer\">\n <button class=\"a-btn\">\n {{ '@pry.dataset.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3.EllipsisDirective, selector: "[ellipsis]", inputs: ["textElementSelector"] }, { kind: "component", type: PryDatasetCssComponent, selector: "pry-dataset-css" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i5.PrySinceDatePipe, name: "sinceDate" }] }); }
|
|
47
47
|
}
|
|
48
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetCardComponent, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
|
-
args: [{ selector: 'pry-dataset-card', template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-pry-dataset-card\" (click)=\"goToDetailView()\">\n <div class=\"o-pry-dataset-card__header\">\n <img\n alt=\"\"\n [height]=\"25\"\n [width]=\"25\"\n [src]=\"dataset.id | translateId: { type: 'datasource', output: 'icon' } | async\"\n />\n <div class=\"
|
|
50
|
+
args: [{ selector: 'pry-dataset-card', template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-pry-dataset-card\" (click)=\"goToDetailView()\">\n <div class=\"o-pry-dataset-card__header\">\n <img\n alt=\"\"\n [height]=\"25\"\n [width]=\"25\"\n [src]=\"dataset.id | translateId: { type: 'datasource', output: 'icon' } | async\"\n />\n <div class=\"dataset-name\" ellipsis textElementSelector=\".a-h4\">\n <h4 class=\"a-h4\">{{ dataset.name }}</h4>\n </div>\n </div>\n <div class=\"o-pry-dataset-card__content u-display-flex -column -gap-10\">\n @if (dataset.description) {\n <div class=\"o-pry-dataset-card__description\" ellipsis textElementSelector=\".description\">\n <div class=\"description\">{{ truncateDescription(dataset.description, 100) }}</div>\n </div>\n } @else {\n <div class=\"o-pry-dataset-card__description -italic\">{{ '@pry.dataset.noDescription' | i18n }}</div>\n }\n\n <span class=\"o-pry-dataset-card__date\">\n @if (activeVersion$ | async) {\n {{ '@pry.dataset.since_day' | i18n }} {{ (activeVersion$ | async)! | sinceDate }}\n } @else {\n <span class=\"-italic\">{{ '@pry.dataset.noActiveVersion' | i18n }}</span>\n }\n </span>\n @if (dataset.categories && dataset.categories.length > 0) {\n <div class=\"o-pry-dataset-card__categories u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\">{{ category.name }}</span>\n }\n </div>\n }\n </div>\n\n <div class=\"o-pry-dataset-card__footer\">\n <button class=\"a-btn\">\n {{ '@pry.dataset.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n</div>\n" }]
|
|
51
51
|
}], ctorParameters: () => [{ type: i1.Store }], propDecorators: { dataset: [{
|
|
52
52
|
type: Input
|
|
53
53
|
}], consult: [{
|
|
@@ -275,11 +275,11 @@ class PryDatasetDetailComponent extends SubscriptionnerDirective {
|
|
|
275
275
|
$event?.stopPropagation();
|
|
276
276
|
}
|
|
277
277
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetDetailComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: { dataset: "dataset" }, outputs: { goToCatalog: "goToCatalog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersionId$ | async as activeVersionId\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersionId === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersionId === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n *ngIf=\"version.state !== 'DELETING'\"\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersionId) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n \"\n >\n <ng-container\n *ngIf=\"(canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\"\n >\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n \"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"], outputs: ["clickedTabIdx"] }, { kind: "component", type: i3.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i3.DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: i3.PryModalStatusComponent, selector: "pry-modal-status", inputs: ["version"], outputs: ["gotoConsult"] }, { kind: "component", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: ["version"], outputs: ["formValidated"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i5.PrySinceDatePipe, name: "sinceDate" }, { kind: "pipe", type: i4.MdToHtmlPipe, name: "mdToHtml" }] }); }
|
|
278
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: { dataset: "dataset" }, outputs: { goToCatalog: "goToCatalog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.tags' | i18n }}</span>\n <div class=\"u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\"> {{ category.name }}</span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersionId$ | async as activeVersionId\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersionId === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersionId === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n *ngIf=\"version.state !== 'DELETING'\"\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersionId) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n \"\n >\n <ng-container\n *ngIf=\"(canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\"\n >\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n \"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"], outputs: ["clickedTabIdx"] }, { kind: "component", type: i3.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i3.DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: i3.PryModalStatusComponent, selector: "pry-modal-status", inputs: ["version"], outputs: ["gotoConsult"] }, { kind: "component", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: ["version"], outputs: ["formValidated"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i5.PrySinceDatePipe, name: "sinceDate" }, { kind: "pipe", type: i4.MdToHtmlPipe, name: "mdToHtml" }] }); }
|
|
279
279
|
}
|
|
280
280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetDetailComponent, decorators: [{
|
|
281
281
|
type: Component,
|
|
282
|
-
args: [{ selector: 'pry-dataset-detail', template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersionId$ | async as activeVersionId\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersionId === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersionId === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n *ngIf=\"version.state !== 'DELETING'\"\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersionId) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n \"\n >\n <ng-container\n *ngIf=\"(canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\"\n >\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n \"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n" }]
|
|
282
|
+
args: [{ selector: 'pry-dataset-detail', template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.tags' | i18n }}</span>\n <div class=\"u-display-flex -wrap\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\"> {{ category.name }}</span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersionId$ | async as activeVersionId\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersionId === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersionId === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n *ngIf=\"version.state !== 'DELETING'\"\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersionId) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n version.state !== 'LOADING' &&\n version.state !== 'INDEXING' &&\n version.state !== 'ERROR' &&\n version.state !== 'DELETING'\n \"\n >\n <ng-container\n *ngIf=\"(canModify$ | async) && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\"\n >\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"\n (canModify$ | async) &&\n (version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE')\n \"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n" }]
|
|
283
283
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
284
284
|
type: Optional
|
|
285
285
|
}, {
|
|
@@ -299,14 +299,19 @@ class PryDatasetComponent extends SubscriptionnerDirective {
|
|
|
299
299
|
this.selectedMode = ViewMode.CATALOG;
|
|
300
300
|
this.ViewMode = ViewMode;
|
|
301
301
|
this.search$ = new BehaviorSubject('');
|
|
302
|
+
this.selectedCategories = [];
|
|
303
|
+
this.selectedCategories$ = new Subject();
|
|
302
304
|
this.store.dispatch(DataSourceActions.load());
|
|
303
305
|
this.store.dispatch(ClassActions.load());
|
|
304
306
|
this.store.dispatch(FieldActions.load());
|
|
305
307
|
this.store.dispatch(ConfigActions.loadCustomization());
|
|
306
308
|
this.datasets$ = this.store.select(DataSourceSelectors.datasets);
|
|
307
309
|
this.store.dispatch(DashboardActions.fetchManifestsList());
|
|
308
|
-
this.
|
|
309
|
-
|
|
310
|
+
this.store.dispatch(DataSourceActions.dataset.getCategories());
|
|
311
|
+
this.categories$ = this.store.select(DataSourceSelectors.categories);
|
|
312
|
+
this.filteredDatasets$ = combineLatest([this.datasets$, this.search$, this.selectedCategories$]).pipe(map(([datasets, search, selectedCategories]) => datasets
|
|
313
|
+
.filter((dataset) => (search.length === 0 || dataset.name.toLowerCase().includes(search.toLowerCase())) &&
|
|
314
|
+
(selectedCategories.length === 0 || this.doesDatasetMatchCategoryFilter(dataset, selectedCategories)))
|
|
310
315
|
.sort((a, b) => a.name.localeCompare(b.name))));
|
|
311
316
|
this.store.dispatch(DataSourceActions.dataset.listVersions());
|
|
312
317
|
}
|
|
@@ -315,12 +320,17 @@ class PryDatasetComponent extends SubscriptionnerDirective {
|
|
|
315
320
|
this.selectedMode = ViewMode.CONSULT;
|
|
316
321
|
this.search$.next('');
|
|
317
322
|
}
|
|
323
|
+
doesDatasetMatchCategoryFilter(dataset, selectedCategories) {
|
|
324
|
+
return dataset.categories
|
|
325
|
+
? selectedCategories.reduce((acc, selectedCat) => acc && dataset.categories.map((cat) => cat.id).includes(selectedCat.id), true)
|
|
326
|
+
: false;
|
|
327
|
+
}
|
|
318
328
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
319
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryDatasetComponent, selector: "pry-dataset", usesInheritance: true, ngImport: i0, template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-dataset-layout\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchCase=\"ViewMode.CATALOG\">\n <div class=\"o-
|
|
329
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryDatasetComponent, selector: "pry-dataset", usesInheritance: true, ngImport: i0, template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-dataset-layout u-display-flex -column -align-center\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchCase=\"ViewMode.CATALOG\">\n <h1 class=\"a-h1 u-self-start\">{{ '@pry.dataset.title' | i18n }}</h1>\n <div class=\"o-pry-dataset__toolbox u-display-flex\">\n <div class=\"o-pry-dataset__search m-form-label-field\">\n <label class=\"a-label\" id=\"catalog-search-label\" for=\"catalog-search\">{{ '@pry.dataset.search' | i18n }}</label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.dataset.searchPlaceholder' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon class=\"search-icon\" iconSvg=\"search\" [width]=\"20\" [height]=\"20\"></pry-icon>\n </div>\n <div class=\"o-pry-dataset__categories m-form-label-field\">\n <label class=\"a-label\" id=\"tags-label\" for=\"catalog-category-search\">{{ '@pry.dataset.filter' | i18n }}</label>\n <pry-select\n id=\"catalog-category-search\"\n [ngModel]=\"selectedCategories\"\n (ngModelChange)=\"this.selectedCategories$.next($event)\"\n [items]=\"categories$ | async\"\n bindLabel=\"name\"\n aria-labelledby=\"tags-label\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n [placeholder]=\"'@pry.dataset.filterPlaceholder' | i18n\"\n ></pry-select>\n </div>\n </div>\n <div class=\"o-dataset-layout__content\">\n <div class=\"o-pry-dataset\">\n <pry-dataset-card\n *ngFor=\"let dataset of filteredDatasets$ | async; let index = index\"\n [dataset]=\"dataset\"\n (consult)=\"consult($event)\"\n ></pry-dataset-card>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.CONSULT\">\n <ng-template [ngIf]=\"selectedDataset\">\n <pry-dataset-detail\n [dataset]=\"selectedDataset\"\n (goToCatalog)=\"selectedMode = ViewMode.CATALOG\"\n ></pry-dataset-detail>\n </ng-template>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: PryDatasetCssComponent, selector: "pry-dataset-css" }, { kind: "component", type: PryDatasetCardComponent, selector: "pry-dataset-card", inputs: ["dataset"], outputs: ["consult"] }, { kind: "component", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: ["dataset"], outputs: ["goToCatalog"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
320
330
|
}
|
|
321
331
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetComponent, decorators: [{
|
|
322
332
|
type: Component,
|
|
323
|
-
args: [{ selector: 'pry-dataset', template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-dataset-layout\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchCase=\"ViewMode.CATALOG\">\n <div class=\"o-
|
|
333
|
+
args: [{ selector: 'pry-dataset', template: "<pry-dataset-css></pry-dataset-css>\n<div class=\"o-dataset-layout u-display-flex -column -align-center\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchCase=\"ViewMode.CATALOG\">\n <h1 class=\"a-h1 u-self-start\">{{ '@pry.dataset.title' | i18n }}</h1>\n <div class=\"o-pry-dataset__toolbox u-display-flex\">\n <div class=\"o-pry-dataset__search m-form-label-field\">\n <label class=\"a-label\" id=\"catalog-search-label\" for=\"catalog-search\">{{ '@pry.dataset.search' | i18n }}</label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.dataset.searchPlaceholder' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon class=\"search-icon\" iconSvg=\"search\" [width]=\"20\" [height]=\"20\"></pry-icon>\n </div>\n <div class=\"o-pry-dataset__categories m-form-label-field\">\n <label class=\"a-label\" id=\"tags-label\" for=\"catalog-category-search\">{{ '@pry.dataset.filter' | i18n }}</label>\n <pry-select\n id=\"catalog-category-search\"\n [ngModel]=\"selectedCategories\"\n (ngModelChange)=\"this.selectedCategories$.next($event)\"\n [items]=\"categories$ | async\"\n bindLabel=\"name\"\n aria-labelledby=\"tags-label\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n [placeholder]=\"'@pry.dataset.filterPlaceholder' | i18n\"\n ></pry-select>\n </div>\n </div>\n <div class=\"o-dataset-layout__content\">\n <div class=\"o-pry-dataset\">\n <pry-dataset-card\n *ngFor=\"let dataset of filteredDatasets$ | async; let index = index\"\n [dataset]=\"dataset\"\n (consult)=\"consult($event)\"\n ></pry-dataset-card>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.CONSULT\">\n <ng-template [ngIf]=\"selectedDataset\">\n <pry-dataset-detail\n [dataset]=\"selectedDataset\"\n (goToCatalog)=\"selectedMode = ViewMode.CATALOG\"\n ></pry-dataset-detail>\n </ng-template>\n </ng-container>\n</div>\n" }]
|
|
324
334
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
325
335
|
|
|
326
336
|
const enTranslations = {
|
|
@@ -329,7 +339,15 @@ const enTranslations = {
|
|
|
329
339
|
consult: 'View',
|
|
330
340
|
title: 'Dataset catalog',
|
|
331
341
|
search: 'Search',
|
|
342
|
+
searchPlaceholder: 'Enter your search',
|
|
343
|
+
filter: 'Filter by category',
|
|
344
|
+
filterPlaceholder: 'Enter categories',
|
|
345
|
+
name: 'Name',
|
|
332
346
|
description: 'Description',
|
|
347
|
+
noDescription: 'No description',
|
|
348
|
+
tags: 'Tags',
|
|
349
|
+
noTags: 'No associated tags',
|
|
350
|
+
class: 'Class',
|
|
333
351
|
date: 'Date',
|
|
334
352
|
status: 'Status',
|
|
335
353
|
versionHistory: 'Version history',
|
|
@@ -416,8 +434,16 @@ const frTranslations = {
|
|
|
416
434
|
dataset: {
|
|
417
435
|
consult: 'Consulter',
|
|
418
436
|
title: 'Catalogue de données',
|
|
419
|
-
search: 'Rechercher',
|
|
437
|
+
search: 'Rechercher une donnée :',
|
|
438
|
+
searchPlaceholder: 'Saisir votre recherche',
|
|
439
|
+
filter: 'Filtrer par catégories :',
|
|
440
|
+
filterPlaceholder: 'Saisir les catégories',
|
|
441
|
+
name: 'Nom',
|
|
420
442
|
description: 'Description',
|
|
443
|
+
noDescription: 'Pas de description',
|
|
444
|
+
tags: 'Tags',
|
|
445
|
+
noTags: 'Pas de tags associés',
|
|
446
|
+
class: 'Modèle de données',
|
|
421
447
|
date: 'Date',
|
|
422
448
|
status: 'Statut',
|
|
423
449
|
versionHistory: 'Historique de versions',
|
|
@@ -522,7 +548,8 @@ class PryDatasetModule {
|
|
|
522
548
|
PrySinceDateModule,
|
|
523
549
|
PryModalStatusModule,
|
|
524
550
|
ReactiveFormsModule,
|
|
525
|
-
PryTextEditorModule
|
|
551
|
+
PryTextEditorModule,
|
|
552
|
+
PrySelectModule], exports: [PryDatasetComponent, PryDatasetCssComponent, PryDatasetCardComponent, PryDatasetDetailComponent] }); }
|
|
526
553
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetModule, imports: [CommonModule,
|
|
527
554
|
PryIconModule,
|
|
528
555
|
PryCoreModule,
|
|
@@ -533,7 +560,8 @@ class PryDatasetModule {
|
|
|
533
560
|
PrySinceDateModule,
|
|
534
561
|
PryModalStatusModule,
|
|
535
562
|
ReactiveFormsModule,
|
|
536
|
-
PryTextEditorModule
|
|
563
|
+
PryTextEditorModule,
|
|
564
|
+
PrySelectModule] }); }
|
|
537
565
|
}
|
|
538
566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetModule, decorators: [{
|
|
539
567
|
type: NgModule,
|
|
@@ -556,7 +584,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
556
584
|
PrySinceDateModule,
|
|
557
585
|
PryModalStatusModule,
|
|
558
586
|
ReactiveFormsModule,
|
|
559
|
-
PryTextEditorModule
|
|
587
|
+
PryTextEditorModule,
|
|
588
|
+
PrySelectModule
|
|
560
589
|
],
|
|
561
590
|
exports: [PryDatasetComponent, PryDatasetCssComponent, PryDatasetCardComponent, PryDatasetDetailComponent]
|
|
562
591
|
}]
|