@provoly/dashboard 1.2.8 → 1.2.10
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 +14 -14
- 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 +3 -7
- package/dataset/dataset.module.d.ts +7 -9
- package/dataset/i18n/en.translations.d.ts +8 -0
- package/dataset/i18n/fr.translations.d.ts +8 -0
- package/dataset/public-api.d.ts +0 -1
- package/dataset/style/_o-pry-dataset.scss +5 -42
- package/esm2022/admin/admin.module.mjs +7 -8
- 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-detail/dataset-detail.component.mjs +4 -5
- package/esm2022/dataset/components/dataset.component.mjs +8 -23
- package/esm2022/dataset/dataset.module.mjs +12 -13
- package/esm2022/dataset/i18n/en.translations.mjs +9 -1
- package/esm2022/dataset/i18n/fr.translations.mjs +10 -2
- package/esm2022/dataset/public-api.mjs +1 -2
- package/esm2022/dataset/style/css.component.mjs +3 -3
- package/esm2022/lib/core/components/chips-selector/chips-selector.component.mjs +7 -27
- package/esm2022/lib/core/components/chips-selector/chips-selector.module.mjs +21 -0
- package/esm2022/lib/core/components/select-image/select-image.component.mjs +1 -1
- package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +3 -3
- package/esm2022/lib/core/components/share/share.module.mjs +8 -12
- package/esm2022/lib/core/core.module.mjs +4 -8
- package/esm2022/lib/core/i18n/en.translations.mjs +8 -8
- package/esm2022/lib/core/i18n/fr.translations.mjs +9 -9
- package/esm2022/lib/core/pipes/get-secured-image/get-secured-image.pipe.mjs +21 -0
- package/esm2022/lib/core/pipes/since-date/since-date.module.mjs +18 -0
- package/esm2022/lib/core/pipes/since-date/since-date.pipe.mjs +55 -0
- package/esm2022/lib/core/pipes/translate-id/translate-id.pipe.mjs +108 -0
- package/esm2022/lib/core/pipes/translate-item-to-symbol/translate-item-to-symbol.pipe.mjs +23 -0
- package/esm2022/lib/core/public-api.mjs +7 -4
- 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/esm2022/lib/core/store/data-source/datasource-utils.mjs +22 -1
- package/esm2022/lib/dashboard/components/widgets/data-widget.component.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-card/datasource-card.component.mjs +60 -0
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-list/datasource-list.component.mjs +95 -0
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-selector.component.mjs +53 -48
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +6 -7
- package/esm2022/lib/dashboard/components/widgets/public-api.mjs +3 -1
- package/esm2022/lib/dashboard/dashboard.module.mjs +19 -7
- package/esm2022/lib/dashboard/tooltip/components/default/default.tooltip.component.mjs +2 -2
- package/esm2022/pipeline/components/pipeline-details/pipeline-details.component.mjs +2 -3
- package/esm2022/pipeline/components/pipeline-list/pipeline-list.component.mjs +2 -3
- package/esm2022/pipeline/pipeline.module.mjs +8 -9
- package/esm2022/presentation/components/presentation.component.mjs +2 -3
- package/esm2022/presentation/presentation.module.mjs +8 -9
- package/esm2022/restitution/components/restitution/restitution.component.mjs +4 -4
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +2 -3
- package/esm2022/restitution/restitution.module.mjs +2 -3
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +194 -109
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +51 -79
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline.mjs +17 -19
- package/fesm2022/provoly-dashboard-pipeline.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +8 -10
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +7 -9
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +3475 -3233
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/chips-selector/chips-selector.component.d.ts +1 -6
- package/lib/core/components/chips-selector/chips-selector.module.d.ts +11 -0
- package/lib/core/components/share/share.module.d.ts +3 -4
- package/lib/core/core.module.d.ts +26 -27
- package/lib/core/i18n/en.translations.d.ts +7 -7
- package/lib/core/i18n/fr.translations.d.ts +7 -7
- package/{components/sinceDate/sinceDate.module.d.ts → lib/core/pipes/since-date/since-date.module.d.ts} +3 -2
- package/{components/sinceDate/sinceDate.pipe.d.ts → lib/core/pipes/since-date/since-date.pipe.d.ts} +4 -4
- package/lib/core/{components → pipes}/translate-id/translate-id.pipe.d.ts +0 -2
- package/lib/core/public-api.d.ts +6 -3
- 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/lib/core/store/data-source/datasource-utils.d.ts +4 -1
- package/lib/dashboard/components/widgets/datasource-selector/datasource-card/datasource-card.component.d.ts +24 -0
- package/lib/dashboard/components/widgets/datasource-selector/datasource-list/datasource-list.component.d.ts +35 -0
- package/lib/dashboard/components/widgets/datasource-selector/datasource-selector.component.d.ts +19 -11
- package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +1 -1
- package/lib/dashboard/components/widgets/public-api.d.ts +2 -0
- package/lib/dashboard/dashboard.module.d.ts +18 -15
- package/package.json +13 -19
- package/pipeline/pipeline.module.d.ts +3 -4
- package/presentation/presentation.module.d.ts +7 -8
- package/restitution/components/restitution/restitution.component.d.ts +1 -1
- package/restitution/restitution.module.d.ts +1 -2
- package/restitution/style/_o-restitution.scss +4 -0
- 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 +45 -0
- package/styles/components/_o-datasource-selector.scss +192 -0
- package/styles/components/_o-modal.scss +0 -42
- package/styles/components/_o-widget.scss +1 -1
- package/styles/layout/_o-base-layout.scss +1 -7
- package/styles/main.scss +1 -0
- package/styles-theme/main-theme.scss +0 -3
- package/components/sinceDate/index.d.ts +0 -5
- package/components/sinceDate/public-api.d.ts +0 -2
- package/dataset/components/dataset-card/dataset-card.component.d.ts +0 -18
- package/dataset/style/_o-pry-dataset-card.scss +0 -85
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +0 -99
- package/esm2022/components/sinceDate/provoly-dashboard-components-sinceDate.mjs +0 -5
- package/esm2022/components/sinceDate/public-api.mjs +0 -3
- package/esm2022/components/sinceDate/sinceDate.module.mjs +0 -16
- package/esm2022/components/sinceDate/sinceDate.pipe.mjs +0 -55
- package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +0 -41
- package/esm2022/lib/core/components/get-secured-image/get-secured-image.pipe.mjs +0 -21
- package/esm2022/lib/core/components/translate-id/translate-id.pipe.mjs +0 -114
- package/esm2022/lib/core/components/translate-item-to-symbol/translate-item-to-symbol.pipe.mjs +0 -23
- package/fesm2022/provoly-dashboard-components-sinceDate.mjs +0 -75
- package/fesm2022/provoly-dashboard-components-sinceDate.mjs.map +0 -1
- package/styles-theme/components-theme/_a-chip.theme.scss +0 -32
- package/styles-theme/components-theme/_o-pry-dataset-card.theme.scss +0 -26
- package/styles-theme/components-theme/_o-pry-dataset.theme.scss +0 -4
- /package/lib/core/{components → pipes}/get-secured-image/get-secured-image.pipe.d.ts +0 -0
- /package/lib/core/{components → pipes}/translate-item-to-symbol/translate-item-to-symbol.pipe.d.ts +0 -0
|
@@ -13,7 +13,7 @@ import { concatLatestFrom, createEffect, ofType, EffectsModule } from '@ngrx/eff
|
|
|
13
13
|
import * as i1 from '@ngrx/store';
|
|
14
14
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
15
15
|
import * as i4 from '@provoly/dashboard';
|
|
16
|
-
import { ClassSelectors, FieldSelectors, FieldType, ClassActions, FieldActions, SubscriptionnerDirective, ConfigSelectors, ConfigActions, DEFAULT_ICON_URL, IconPosition, compareOperationFunctions, ItemUtils,
|
|
16
|
+
import { ClassSelectors, FieldSelectors, FieldType, ClassActions, FieldActions, SubscriptionnerDirective, ConfigSelectors, ConfigActions, DEFAULT_ICON_URL, IconPosition, compareOperationFunctions, ItemUtils, CategoryActions, CategorySelectors, DataSourceActions, DataSourceSelectors, FIELD_OPTIONS, DEFAULT_CATEGORY_UUID, PryDatasetType, ENV_OPTIONS, GeometricFieldTypes, DashboardSelectors, PryShareMode, PRY_ACCESS_TOKEN, META_OPTIONS, RelationTypesSelectors, RelationTypesActions, BaseMenuComponent, BaseLayoutComponent, PRY_ACCESS_GUARD, PryDialogConfirmComponent, PrySortModule, PryIconModule, PryModalModule, PryI18nModule, PryCoreModule, PrySelectModule, PryToggleModule, PryOverlayModule, PryShareModule } from '@provoly/dashboard';
|
|
17
17
|
import * as i5$1 from '@provoly/dashboard/components/checkbox';
|
|
18
18
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
19
19
|
import * as i6 from '@provoly/dashboard/components/metadata-editor';
|
|
@@ -27,7 +27,6 @@ import { distinctUntilChanged, map as map$1, filter as filter$1, mergeMap as mer
|
|
|
27
27
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
28
28
|
import { concatLatestFrom as concatLatestFrom$1 } from '@ngrx/operators';
|
|
29
29
|
import * as i1$1 from '@angular/common/http';
|
|
30
|
-
import { PrySinceDateModule } from '@provoly/dashboard/components/sinceDate';
|
|
31
30
|
import { PryDatasetModule } from '@provoly/dashboard/dataset';
|
|
32
31
|
|
|
33
32
|
const AdminActions = {
|
|
@@ -1436,26 +1435,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
1436
1435
|
args: [{ selector: 'pry-admin-classes-new', template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.admin.classes.add' | i18n }}</h1>\n <pry-admin-classes-form></pry-admin-classes-form>\n</div>\n" }]
|
|
1437
1436
|
}] });
|
|
1438
1437
|
|
|
1438
|
+
const AdminDatasetActions = {
|
|
1439
|
+
failure: createAction('[Dataset] Failure effect Dataset', props()),
|
|
1440
|
+
create: createAction('[Dataset] Create Dataset', props()),
|
|
1441
|
+
update: createAction('[Dataset] Update Dataset', props()),
|
|
1442
|
+
confirmDatasetDeletion: createAction('[Dataset] Confirm deletion', props()),
|
|
1443
|
+
delete: createAction('[Dataset] Delete Dataset', props()),
|
|
1444
|
+
deleted: createAction('[Dataset] Dataset is deleted call to admin', props()),
|
|
1445
|
+
selectDataset: createAction('[Dataset] Open Dataset details', props()),
|
|
1446
|
+
unselectDataset: createAction('[Dataset] Unselect Dataset'),
|
|
1447
|
+
getDatasetById: createAction('[Dataset] Get Dataset by ID', props()),
|
|
1448
|
+
getDatasetByIdSuccess: createAction('[Dataset] Get Dataset by Id Success', props()),
|
|
1449
|
+
getDatasetByIdFailure: createAction('[Dataset] Get Dataset by Id Failure', props()),
|
|
1450
|
+
openNewDataset: createAction('[Dataset] Open New Dataset', props()),
|
|
1451
|
+
setMissingGroups: createAction('[Dataset] Set Missing Groups', props()),
|
|
1452
|
+
addCategory: createAction('[Dataset] Add Category', props())
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1455
|
+
class AddCategoryModalComponent {
|
|
1456
|
+
constructor(store) {
|
|
1457
|
+
this.store = store;
|
|
1458
|
+
this.catToAdd = {
|
|
1459
|
+
id: v4(),
|
|
1460
|
+
name: ''
|
|
1461
|
+
};
|
|
1462
|
+
this.search$ = new BehaviorSubject(undefined);
|
|
1463
|
+
this.closeModal = new EventEmitter();
|
|
1464
|
+
this.category = new EventEmitter();
|
|
1465
|
+
this.actions = {
|
|
1466
|
+
attribute: {
|
|
1467
|
+
load: () => this.store.dispatch(CategoryActions.load()),
|
|
1468
|
+
select: () => this.store.select(CategorySelectors.categories),
|
|
1469
|
+
add: (category) => this.store.dispatch(AdminClassActions.saveCategory({ category }))
|
|
1470
|
+
},
|
|
1471
|
+
dataset: {
|
|
1472
|
+
load: () => this.store.dispatch(DataSourceActions.dataset.getCategories()),
|
|
1473
|
+
select: () => this.store.select(DataSourceSelectors.categories),
|
|
1474
|
+
add: (category) => this.store.dispatch(AdminDatasetActions.addCategory({ category }))
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
ngOnInit() {
|
|
1479
|
+
this.loadCategories();
|
|
1480
|
+
this.categories$ = this.selectCategories();
|
|
1481
|
+
this.filteredCategories$ = combineLatest([this.categories$, this.search$]).pipe(map(([categories, search]) => search
|
|
1482
|
+
? categories.filter((category) => category.name.toLowerCase().includes(search?.toLowerCase()))
|
|
1483
|
+
: categories));
|
|
1484
|
+
}
|
|
1485
|
+
loadCategories() {
|
|
1486
|
+
this.actions[this.entityType].load();
|
|
1487
|
+
}
|
|
1488
|
+
selectCategories() {
|
|
1489
|
+
return this.actions[this.entityType].select();
|
|
1490
|
+
}
|
|
1491
|
+
addCategory() {
|
|
1492
|
+
this.actions[this.entityType].add(this.catToAdd);
|
|
1493
|
+
this.selectCategory(this.catToAdd);
|
|
1494
|
+
}
|
|
1495
|
+
selectCategory(category) {
|
|
1496
|
+
this.category.emit(category);
|
|
1497
|
+
this.closeModal.emit();
|
|
1498
|
+
}
|
|
1499
|
+
search($event) {
|
|
1500
|
+
this.search$.next($event.target.value);
|
|
1501
|
+
}
|
|
1502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AddCategoryModalComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1503
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: AddCategoryModalComponent, selector: "pry-add-category-modal", inputs: { entityType: "entityType" }, outputs: { closeModal: "closeModal", category: "category" }, ngImport: i0, template: "<div class=\"o-modal o-modal--selector\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.admin.shared.categoryModal.' + entityType + '.select' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"closeModal.emit()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <form (ngSubmit)=\"addCategory()\">\n <div class=\"m-form-label-field selector\">\n <label class=\"a-label\" for=\"name-search\">{{\n '@pry.admin.shared.categoryModal.' + entityType + '.searchOrCreate' | i18n\n }}</label>\n <input\n type=\"text\"\n class=\"a-form-field\"\n (input)=\"search($event)\"\n [(ngModel)]=\"catToAdd.name\"\n name=\"name\"\n id=\"name-search\"\n />\n </div>\n <div>\n <h3>\n {{ '@pry.admin.shared.categoryModal.' + entityType + '.name' | i18n }}\n </h3>\n <div class=\"u-display-flex -column\">\n @for (category of filteredCategories$ | async; track category.id) {\n <button\n type=\"button\"\n class=\"a-btn a-btn--ghost -no-padding u-display-flex -justify-start -width-full\"\n (click)=\"selectCategory(category)\"\n >\n <span class=\"u-visually-hidden\">{{\n '@pry.admin.shared.categoryModal.' + entityType + '.selectIt' | i18n\n }}</span>\n {{ category.name }}\n </button>\n }\n </div>\n </div>\n @if ((categories$ | async)?.length === 0) {\n <span>{{ '@pry.admin.shared.categoryModal.noCategories' | i18n }}</span>\n } @else if ((filteredCategories$ | async)?.length === 0) {\n <div class=\"u-display-flex -column\">\n <p class=\"a-p\">\n <strong>{{ catToAdd.name }} </strong>\n <span [innerHTML]=\"'@pry.admin.shared.categoryModal.' + entityType + '.add' | i18n\"></span>\n </p>\n <button type=\"submit\" class=\"a-btn a-btn--primary u-self-center\">\n {{ '@pry.admin.shared.categoryModal.' + entityType + '.create' | i18n }}\n </button>\n </div>\n }\n </form>\n</div>\n", dependencies: [{ kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1504
|
+
}
|
|
1505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AddCategoryModalComponent, decorators: [{
|
|
1506
|
+
type: Component,
|
|
1507
|
+
args: [{ selector: 'pry-add-category-modal', template: "<div class=\"o-modal o-modal--selector\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.admin.shared.categoryModal.' + entityType + '.select' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"closeModal.emit()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <form (ngSubmit)=\"addCategory()\">\n <div class=\"m-form-label-field selector\">\n <label class=\"a-label\" for=\"name-search\">{{\n '@pry.admin.shared.categoryModal.' + entityType + '.searchOrCreate' | i18n\n }}</label>\n <input\n type=\"text\"\n class=\"a-form-field\"\n (input)=\"search($event)\"\n [(ngModel)]=\"catToAdd.name\"\n name=\"name\"\n id=\"name-search\"\n />\n </div>\n <div>\n <h3>\n {{ '@pry.admin.shared.categoryModal.' + entityType + '.name' | i18n }}\n </h3>\n <div class=\"u-display-flex -column\">\n @for (category of filteredCategories$ | async; track category.id) {\n <button\n type=\"button\"\n class=\"a-btn a-btn--ghost -no-padding u-display-flex -justify-start -width-full\"\n (click)=\"selectCategory(category)\"\n >\n <span class=\"u-visually-hidden\">{{\n '@pry.admin.shared.categoryModal.' + entityType + '.selectIt' | i18n\n }}</span>\n {{ category.name }}\n </button>\n }\n </div>\n </div>\n @if ((categories$ | async)?.length === 0) {\n <span>{{ '@pry.admin.shared.categoryModal.noCategories' | i18n }}</span>\n } @else if ((filteredCategories$ | async)?.length === 0) {\n <div class=\"u-display-flex -column\">\n <p class=\"a-p\">\n <strong>{{ catToAdd.name }} </strong>\n <span [innerHTML]=\"'@pry.admin.shared.categoryModal.' + entityType + '.add' | i18n\"></span>\n </p>\n <button type=\"submit\" class=\"a-btn a-btn--primary u-self-center\">\n {{ '@pry.admin.shared.categoryModal.' + entityType + '.create' | i18n }}\n </button>\n </div>\n }\n </form>\n</div>\n" }]
|
|
1508
|
+
}], ctorParameters: () => [{ type: i1.Store }], propDecorators: { entityType: [{
|
|
1509
|
+
type: Input,
|
|
1510
|
+
args: [{ required: true }]
|
|
1511
|
+
}], closeModal: [{
|
|
1512
|
+
type: Output
|
|
1513
|
+
}], category: [{
|
|
1514
|
+
type: Output
|
|
1515
|
+
}] } });
|
|
1516
|
+
|
|
1439
1517
|
class AdminAttributesFormComponent extends SubscriptionnerDirective {
|
|
1440
|
-
constructor(store, router, route, formBuilder,
|
|
1518
|
+
constructor(store, router, route, formBuilder, i18nService, dialog) {
|
|
1441
1519
|
super();
|
|
1442
1520
|
this.store = store;
|
|
1443
1521
|
this.router = router;
|
|
1444
1522
|
this.route = route;
|
|
1445
1523
|
this.formBuilder = formBuilder;
|
|
1446
|
-
this.overlay = overlay;
|
|
1447
|
-
this.viewContainerRef = viewContainerRef;
|
|
1448
1524
|
this.i18nService = i18nService;
|
|
1525
|
+
this.dialog = dialog;
|
|
1449
1526
|
this.nameAlreadyExists = false;
|
|
1450
1527
|
this.technicalNameAlreadyExists = false;
|
|
1451
1528
|
this.fieldTypeDescription = FIELD_OPTIONS;
|
|
1452
|
-
this.isShowedCategory = false;
|
|
1453
|
-
this.catToAdd = {};
|
|
1454
|
-
this.filterCategories$ = new BehaviorSubject(undefined);
|
|
1455
1529
|
this.store.dispatch(FieldActions.load());
|
|
1456
1530
|
this.fields$ = this.store.select(FieldSelectors.fields);
|
|
1457
1531
|
this.store.dispatch(CategoryActions.load());
|
|
1458
|
-
this.categories$ =
|
|
1532
|
+
this.categories$ = this.store.select(CategorySelectors.categories);
|
|
1459
1533
|
this.attrForm = this.formBuilder.group({
|
|
1460
1534
|
id: [v4()],
|
|
1461
1535
|
technicalName: [
|
|
@@ -1551,53 +1625,28 @@ class AdminAttributesFormComponent extends SubscriptionnerDirective {
|
|
|
1551
1625
|
}
|
|
1552
1626
|
}
|
|
1553
1627
|
}
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1628
|
+
openModal() {
|
|
1629
|
+
const ref = this.dialog.open(AddCategoryModalComponent);
|
|
1630
|
+
ref.component.entityType = 'attribute';
|
|
1631
|
+
this.subscriptions.add(ref.component.category.subscribe((category) => {
|
|
1632
|
+
this.attrForm.patchValue({
|
|
1633
|
+
categories: category.id
|
|
1634
|
+
});
|
|
1560
1635
|
}));
|
|
1561
|
-
this.
|
|
1562
|
-
this.overlayRef.backdropClick().subscribe((_) => this.closeCategory());
|
|
1563
|
-
this.overlayRef.attach(new TemplatePortal(this.template, this.viewContainerRef));
|
|
1564
|
-
}
|
|
1565
|
-
closeCategory() {
|
|
1566
|
-
this.isShowedCategory = false;
|
|
1567
|
-
this.catToAdd = {};
|
|
1568
|
-
this.overlayRef?.dispose();
|
|
1569
|
-
this.categories$ = this.store.select(CategorySelectors.categories);
|
|
1570
|
-
this.store.dispatch(ConfigActions.closeOverlay({ id: this.constructor.name }));
|
|
1571
|
-
}
|
|
1572
|
-
search(event) {
|
|
1573
|
-
this.filterCategories$.next(event.target.value);
|
|
1574
|
-
}
|
|
1575
|
-
addCategory() {
|
|
1576
|
-
this.catToAdd.id = v4();
|
|
1577
|
-
this.store.dispatch(AdminClassActions.saveCategory({ category: this.catToAdd }));
|
|
1578
|
-
this.setCategory(this.catToAdd);
|
|
1579
|
-
}
|
|
1580
|
-
setCategory(cat) {
|
|
1581
|
-
this.attrForm.patchValue({
|
|
1582
|
-
category: cat.id
|
|
1583
|
-
});
|
|
1584
|
-
this.closeCategory();
|
|
1636
|
+
this.subscriptions.add(ref.component.closeModal.subscribe(() => ref.close()));
|
|
1585
1637
|
}
|
|
1586
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminAttributesFormComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3$1.UntypedFormBuilder }, { token:
|
|
1587
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: AdminAttributesFormComponent, selector: "pry-admin-attributes-form", inputs: { selectedClass: "selectedClass", interClass: "interClass", selectedAttribute: "selectedAttribute" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<form class=\"o-form\" [formGroup]=\"attrForm\" (ngSubmit)=\"addAttribute()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"attr_technicalName\">{{ '@pry.admin.classes.attributes.technicalName' | i18n }}</label>\n <input id=\"attr_technicalName\" type=\"text\" class=\"a-form-field\" formControlName=\"technicalName\" required />\n <label class=\"a-label a-label--help -error\" *ngIf=\"technicalNameAlreadyExists$ | async\">{{\n '@pry.admin.exists' | i18n\n }}</label>\n <div *ngIf=\"attrForm.get('technicalName')?.invalid\">\n <div *ngIf=\"attrForm.get('technicalName')?.dirty && attrForm.get('technicalName')?.hasError('required')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('technicalName')?.hasError('minlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.minLength' | i18n : { len: 2 }\n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('technicalName')?.hasError('maxlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</label>\n </div>\n <div\n *ngIf=\"\n attrForm.get('technicalName')?.hasError('whitespace') && !attrForm.get('technicalName')?.hasError('minlength')\n \"\n >\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.noWhitespace' | i18n\n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"attr_name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</label>\n <input id=\"attr_name\" type=\"text\" class=\"a-form-field\" formControlName=\"name\" />\n <label class=\"a-label a-label--help -error\" *ngIf=\"nameAlreadyExists$ | async\">{{\n '@pry.admin.exists' | i18n\n }}</label>\n <div *ngIf=\"attrForm.get('name')?.invalid\">\n <div *ngIf=\"attrForm.get('name')?.hasError('maxlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{\n '@pry.admin.maxLength' | i18n : { len: 50 }\n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('name')?.hasError('whitespace')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{ '@pry.admin.noWhitespace' | i18n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"type\">{{ '@pry.admin.classes.attributes.field' | i18n }}</label>\n <div class=\"u-display-flex\">\n <pry-select\n id=\"type\"\n formControlName=\"field\"\n [items]=\"fields$ | async\"\n [autocomplete]=\"true\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [isForm]=\"true\"\n required=\"true\"\n [template]=\"templateOption\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"aligned-option\">\n <p>{{ item.name }}</p>\n <div class=\"a-chip\" *ngIf=\"item.crs\">{{ item.crs }}</div>\n </div>\n </ng-template>\n <div\n *ngIf=\"selectedFieldTypeDescription$ | async as description\"\n class=\"m-info-icon a-tooltip -tooltip-width-lg u-self-center -flex-shrink-0\"\n [attr.data-tooltip]=\"description\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </div>\n <div *ngIf=\"attrForm.get('field')?.invalid\">\n <div *ngIf=\"attrForm.get('field')?.dirty && attrForm.get('field')?.hasError('required')\">\n <label class=\"a-label a-label--help -error\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"category\">{{ '@pry.admin.classes.attributes.category' | i18n }}</label>\n <pry-select\n id=\"category\"\n class=\"form-control\"\n formControlName=\"category\"\n [items]=\"categories$ | async\"\n (click)=\"showCategory()\"\n bindValue=\"id\"\n bindLabel=\"name\"\n [isForm]=\"true\"\n [readonly]=\"true\"\n ></pry-select>\n </div>\n\n <div class=\"m-btn-group -width-sm\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n (click)=\"goBack()\"\n [innerHTML]=\"'@pry.admin.cancel' | i18n\"\n ></button>\n <button\n *pryAccess=\"{ module: 'admin', page: 'classes', action: 'add_attribute' }\"\n class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [disabled]=\"attrForm.invalid || nameAlreadyExists || technicalNameAlreadyExists\"\n [innerHTML]=\"(selectedAttribute ? '@pry.admin.edit' : '@pry.admin.create') | i18n\"\n ></button>\n </div>\n</form>\n\n<ng-template #template>\n <div class=\"o-modal o-modal--selector\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.admin.classes.category.select' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"closeCategory()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <form (ngSubmit)=\"addCategory()\">\n <div class=\"m-form-label-field selector\">\n <label class=\"a-label\" for=\"name-search\">{{ '@pry.admin.classes.category.searchOrCreate' | i18n }}</label>\n <input\n type=\"text\"\n class=\"a-form-field\"\n (input)=\"search($event)\"\n [(ngModel)]=\"catToAdd.name\"\n name=\"name\"\n id=\"name-search\"\n />\n </div>\n\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.classes.category.name' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ '@pry.admin.classes.category.name' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let cat of categories$ | async\">\n <td>\n <button type=\"button\" class=\"a-btn a-btn--secondary select-it\" (click)=\"setCategory(cat)\">\n <span class=\"u-visually-hidden\">{{ '@pry.admin.classes.category.selectIt' | i18n }}</span>\n {{ cat.name }}\n </button>\n </td>\n </tr>\n </tbody>\n </table>\n <ng-container *ngIf=\"(categories$ | async)?.length === 0\">\n <p class=\"a-p a-p--create\">\n <strong>{{ catToAdd.name }} </strong>\n <span [innerHTML]=\"'@pry.admin.classes.category.add' | i18n\"></span>\n </p>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n [innerHTML]=\"'@pry.admin.classes.category.create' | i18n\"\n ></button>\n </ng-container>\n </form>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.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: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1638
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminAttributesFormComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3$1.UntypedFormBuilder }, { token: i4.PryI18nService }, { token: i4.PryDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1639
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: AdminAttributesFormComponent, selector: "pry-admin-attributes-form", inputs: { selectedClass: "selectedClass", interClass: "interClass", selectedAttribute: "selectedAttribute" }, usesInheritance: true, ngImport: i0, template: "<form class=\"o-form\" [formGroup]=\"attrForm\" (ngSubmit)=\"addAttribute()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"attr_technicalName\">{{ '@pry.admin.classes.attributes.technicalName' | i18n }}</label>\n <input id=\"attr_technicalName\" type=\"text\" class=\"a-form-field\" formControlName=\"technicalName\" required />\n <label class=\"a-label a-label--help -error\" *ngIf=\"technicalNameAlreadyExists$ | async\">{{\n '@pry.admin.exists' | i18n\n }}</label>\n <div *ngIf=\"attrForm.get('technicalName')?.invalid\">\n <div *ngIf=\"attrForm.get('technicalName')?.dirty && attrForm.get('technicalName')?.hasError('required')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('technicalName')?.hasError('minlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.minLength' | i18n: { len: 2 }\n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('technicalName')?.hasError('maxlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.maxLength' | i18n: { len: 100 }\n }}</label>\n </div>\n <div\n *ngIf=\"\n attrForm.get('technicalName')?.hasError('whitespace') && !attrForm.get('technicalName')?.hasError('minlength')\n \"\n >\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.noWhitespace' | i18n\n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"attr_name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</label>\n <input id=\"attr_name\" type=\"text\" class=\"a-form-field\" formControlName=\"name\" />\n <label class=\"a-label a-label--help -error\" *ngIf=\"nameAlreadyExists$ | async\">{{\n '@pry.admin.exists' | i18n\n }}</label>\n <div *ngIf=\"attrForm.get('name')?.invalid\">\n <div *ngIf=\"attrForm.get('name')?.hasError('maxlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{\n '@pry.admin.maxLength' | i18n: { len: 50 }\n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('name')?.hasError('whitespace')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{ '@pry.admin.noWhitespace' | i18n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"type\">{{ '@pry.admin.classes.attributes.field' | i18n }}</label>\n <div class=\"u-display-flex\">\n <pry-select\n id=\"type\"\n formControlName=\"field\"\n [items]=\"fields$ | async\"\n [autocomplete]=\"true\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [isForm]=\"true\"\n required=\"true\"\n [template]=\"templateOption\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"aligned-option\">\n <p>{{ item.name }}</p>\n <div class=\"a-chip\" *ngIf=\"item.crs\">{{ item.crs }}</div>\n </div>\n </ng-template>\n <div\n *ngIf=\"selectedFieldTypeDescription$ | async as description\"\n class=\"m-info-icon a-tooltip -tooltip-width-lg u-self-center -flex-shrink-0\"\n [attr.data-tooltip]=\"description\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </div>\n <div *ngIf=\"attrForm.get('field')?.invalid\">\n <div *ngIf=\"attrForm.get('field')?.dirty && attrForm.get('field')?.hasError('required')\">\n <label class=\"a-label a-label--help -error\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"category\">{{ '@pry.admin.classes.attributes.category' | i18n }}</label>\n <pry-select\n id=\"category\"\n class=\"form-control\"\n formControlName=\"category\"\n [items]=\"categories$ | async\"\n (click)=\"openModal()\"\n bindValue=\"id\"\n bindLabel=\"name\"\n [isForm]=\"true\"\n [readonly]=\"true\"\n ></pry-select>\n </div>\n\n <div class=\"m-btn-group -width-sm\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n (click)=\"goBack()\"\n [innerHTML]=\"'@pry.admin.cancel' | i18n\"\n ></button>\n <button\n *pryAccess=\"{ module: 'admin', page: 'classes', action: 'add_attribute' }\"\n class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [disabled]=\"attrForm.invalid || nameAlreadyExists || technicalNameAlreadyExists\"\n [innerHTML]=\"(selectedAttribute ? '@pry.admin.edit' : '@pry.admin.create') | i18n\"\n ></button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.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: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1588
1640
|
}
|
|
1589
1641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminAttributesFormComponent, decorators: [{
|
|
1590
1642
|
type: Component,
|
|
1591
|
-
args: [{ selector: 'pry-admin-attributes-form', template: "<form class=\"o-form\" [formGroup]=\"attrForm\" (ngSubmit)=\"addAttribute()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"attr_technicalName\">{{ '@pry.admin.classes.attributes.technicalName' | i18n }}</label>\n <input id=\"attr_technicalName\" type=\"text\" class=\"a-form-field\" formControlName=\"technicalName\" required />\n <label class=\"a-label a-label--help -error\" *ngIf=\"technicalNameAlreadyExists$ | async\">{{\n '@pry.admin.exists' | i18n\n }}</label>\n <div *ngIf=\"attrForm.get('technicalName')?.invalid\">\n <div *ngIf=\"attrForm.get('technicalName')?.dirty && attrForm.get('technicalName')?.hasError('required')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('technicalName')?.hasError('minlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.minLength' | i18n
|
|
1592
|
-
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.UntypedFormBuilder }, { type:
|
|
1643
|
+
args: [{ selector: 'pry-admin-attributes-form', template: "<form class=\"o-form\" [formGroup]=\"attrForm\" (ngSubmit)=\"addAttribute()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"attr_technicalName\">{{ '@pry.admin.classes.attributes.technicalName' | i18n }}</label>\n <input id=\"attr_technicalName\" type=\"text\" class=\"a-form-field\" formControlName=\"technicalName\" required />\n <label class=\"a-label a-label--help -error\" *ngIf=\"technicalNameAlreadyExists$ | async\">{{\n '@pry.admin.exists' | i18n\n }}</label>\n <div *ngIf=\"attrForm.get('technicalName')?.invalid\">\n <div *ngIf=\"attrForm.get('technicalName')?.dirty && attrForm.get('technicalName')?.hasError('required')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('technicalName')?.hasError('minlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.minLength' | i18n: { len: 2 }\n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('technicalName')?.hasError('maxlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.maxLength' | i18n: { len: 100 }\n }}</label>\n </div>\n <div\n *ngIf=\"\n attrForm.get('technicalName')?.hasError('whitespace') && !attrForm.get('technicalName')?.hasError('minlength')\n \"\n >\n <label class=\"a-label a-label--help -error\" for=\"attr_technicalName\">{{\n '@pry.admin.noWhitespace' | i18n\n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"attr_name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</label>\n <input id=\"attr_name\" type=\"text\" class=\"a-form-field\" formControlName=\"name\" />\n <label class=\"a-label a-label--help -error\" *ngIf=\"nameAlreadyExists$ | async\">{{\n '@pry.admin.exists' | i18n\n }}</label>\n <div *ngIf=\"attrForm.get('name')?.invalid\">\n <div *ngIf=\"attrForm.get('name')?.hasError('maxlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{\n '@pry.admin.maxLength' | i18n: { len: 50 }\n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('name')?.hasError('whitespace')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{ '@pry.admin.noWhitespace' | i18n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"type\">{{ '@pry.admin.classes.attributes.field' | i18n }}</label>\n <div class=\"u-display-flex\">\n <pry-select\n id=\"type\"\n formControlName=\"field\"\n [items]=\"fields$ | async\"\n [autocomplete]=\"true\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [isForm]=\"true\"\n required=\"true\"\n [template]=\"templateOption\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"aligned-option\">\n <p>{{ item.name }}</p>\n <div class=\"a-chip\" *ngIf=\"item.crs\">{{ item.crs }}</div>\n </div>\n </ng-template>\n <div\n *ngIf=\"selectedFieldTypeDescription$ | async as description\"\n class=\"m-info-icon a-tooltip -tooltip-width-lg u-self-center -flex-shrink-0\"\n [attr.data-tooltip]=\"description\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </div>\n <div *ngIf=\"attrForm.get('field')?.invalid\">\n <div *ngIf=\"attrForm.get('field')?.dirty && attrForm.get('field')?.hasError('required')\">\n <label class=\"a-label a-label--help -error\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"category\">{{ '@pry.admin.classes.attributes.category' | i18n }}</label>\n <pry-select\n id=\"category\"\n class=\"form-control\"\n formControlName=\"category\"\n [items]=\"categories$ | async\"\n (click)=\"openModal()\"\n bindValue=\"id\"\n bindLabel=\"name\"\n [isForm]=\"true\"\n [readonly]=\"true\"\n ></pry-select>\n </div>\n\n <div class=\"m-btn-group -width-sm\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n (click)=\"goBack()\"\n [innerHTML]=\"'@pry.admin.cancel' | i18n\"\n ></button>\n <button\n *pryAccess=\"{ module: 'admin', page: 'classes', action: 'add_attribute' }\"\n class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [disabled]=\"attrForm.invalid || nameAlreadyExists || technicalNameAlreadyExists\"\n [innerHTML]=\"(selectedAttribute ? '@pry.admin.edit' : '@pry.admin.create') | i18n\"\n ></button>\n </div>\n</form>\n" }]
|
|
1644
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.UntypedFormBuilder }, { type: i4.PryI18nService }, { type: i4.PryDialogService }], propDecorators: { selectedClass: [{
|
|
1593
1645
|
type: Input
|
|
1594
1646
|
}], interClass: [{
|
|
1595
1647
|
type: Input
|
|
1596
1648
|
}], selectedAttribute: [{
|
|
1597
1649
|
type: Input
|
|
1598
|
-
}], template: [{
|
|
1599
|
-
type: ViewChild,
|
|
1600
|
-
args: ['template', { read: TemplateRef }]
|
|
1601
1650
|
}] } });
|
|
1602
1651
|
|
|
1603
1652
|
class AdminAttributesEditComponent {
|
|
@@ -1872,22 +1921,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
1872
1921
|
args: [{ selector: 'pry-admin-classes', template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.admin.classes.list' | i18n }}</h1>\n <table\n class=\"a-table\"\n prySortTable\n prySortActive=\"name\"\n prySortDirection=\"asc\"\n (prySortChange)=\"sortActive = $event.active; sortDirection = $event.direction\"\n >\n <caption>\n {{\n '@pry.admin.classes.list' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th></th>\n <th prySortHeader=\"image\">{{ '@pry.admin.classes.image' | i18n }}</th>\n <th prySortHeader=\"name\">{{ '@pry.admin.classes.name' | i18n }}</th>\n <th prySortHeader=\"lines\">{{ '@pry.admin.menus.dataset' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let clazz of classesInputFlows$ | async | prySortData: sortActive : sortDirection\"\n (click)=\"selectClass(clazz)\"\n [class.is-selected]=\"(selectedClassId$ | async) === clazz.id\"\n >\n <td class=\"view-details\">\n <button\n id=\"button-class-{{ clazz.id }}\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.action.viewDetails' | i18n }}\"\n [attr.aria-expanded]=\"(selectedClassId$ | async) === clazz.id\"\n aria-haspopup\n [attr.aria-controls]=\"'panel-class-' + clazz.id\"\n >\n <span class=\"u-visually-hidden\">{{ clazz.name }}, {{ '@pry.action.viewDetails' | i18n }}</span>\n <pry-icon iconSvg=\"eye\" [width]=\"15\" [height]=\"15\"></pry-icon>\n </button>\n </td>\n <td>\n <img\n alt=\"\"\n [height]=\"25\"\n [width]=\"25\"\n [src]=\"clazz.id | translateId: { type: 'class', output: 'icon' } | async\"\n />\n </td>\n <td>{{ clazz.name }}</td>\n <td>{{ clazz.count }}</td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
|
|
1873
1922
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }] });
|
|
1874
1923
|
|
|
1875
|
-
const AdminDatasetActions = {
|
|
1876
|
-
failure: createAction('[Dataset] failure effect Dataset', props()),
|
|
1877
|
-
create: createAction('[Dataset] create Dataset', props()),
|
|
1878
|
-
update: createAction('[Dataset] update Dataset', props()),
|
|
1879
|
-
confirmDatasetDeletion: createAction('[Dataset] confirm deletion', props()),
|
|
1880
|
-
delete: createAction('[Dataset] delete Dataset', props()),
|
|
1881
|
-
deleted: createAction('[Dataset] Dataset is deleted call to admin', props()),
|
|
1882
|
-
selectDataset: createAction('[Dataset] open Dataset details', props()),
|
|
1883
|
-
unselectDataset: createAction('[Dataset] unselect Dataset'),
|
|
1884
|
-
getDatasetById: createAction('[Dataset] Get Dataset by ID', props()),
|
|
1885
|
-
getDatasetByIdSuccess: createAction('[Dataset] Get Dataset by Id Success', props()),
|
|
1886
|
-
getDatasetByIdFailure: createAction('[Dataset] Get Dataset by Id Failure', props()),
|
|
1887
|
-
openNewDataset: createAction('[Dataset] open new Dataset', props()),
|
|
1888
|
-
setMissingGroups: createAction('[Dataset] set missing groups', props())
|
|
1889
|
-
};
|
|
1890
|
-
|
|
1891
1924
|
const datasetFeatureKey = '@pry/admin/datasets';
|
|
1892
1925
|
const initialDatasetState = {
|
|
1893
1926
|
isLoading: false,
|
|
@@ -2003,53 +2036,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
2003
2036
|
args: ['input']
|
|
2004
2037
|
}] } });
|
|
2005
2038
|
|
|
2006
|
-
class AdminFormDatasetComponent {
|
|
2007
|
-
constructor(store, router, route, formBuilder) {
|
|
2039
|
+
class AdminFormDatasetComponent extends SubscriptionnerDirective {
|
|
2040
|
+
constructor(store, router, route, formBuilder, dialog) {
|
|
2041
|
+
super();
|
|
2008
2042
|
this.store = store;
|
|
2009
2043
|
this.router = router;
|
|
2010
2044
|
this.route = route;
|
|
2011
2045
|
this.formBuilder = formBuilder;
|
|
2046
|
+
this.dialog = dialog;
|
|
2012
2047
|
this.datasetList = [];
|
|
2013
2048
|
this.datasetTypes = [];
|
|
2014
|
-
this.sub = new Subscription();
|
|
2015
2049
|
this.isSameName = false;
|
|
2016
2050
|
this.isSubmitted = false;
|
|
2017
2051
|
this.store.dispatch(ClassActions.load());
|
|
2018
2052
|
this.store.dispatch(DataSourceActions.dataset.loadDataset());
|
|
2053
|
+
this.store.dispatch(DataSourceActions.dataset.getCategories());
|
|
2019
2054
|
this.datasetList$ = this.store.select(DataSourceSelectors.datasets);
|
|
2020
|
-
this.classes = this.store.select(ClassSelectors.classes);
|
|
2055
|
+
this.classes$ = this.store.select(ClassSelectors.classes);
|
|
2056
|
+
this.categories$ = this.store.select(DataSourceSelectors.categories);
|
|
2021
2057
|
this.form = this.formBuilder.group({
|
|
2022
2058
|
id: [v4()],
|
|
2023
2059
|
name: ['', [Validators.required, Validators.maxLength(100)]],
|
|
2024
2060
|
oClass: ['', [Validators.required]],
|
|
2025
2061
|
type: ['', [Validators.required]],
|
|
2026
|
-
description: ['', [Validators.maxLength(500)]]
|
|
2062
|
+
description: ['', [Validators.maxLength(500)]],
|
|
2063
|
+
categories: [[]]
|
|
2027
2064
|
});
|
|
2028
2065
|
}
|
|
2029
2066
|
ngOnInit() {
|
|
2030
2067
|
this.isSameName = false;
|
|
2031
|
-
this.
|
|
2068
|
+
this.subscriptions.add(this.datasetList$.subscribe((dataset) => {
|
|
2032
2069
|
this.datasetList = dataset;
|
|
2033
|
-
});
|
|
2070
|
+
}));
|
|
2034
2071
|
this.datasetTypes = Object.keys(PryDatasetType).map((label) => ({
|
|
2035
2072
|
label: '@pry.admin.dataset.' + label,
|
|
2036
2073
|
value: label
|
|
2037
2074
|
}));
|
|
2038
|
-
this.
|
|
2075
|
+
this.subscriptions.add(this.dataset$?.subscribe((dataset) => {
|
|
2039
2076
|
if (dataset) {
|
|
2040
2077
|
this.form.patchValue({
|
|
2041
2078
|
id: dataset.id,
|
|
2042
2079
|
name: dataset.name,
|
|
2043
2080
|
oClass: dataset.oClass,
|
|
2044
2081
|
type: dataset.type,
|
|
2045
|
-
description: dataset.description
|
|
2082
|
+
description: dataset.description,
|
|
2083
|
+
categories: dataset.categories
|
|
2046
2084
|
});
|
|
2085
|
+
this.form.controls['oClass'].disable();
|
|
2086
|
+
this.form.controls['type'].disable();
|
|
2047
2087
|
}
|
|
2048
2088
|
}));
|
|
2049
2089
|
}
|
|
2050
|
-
ngOnDestroy() {
|
|
2051
|
-
this.sub.unsubscribe();
|
|
2052
|
-
}
|
|
2053
2090
|
goBack() {
|
|
2054
2091
|
this.store.dispatch(AdminActions.routeTo({ path: this.getPath() }));
|
|
2055
2092
|
}
|
|
@@ -2069,23 +2106,35 @@ class AdminFormDatasetComponent {
|
|
|
2069
2106
|
this.isSubmitted = false;
|
|
2070
2107
|
if (this.dataset$) {
|
|
2071
2108
|
const path = this.router.createUrlTree(['../..'], { relativeTo: this.route });
|
|
2072
|
-
this.store.dispatch(AdminDatasetActions.update({ dataset: this.form.
|
|
2109
|
+
this.store.dispatch(AdminDatasetActions.update({ dataset: this.form.getRawValue(), route: path.toString() }));
|
|
2073
2110
|
return;
|
|
2074
2111
|
}
|
|
2075
2112
|
const path = this.router.createUrlTree(['..'], { relativeTo: this.route });
|
|
2076
2113
|
this.isSameName = !!this.datasetList.find((dataset) => this.form.get('name')?.value.toLowerCase() === dataset.name.toLowerCase());
|
|
2077
2114
|
if (!this.isSameName) {
|
|
2078
|
-
this.store.dispatch(AdminDatasetActions.create({ dataset: this.form.
|
|
2115
|
+
this.store.dispatch(AdminDatasetActions.create({ dataset: this.form.getRawValue(), route: path.toString() }));
|
|
2079
2116
|
}
|
|
2080
2117
|
}
|
|
2081
2118
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2119
|
+
openModal() {
|
|
2120
|
+
const ref = this.dialog.open(AddCategoryModalComponent);
|
|
2121
|
+
ref.component.entityType = 'dataset';
|
|
2122
|
+
this.subscriptions.add(ref.component.category.subscribe((category) => {
|
|
2123
|
+
if (!this.form.get('categories')?.value?.some((cat) => cat.id === category.id)) {
|
|
2124
|
+
this.form.patchValue({
|
|
2125
|
+
categories: [...(this.form.get('categories')?.value ?? []), category]
|
|
2126
|
+
});
|
|
2127
|
+
}
|
|
2128
|
+
}));
|
|
2129
|
+
this.subscriptions.add(ref.component.closeModal.subscribe(() => ref.close()));
|
|
2130
|
+
}
|
|
2131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminFormDatasetComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3$1.UntypedFormBuilder }, { token: i4.PryDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: AdminFormDatasetComponent, selector: "pry-admin-form-dataset", inputs: { dataset$: "dataset$" }, usesInheritance: true, ngImport: i0, template: "<form class=\"o-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"name-label\" for=\"name\">\n {{ '@pry.admin.dataset.name' | i18n }} <span class=\"-error\">*</span>\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n id=\"name\"\n type=\"text\"\n class=\"a-form-field\"\n formControlName=\"name\"\n (ngModelChange)=\"changeValueName($event)\"\n [attr.aria-labelledby]=\"isSubmitted && form.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n [attr.aria-invalid]=\"isSubmitted && form.get('name')?.invalid\"\n required\n />\n @if (\n (isSubmitted && form.get('name')?.invalid) ||\n (form.get('name')?.touched && form.get('name')?.hasError('required'))\n ) {\n <label class=\"a-label a-label--help -error\" id=\"name-error\" for=\"name\">{{ '@pry.admin.required' | i18n }}</label>\n }\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"description-label\" for=\"description\"\n >{{ '@pry.admin.fields.description' | i18n }}\n </label>\n <textarea\n class=\"-resizable-both\"\n formControlName=\"description\"\n name=\"description\"\n id=\"description\"\n maxlength=\"500\"\n ></textarea>\n @if (form.get('description')?.hasError('maxlength')) {\n <label for=\"description\" class=\"a-label a-label--help -error\">\n {{ '@pry.presentation.maxLength' | i18n: { len: '500' } }}\n </label>\n }\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"item-label\" for=\"class\"\n >{{ '@pry.admin.dataset.oClass' | i18n }}\n @if (!dataset$) {\n <span>*</span>\n }\n </label>\n <pry-select\n id=\"class\"\n formControlName=\"oClass\"\n [items]=\"classes$ | async\"\n bindValue=\"id\"\n bindLabel=\"name\"\n [isForm]=\"true\"\n aria-labelledby=\"item-label\"\n ></pry-select>\n @if (form.get('oClass')?.touched && form.get('oClass')?.hasError('required')) {\n <label for=\"description\" class=\"a-label a-label--help -error\">\n {{ '@pry.presentation.maxLength' | i18n: { len: '500' } }}\n </label>\n }\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"user-label\" for=\"type\"\n >{{ '@pry.admin.dataset.type' | i18n }}\n @if (!dataset$) {\n <span>*</span>\n }\n </label>\n <pry-select\n id=\"type\"\n formControlName=\"type\"\n [items]=\"datasetTypes\"\n bindValue=\"value\"\n bindLabel=\"label\"\n [isForm]=\"true\"\n aria-labelledby=\"user-label\"\n ></pry-select>\n </div>\n\n <div class=\"u-display-flex -gap-20\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"tags-label\" for=\"tags\">{{ '@pry.dataset.tags' | i18n }}</label>\n <pry-select\n id=\"tags\"\n formControlName=\"categories\"\n [items]=\"categories$ | async\"\n bindLabel=\"name\"\n [isForm]=\"true\"\n aria-labelledby=\"tags-label\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n ></pry-select>\n </div>\n <button class=\"a-btn a-btn--primary u-self-center\" type=\"button\" (click)=\"openModal()\">\n {{ '@pry.admin.dataset.addTag' | i18n }}\n </button>\n </div>\n\n <div class=\"m-btn-group -width-sm\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"goBack()\">\n {{ '@pry.admin.cancel' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"submit\" [disabled]=\"form.invalid\">\n {{ (dataset$ ? '@pry.admin.edit' : '@pry.admin.create') | i18n }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.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: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
2084
2133
|
}
|
|
2085
2134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminFormDatasetComponent, decorators: [{
|
|
2086
2135
|
type: Component,
|
|
2087
|
-
args: [{ selector: 'pry-admin-form-dataset', template: "<form class=\"o-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"name-label\" for=\"name\">\n {{ '@pry.admin.dataset.name' | i18n }}
|
|
2088
|
-
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.UntypedFormBuilder }], propDecorators: { dataset$: [{
|
|
2136
|
+
args: [{ selector: 'pry-admin-form-dataset', template: "<form class=\"o-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"name-label\" for=\"name\">\n {{ '@pry.admin.dataset.name' | i18n }} <span class=\"-error\">*</span>\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n id=\"name\"\n type=\"text\"\n class=\"a-form-field\"\n formControlName=\"name\"\n (ngModelChange)=\"changeValueName($event)\"\n [attr.aria-labelledby]=\"isSubmitted && form.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n [attr.aria-invalid]=\"isSubmitted && form.get('name')?.invalid\"\n required\n />\n @if (\n (isSubmitted && form.get('name')?.invalid) ||\n (form.get('name')?.touched && form.get('name')?.hasError('required'))\n ) {\n <label class=\"a-label a-label--help -error\" id=\"name-error\" for=\"name\">{{ '@pry.admin.required' | i18n }}</label>\n }\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"description-label\" for=\"description\"\n >{{ '@pry.admin.fields.description' | i18n }}\n </label>\n <textarea\n class=\"-resizable-both\"\n formControlName=\"description\"\n name=\"description\"\n id=\"description\"\n maxlength=\"500\"\n ></textarea>\n @if (form.get('description')?.hasError('maxlength')) {\n <label for=\"description\" class=\"a-label a-label--help -error\">\n {{ '@pry.presentation.maxLength' | i18n: { len: '500' } }}\n </label>\n }\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"item-label\" for=\"class\"\n >{{ '@pry.admin.dataset.oClass' | i18n }}\n @if (!dataset$) {\n <span>*</span>\n }\n </label>\n <pry-select\n id=\"class\"\n formControlName=\"oClass\"\n [items]=\"classes$ | async\"\n bindValue=\"id\"\n bindLabel=\"name\"\n [isForm]=\"true\"\n aria-labelledby=\"item-label\"\n ></pry-select>\n @if (form.get('oClass')?.touched && form.get('oClass')?.hasError('required')) {\n <label for=\"description\" class=\"a-label a-label--help -error\">\n {{ '@pry.presentation.maxLength' | i18n: { len: '500' } }}\n </label>\n }\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"user-label\" for=\"type\"\n >{{ '@pry.admin.dataset.type' | i18n }}\n @if (!dataset$) {\n <span>*</span>\n }\n </label>\n <pry-select\n id=\"type\"\n formControlName=\"type\"\n [items]=\"datasetTypes\"\n bindValue=\"value\"\n bindLabel=\"label\"\n [isForm]=\"true\"\n aria-labelledby=\"user-label\"\n ></pry-select>\n </div>\n\n <div class=\"u-display-flex -gap-20\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"tags-label\" for=\"tags\">{{ '@pry.dataset.tags' | i18n }}</label>\n <pry-select\n id=\"tags\"\n formControlName=\"categories\"\n [items]=\"categories$ | async\"\n bindLabel=\"name\"\n [isForm]=\"true\"\n aria-labelledby=\"tags-label\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n ></pry-select>\n </div>\n <button class=\"a-btn a-btn--primary u-self-center\" type=\"button\" (click)=\"openModal()\">\n {{ '@pry.admin.dataset.addTag' | i18n }}\n </button>\n </div>\n\n <div class=\"m-btn-group -width-sm\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"goBack()\">\n {{ '@pry.admin.cancel' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"submit\" [disabled]=\"form.invalid\">\n {{ (dataset$ ? '@pry.admin.edit' : '@pry.admin.create') | i18n }}\n </button>\n </div>\n</form>\n" }]
|
|
2137
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.UntypedFormBuilder }, { type: i4.PryDialogService }], propDecorators: { dataset$: [{
|
|
2089
2138
|
type: Input
|
|
2090
2139
|
}] } });
|
|
2091
2140
|
|
|
@@ -2960,11 +3009,11 @@ class AdminSelectDatasetComponent extends SubscriptionnerDirective {
|
|
|
2960
3009
|
return this.access ? this.access.canModifyDataset(dataset) : of(false);
|
|
2961
3010
|
}
|
|
2962
3011
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminSelectDatasetComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i4.PryI18nService }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2963
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: AdminSelectDatasetComponent, selector: "pry-admin-select-dataset", usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"selectedDataset$ | async as dataset\"\n [id]=\"'panel-dataset-' + dataset.id\"\n [attr.aria-labelledby]=\"'button-dataset-' + dataset.id\"\n class=\"o-panel o-pry-admin-dataset-select\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 class=\"a-h3\">\n {{ '@pry.admin.dataset.
|
|
3012
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: AdminSelectDatasetComponent, selector: "pry-admin-select-dataset", usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"selectedDataset$ | async as dataset\"\n [id]=\"'panel-dataset-' + dataset.id\"\n [attr.aria-labelledby]=\"'button-dataset-' + dataset.id\"\n class=\"o-panel o-pry-admin-dataset-select\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 class=\"a-h3\">\n {{ '@pry.admin.dataset.datasetDetails' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"datasetDetails\" name=\"dataset.details\"></pry-tab>\n <pry-tab [templateRef]=\"datasetMetadata\" name=\"metadata.title\"></pry-tab>\n <pry-tab [templateRef]=\"datasetAssociations\" name=\"classes.associations\"></pry-tab>\n <pry-tab *ngIf=\"canModify$(dataset) | async\" [templateRef]=\"shareDataset\" name=\"share\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #datasetDetails>\n <div class=\"u-display-flex -column -gap-20\">\n <div>\n <h4 class=\"a-h4\">{{ '@pry.dataset.name' | i18n }}</h4>\n <span>{{ dataset.name }}</span>\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.dataset.description' | i18n }}</h4>\n @if (dataset.description) {\n <span>{{ dataset.description }}</span>\n } @else {\n <span class=\"-italic\">{{ '@pry.dataset.noDescription' | i18n }}</span>\n }\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.admin.customize.name' | i18n }}</h4>\n <span>{{ dataset.oClass | translateId: { type: 'class', output: 'name' } | async }}</span>\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.admin.dataset.type' | i18n }}</h4>\n <span>{{ '@pry.admin.dataset.' + dataset.type | i18n }}</span>\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.dataset.tags' | i18n }}</h4>\n @if (dataset.categories && dataset.categories.length > 0) {\n <div class=\"u-display-flex\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\">{{ category.name }}</span>\n }\n </div>\n } @else {\n <span class=\"-italic\">{{ '@pry.dataset.noTags' | i18n }}</span>\n }\n </div>\n </div>\n </ng-template>\n\n <ng-template #datasetMetadata>\n <pry-metadata-editor\n [targetId]=\"(selectedDataset$ | async)?.id ?? ''\"\n [isModification]=\"(editable$ | async) ?? false\"\n [metadata]=\"(datasetMetadata$ | async) ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addDatasetMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </ng-template>\n\n <ng-template #datasetAssociations>\n <div *ngIf=\"associations$ | async as associations\" class=\"o-tabs__panels__item__content\">\n <h4 class=\"a-h4\">{{ '@pry.admin.classes.associations' | i18n }}</h4>\n <pry-association [associations]=\"associations\"></pry-association>\n </div>\n </ng-template>\n\n <ng-template #shareDataset>\n <div class=\"o-pry-admin-dataset-select__share\">\n <pry-group-share\n [ngModel]=\"dataset.groups\"\n (ngModelChange)=\"changeGroup($event)\"\n (radioValueChange)=\"updateGroups($event)\"\n ></pry-group-share>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary u-self-end\"\n #submit\n (click)=\"share(dataset)\"\n [disabled]=\"disableShareButton$ | async\"\n >\n {{ '@pry.admin.validate' | i18n }}\n </button>\n @if (selectedDatasetMissingGroups$ | async) {\n <h4 class=\"a-h4\">{{ '@pry.admin.dataset.success' | i18n }}</h4>\n }\n @if (missingGroups$ | async; as missingGroups) {\n <div class=\"u-display-flex -column\">\n <span>{{ '@pry.admin.dataset.conflict' | i18n }}</span>\n @for (missing of missingGroups | keyvalue; track missing.key) {\n <div>\n {{ '@pry.admin.dataset.entities.dashboard' | i18n }} <strong>{{ missing.value.entityName }}</strong>\n <div class=\"u-display-flex\">\n @for (group of missing.value.groups; track group) {\n <span class=\"a-chip\">{{ getGroupLabel(group) }}</span>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"], outputs: ["clickedTabIdx"] }, { kind: "component", type: i4.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { 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: i6.PryMetadataEditorComponent, selector: "pry-metadata-editor", inputs: ["isModification", "targetId", "type", "metadata"], outputs: ["addMeta", "removeMeta"] }, { kind: "component", type: i4.PryGroupShareComponent, selector: "pry-group-share", inputs: ["disableRadios", "allowedGroups"], outputs: ["radioValueChange"] }, { kind: "component", type: PryAssociationComponent, selector: "pry-association", inputs: ["associations"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i4.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
2964
3013
|
}
|
|
2965
3014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminSelectDatasetComponent, decorators: [{
|
|
2966
3015
|
type: Component,
|
|
2967
|
-
args: [{ selector: 'pry-admin-select-dataset', template: "<div\n *ngIf=\"selectedDataset$ | async as dataset\"\n [id]=\"'panel-dataset-' + dataset.id\"\n [attr.aria-labelledby]=\"'button-dataset-' + dataset.id\"\n class=\"o-panel o-pry-admin-dataset-select\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 class=\"a-h3\">\n {{ '@pry.admin.dataset.
|
|
3016
|
+
args: [{ selector: 'pry-admin-select-dataset', template: "<div\n *ngIf=\"selectedDataset$ | async as dataset\"\n [id]=\"'panel-dataset-' + dataset.id\"\n [attr.aria-labelledby]=\"'button-dataset-' + dataset.id\"\n class=\"o-panel o-pry-admin-dataset-select\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 class=\"a-h3\">\n {{ '@pry.admin.dataset.datasetDetails' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"datasetDetails\" name=\"dataset.details\"></pry-tab>\n <pry-tab [templateRef]=\"datasetMetadata\" name=\"metadata.title\"></pry-tab>\n <pry-tab [templateRef]=\"datasetAssociations\" name=\"classes.associations\"></pry-tab>\n <pry-tab *ngIf=\"canModify$(dataset) | async\" [templateRef]=\"shareDataset\" name=\"share\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #datasetDetails>\n <div class=\"u-display-flex -column -gap-20\">\n <div>\n <h4 class=\"a-h4\">{{ '@pry.dataset.name' | i18n }}</h4>\n <span>{{ dataset.name }}</span>\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.dataset.description' | i18n }}</h4>\n @if (dataset.description) {\n <span>{{ dataset.description }}</span>\n } @else {\n <span class=\"-italic\">{{ '@pry.dataset.noDescription' | i18n }}</span>\n }\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.admin.customize.name' | i18n }}</h4>\n <span>{{ dataset.oClass | translateId: { type: 'class', output: 'name' } | async }}</span>\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.admin.dataset.type' | i18n }}</h4>\n <span>{{ '@pry.admin.dataset.' + dataset.type | i18n }}</span>\n </div>\n <div>\n <h4 class=\"a-h4\">{{ '@pry.dataset.tags' | i18n }}</h4>\n @if (dataset.categories && dataset.categories.length > 0) {\n <div class=\"u-display-flex\">\n @for (category of dataset.categories; track category.id) {\n <span class=\"a-chip -md\">{{ category.name }}</span>\n }\n </div>\n } @else {\n <span class=\"-italic\">{{ '@pry.dataset.noTags' | i18n }}</span>\n }\n </div>\n </div>\n </ng-template>\n\n <ng-template #datasetMetadata>\n <pry-metadata-editor\n [targetId]=\"(selectedDataset$ | async)?.id ?? ''\"\n [isModification]=\"(editable$ | async) ?? false\"\n [metadata]=\"(datasetMetadata$ | async) ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addDatasetMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </ng-template>\n\n <ng-template #datasetAssociations>\n <div *ngIf=\"associations$ | async as associations\" class=\"o-tabs__panels__item__content\">\n <h4 class=\"a-h4\">{{ '@pry.admin.classes.associations' | i18n }}</h4>\n <pry-association [associations]=\"associations\"></pry-association>\n </div>\n </ng-template>\n\n <ng-template #shareDataset>\n <div class=\"o-pry-admin-dataset-select__share\">\n <pry-group-share\n [ngModel]=\"dataset.groups\"\n (ngModelChange)=\"changeGroup($event)\"\n (radioValueChange)=\"updateGroups($event)\"\n ></pry-group-share>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary u-self-end\"\n #submit\n (click)=\"share(dataset)\"\n [disabled]=\"disableShareButton$ | async\"\n >\n {{ '@pry.admin.validate' | i18n }}\n </button>\n @if (selectedDatasetMissingGroups$ | async) {\n <h4 class=\"a-h4\">{{ '@pry.admin.dataset.success' | i18n }}</h4>\n }\n @if (missingGroups$ | async; as missingGroups) {\n <div class=\"u-display-flex -column\">\n <span>{{ '@pry.admin.dataset.conflict' | i18n }}</span>\n @for (missing of missingGroups | keyvalue; track missing.key) {\n <div>\n {{ '@pry.admin.dataset.entities.dashboard' | i18n }} <strong>{{ missing.value.entityName }}</strong>\n <div class=\"u-display-flex\">\n @for (group of missing.value.groups; track group) {\n <span class=\"a-chip\">{{ getGroupLabel(group) }}</span>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n" }]
|
|
2968
3017
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i4.PryI18nService }, { type: i4.PryBaseAccess, decorators: [{
|
|
2969
3018
|
type: Optional
|
|
2970
3019
|
}, {
|
|
@@ -6075,7 +6124,8 @@ const enTranslations = {
|
|
|
6075
6124
|
conflict: 'Careful, the following dashboards are shared to groups which can no longer access this datasource:',
|
|
6076
6125
|
entities: {
|
|
6077
6126
|
dashboard: 'Dashboard'
|
|
6078
|
-
}
|
|
6127
|
+
},
|
|
6128
|
+
addTag: 'Add a new tag'
|
|
6079
6129
|
},
|
|
6080
6130
|
'abac-rules': {
|
|
6081
6131
|
delete: 'Delete',
|
|
@@ -6168,16 +6218,9 @@ const enTranslations = {
|
|
|
6168
6218
|
info: 'Attribute information',
|
|
6169
6219
|
description: 'Description',
|
|
6170
6220
|
field: 'Field',
|
|
6221
|
+
dfield: 'Field',
|
|
6171
6222
|
category: 'Category',
|
|
6172
6223
|
multiValued: 'Multi valued'
|
|
6173
|
-
},
|
|
6174
|
-
category: {
|
|
6175
|
-
select: 'Select category',
|
|
6176
|
-
searchOrCreate: 'Search for existing category OR create a new one',
|
|
6177
|
-
name: 'Category',
|
|
6178
|
-
selectIt: 'Select category',
|
|
6179
|
-
create: 'Create category',
|
|
6180
|
-
add: 'does not exist. <br>You can create it here. <br>It will be automatically selected and added to categories list.'
|
|
6181
6224
|
}
|
|
6182
6225
|
},
|
|
6183
6226
|
fields: {
|
|
@@ -6282,6 +6325,27 @@ const enTranslations = {
|
|
|
6282
6325
|
POSTGIS: 'PostGIS',
|
|
6283
6326
|
ELASTIC: 'ElasticSearch'
|
|
6284
6327
|
}
|
|
6328
|
+
},
|
|
6329
|
+
shared: {
|
|
6330
|
+
noCategories: 'No categories available',
|
|
6331
|
+
categoryModal: {
|
|
6332
|
+
dataset: {
|
|
6333
|
+
select: 'Select tag',
|
|
6334
|
+
searchOrCreate: 'Search for existing tag OR create a new one',
|
|
6335
|
+
name: 'Tag',
|
|
6336
|
+
selectIt: 'Select tag',
|
|
6337
|
+
create: 'Create tag',
|
|
6338
|
+
add: 'does not exist. <br>You can create it here. <br>It will be automatically selected and added to the tag list.'
|
|
6339
|
+
},
|
|
6340
|
+
attribute: {
|
|
6341
|
+
select: 'Select category',
|
|
6342
|
+
searchOrCreate: 'Search for existing category OR create a new one',
|
|
6343
|
+
name: 'Category',
|
|
6344
|
+
selectIt: 'Select category',
|
|
6345
|
+
create: 'Create category',
|
|
6346
|
+
add: 'does not exist. <br>You can create it here. <br>It will be automatically selected and added to the category list.'
|
|
6347
|
+
}
|
|
6348
|
+
}
|
|
6285
6349
|
}
|
|
6286
6350
|
},
|
|
6287
6351
|
tooltip: {
|
|
@@ -6431,7 +6495,8 @@ const frTranslations = {
|
|
|
6431
6495
|
dataset: {
|
|
6432
6496
|
delete: "L'ensemble des versions et des données associées seront supprimées. Les restitutions et présentations utilisant ce jeu de données n'afficheront plus les données correspondantes. Confirmez-vous la suppression ?",
|
|
6433
6497
|
title: 'Jeux de données',
|
|
6434
|
-
details: 'Détails
|
|
6498
|
+
details: 'Détails',
|
|
6499
|
+
datasetDetails: 'Détails du jeu de données',
|
|
6435
6500
|
id: 'Identifiant',
|
|
6436
6501
|
name: 'Nom',
|
|
6437
6502
|
oClass: 'Modèle métier',
|
|
@@ -6450,7 +6515,8 @@ const frTranslations = {
|
|
|
6450
6515
|
conflict: "Attention, les tableaux de bord suivants sont partagés à des groupes qui n'auront plus accès aux données :",
|
|
6451
6516
|
entities: {
|
|
6452
6517
|
dashboard: 'Tableaux de bord'
|
|
6453
|
-
}
|
|
6518
|
+
},
|
|
6519
|
+
addTag: 'Ajouter un noueau tag'
|
|
6454
6520
|
},
|
|
6455
6521
|
'abac-rules': {
|
|
6456
6522
|
delete: 'Supprimer',
|
|
@@ -6546,14 +6612,6 @@ const frTranslations = {
|
|
|
6546
6612
|
field: 'Type',
|
|
6547
6613
|
category: 'Catégorie',
|
|
6548
6614
|
multiValued: 'Multi valué'
|
|
6549
|
-
},
|
|
6550
|
-
category: {
|
|
6551
|
-
select: 'Sélectionner une catégorie',
|
|
6552
|
-
searchOrCreate: 'Rechercher une catégorie existante OU en créer une nouvelle',
|
|
6553
|
-
name: 'Catégorie',
|
|
6554
|
-
selectIt: 'Sélectionner la catégorie',
|
|
6555
|
-
create: 'Créer la catégorie',
|
|
6556
|
-
add: "n'existe pas encore. <br>Il est possible \n de la créer ici. <br>Elle sera automatiquement sélectionnée et ajoutée à la liste des catégories."
|
|
6557
6615
|
}
|
|
6558
6616
|
},
|
|
6559
6617
|
fields: {
|
|
@@ -6659,6 +6717,27 @@ const frTranslations = {
|
|
|
6659
6717
|
POSTGIS: 'PostGIS',
|
|
6660
6718
|
ELASTIC: 'ElasticSearch'
|
|
6661
6719
|
}
|
|
6720
|
+
},
|
|
6721
|
+
shared: {
|
|
6722
|
+
categoryModal: {
|
|
6723
|
+
noCategories: "Aucune catégorie n'a été créée pour le moment",
|
|
6724
|
+
dataset: {
|
|
6725
|
+
select: 'Sélectionner un tag',
|
|
6726
|
+
searchOrCreate: 'Rechercher un tag existant OU en créer un nouveau',
|
|
6727
|
+
name: 'Tag',
|
|
6728
|
+
selectIt: 'Sélectionner le tag',
|
|
6729
|
+
create: 'Créer le tag',
|
|
6730
|
+
add: "n'existe pas encore. <br>Il est possible \n de le créer ici. <br>Il sera automatiquement sélectionné et ajouté à la liste des tags."
|
|
6731
|
+
},
|
|
6732
|
+
attribute: {
|
|
6733
|
+
select: 'Sélectionner une catégorie',
|
|
6734
|
+
searchOrCreate: 'Rechercher une catégorie existante OU en créer une nouvelle',
|
|
6735
|
+
name: 'Catégorie',
|
|
6736
|
+
selectIt: 'Sélectionner la catégorie',
|
|
6737
|
+
create: 'Créer la catégorie',
|
|
6738
|
+
add: "n'existe pas encore. <br>Il est possible \n de la créer ici. <br>Elle sera automatiquement sélectionnée et ajoutée à la liste des catégories."
|
|
6739
|
+
}
|
|
6740
|
+
}
|
|
6662
6741
|
}
|
|
6663
6742
|
},
|
|
6664
6743
|
tooltip: {
|
|
@@ -6730,9 +6809,10 @@ class AdminDatasetService {
|
|
|
6730
6809
|
.pipe(mergeMap((url) => this.httpClient.post(encodeURI(`${url}/datasets`), dataset)));
|
|
6731
6810
|
}
|
|
6732
6811
|
updateDataset(dataset) {
|
|
6733
|
-
return this.store
|
|
6734
|
-
|
|
6735
|
-
.
|
|
6812
|
+
return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => this.httpClient.put(encodeURI(`${url}/datasets`), {
|
|
6813
|
+
...dataset,
|
|
6814
|
+
categories: dataset.categories?.map((category) => category.id)
|
|
6815
|
+
})));
|
|
6736
6816
|
}
|
|
6737
6817
|
deleteDataset(id) {
|
|
6738
6818
|
return this.store
|
|
@@ -6759,6 +6839,11 @@ class AdminDatasetService {
|
|
|
6759
6839
|
.select(ConfigSelectors.refUrl)
|
|
6760
6840
|
.pipe(mergeMap((url) => this.httpClient.delete(encodeURI(`${url}/datasets/id/${datasetId}/metadata/id/${metadataId}`))));
|
|
6761
6841
|
}
|
|
6842
|
+
addCategory(category) {
|
|
6843
|
+
return this.store
|
|
6844
|
+
.select(ConfigSelectors.refUrl)
|
|
6845
|
+
.pipe(mergeMap((url) => this.httpClient.put(encodeURI(`${url}/datasets/categories`), { ...category })));
|
|
6846
|
+
}
|
|
6762
6847
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminDatasetService, deps: [{ token: i1.Store }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6763
6848
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminDatasetService, providedIn: 'root' }); }
|
|
6764
6849
|
}
|
|
@@ -6853,6 +6938,7 @@ class AdminDatasetEffects {
|
|
|
6853
6938
|
DataSourceActions.dataset.loadDataset()
|
|
6854
6939
|
];
|
|
6855
6940
|
})));
|
|
6941
|
+
this.addCategory$ = createEffect(() => this.actions$.pipe(ofType(AdminDatasetActions.addCategory), mergeMap((action) => this.datasetService.addCategory(action.category).pipe(map(() => DataSourceActions.dataset.getCategories()), catchError$1((error) => [AdminDatasetActions.failure({ error })])))));
|
|
6856
6942
|
}
|
|
6857
6943
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminDatasetEffects, deps: [{ token: i1$2.Actions }, { token: AdminDatasetService }, { token: i4.PryDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6858
6944
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminDatasetEffects }); }
|
|
@@ -6940,7 +7026,8 @@ class PryAdminModule {
|
|
|
6940
7026
|
AdminClassesCustomizeComponent,
|
|
6941
7027
|
AdminClassesCustomizeTooltipComponent,
|
|
6942
7028
|
AdminClassesCustomizeSymbolComponent,
|
|
6943
|
-
PryAssociationComponent
|
|
7029
|
+
PryAssociationComponent,
|
|
7030
|
+
AddCategoryModalComponent], imports: [CommonModule,
|
|
6944
7031
|
PryCoreModule,
|
|
6945
7032
|
AdminRoutingModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1.StoreFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, i1$2.EffectsFeatureModule, PryIconModule,
|
|
6946
7033
|
FormsModule,
|
|
@@ -6956,7 +7043,6 @@ class PryAdminModule {
|
|
|
6956
7043
|
DragDropModule,
|
|
6957
7044
|
PryI18nModule,
|
|
6958
7045
|
PryExpandPanelModule,
|
|
6959
|
-
PrySinceDateModule,
|
|
6960
7046
|
PryDatasetModule,
|
|
6961
7047
|
PryShareModule] }); }
|
|
6962
7048
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryAdminModule, providers: [DatePipe], imports: [CommonModule,
|
|
@@ -6998,7 +7084,6 @@ class PryAdminModule {
|
|
|
6998
7084
|
DragDropModule,
|
|
6999
7085
|
PryI18nModule,
|
|
7000
7086
|
PryExpandPanelModule,
|
|
7001
|
-
PrySinceDateModule,
|
|
7002
7087
|
PryDatasetModule,
|
|
7003
7088
|
PryShareModule] }); }
|
|
7004
7089
|
}
|
|
@@ -7079,7 +7164,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
7079
7164
|
AdminClassesCustomizeComponent,
|
|
7080
7165
|
AdminClassesCustomizeTooltipComponent,
|
|
7081
7166
|
AdminClassesCustomizeSymbolComponent,
|
|
7082
|
-
PryAssociationComponent
|
|
7167
|
+
PryAssociationComponent,
|
|
7168
|
+
AddCategoryModalComponent
|
|
7083
7169
|
],
|
|
7084
7170
|
imports: [
|
|
7085
7171
|
CommonModule,
|
|
@@ -7121,7 +7207,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
7121
7207
|
DragDropModule,
|
|
7122
7208
|
PryI18nModule,
|
|
7123
7209
|
PryExpandPanelModule,
|
|
7124
|
-
PrySinceDateModule,
|
|
7125
7210
|
PryDatasetModule,
|
|
7126
7211
|
PryShareModule
|
|
7127
7212
|
]
|