@provoly/dashboard 0.20.1 → 0.20.3
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/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.d.ts +5 -2
- package/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.d.ts +1 -1
- package/admin/i18n/en.translations.d.ts +1 -0
- package/admin/i18n/fr.translations.d.ts +1 -0
- package/esm2022/admin/components/admin-classes/admin-classes-customize/admin-classes-customize.component.mjs +5 -5
- package/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +3 -3
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +36 -11
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-new/admin-attributes-new.component.mjs +1 -1
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-select/admin-attributes-select.component.mjs +3 -3
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-classes-view.component.mjs +3 -3
- package/esm2022/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.mjs +2 -2
- package/esm2022/admin/i18n/en.translations.mjs +3 -2
- package/esm2022/admin/i18n/fr.translations.mjs +3 -2
- package/esm2022/lib/core/components/about/about.component.mjs +8 -5
- package/esm2022/lib/core/model/admin-api.model.mjs +1 -1
- package/esm2022/lib/core/model/filter.interface.mjs +1 -1
- package/esm2022/lib/core/store/class/class.interface.mjs +1 -1
- package/esm2022/lib/core/store/class/class.selectors.mjs +6 -2
- package/esm2022/lib/core/store/search/search.actions.mjs +2 -2
- package/esm2022/lib/core/store/search/search.service.mjs +1 -1
- package/esm2022/lib/dashboard/action-bus/service/bus.service.mjs +2 -2
- package/esm2022/lib/dashboard/components/context-menu/object-edition/object-edition.component.mjs +26 -26
- package/esm2022/lib/dashboard/components/dashboard.component.mjs +4 -1
- package/esm2022/lib/dashboard/item-utils.mjs +7 -7
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -2
- package/esm2022/lib/dashboard/store/proxy.utils.mjs +4 -24
- package/esm2022/pipeline/store/pipeline.actions.mjs +1 -1
- package/esm2022/pipeline-components/filter/component/filter.component.mjs +4 -4
- package/esm2022/presentation/components/presentation.component.mjs +3 -3
- package/esm2022/restitution/components/restitution/restitution.component.mjs +5 -5
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +3 -3
- package/esm2022/restitution/i18n/en.translations.mjs +2 -2
- package/esm2022/restitution/i18n/fr.translations.mjs +2 -2
- package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +3 -3
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +10 -3
- package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +12 -12
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +4 -4
- package/esm2022/widgets/widget-map/pipe/widget-map-geometry-fields-for.pipe.mjs +3 -3
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +2 -2
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +10 -6
- package/esm2022/widgets/widget-table/component/widget-table.component.mjs +4 -4
- package/esm2022/widgets/widget-table/get-value/get-value.pipe.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +49 -22
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline-components-filter.mjs +3 -3
- package/fesm2022/provoly-dashboard-pipeline-components-filter.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +8 -8
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +2 -2
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +9 -2
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs +11 -11
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +15 -11
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +4 -4
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +51 -61
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/about/about.component.d.ts +2 -1
- package/lib/core/model/admin-api.model.d.ts +1 -0
- package/lib/core/model/filter.interface.d.ts +1 -1
- package/lib/core/store/class/class.interface.d.ts +1 -0
- package/lib/core/store/class/class.selectors.d.ts +105 -5
- package/lib/core/store/search/search.actions.d.ts +2 -2
- package/lib/core/store/search/search.service.d.ts +1 -1
- package/lib/dashboard/store/dashboard.actions.d.ts +2 -2
- package/lib/dashboard/store/dashboard.effects.d.ts +3 -3
- package/lib/dashboard/store/proxy.utils.d.ts +1 -1
- package/package.json +1 -1
- package/pipeline/store/pipeline.actions.d.ts +1 -1
- package/styles/components/_o-about.scss +44 -6
- package/styles-theme/components-theme/_a-pry-select.theme.scss +1 -1
- package/toolbox/components/filter-settings/filter-settings.component.d.ts +2 -2
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +1 -0
|
@@ -11,7 +11,7 @@ export class GetValuePipe {
|
|
|
11
11
|
transform(value, ...args) {
|
|
12
12
|
return this.store.select(ClassSelectors.classes).pipe(combineLatestWith(this.store.select(FieldSelectors.fields)), filter(([classes, fields]) => !!classes && classes.length > 0), map(([classes, fields]) => {
|
|
13
13
|
const oClass = classes.find((cl) => cl.id === value.oClass);
|
|
14
|
-
const attribute = oClass?.attributes.find((attr) => attr.
|
|
14
|
+
const attribute = oClass?.attributes.find((attr) => attr.technicalName === args[0]);
|
|
15
15
|
if (!!attribute) {
|
|
16
16
|
const field = fields.find((f) => f.id === attribute.field);
|
|
17
17
|
if (field &&
|
|
@@ -40,4 +40,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
40
40
|
type: Pipe,
|
|
41
41
|
args: [{ name: 'getValue' }]
|
|
42
42
|
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
43
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXZhbHVlLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9wcm92b2x5L2Rhc2hib2FyZC93aWRnZXRzL3dpZGdldC10YWJsZS9nZXQtdmFsdWUvZ2V0LXZhbHVlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFFcEQsT0FBTyxFQUFFLGNBQWMsRUFBRSxjQUFjLEVBQUUsU0FBUyxFQUFRLFNBQVMsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ2hHLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN6QyxPQUFPLEVBQUUsTUFBTSxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7QUFHN0MsTUFBTSxPQUFPLFlBQVk7SUFDdkIsWUFBb0IsS0FBaUI7UUFBakIsVUFBSyxHQUFMLEtBQUssQ0FBWTtJQUFHLENBQUM7SUFFekMsU0FBUyxDQUFDLEtBQVcsRUFBRSxHQUFHLElBQVc7UUFDbkMsT0FBTyxJQUFJLENBQUMsS0F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@@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
1031
1031
|
if (component) {
|
|
1032
1032
|
component.instance.data.item = this.fields
|
|
1033
1033
|
.map((attr) => ({
|
|
1034
|
-
[attr.
|
|
1034
|
+
[attr.technicalName]: {
|
|
1035
1035
|
type: 'VALUE',
|
|
1036
|
-
value: '«' + this.translateService.instant('@pry.admin.customize.exemple', { expr: attr.
|
|
1036
|
+
value: '«' + this.translateService.instant('@pry.admin.customize.exemple', { expr: attr.technicalName }) + '»',
|
|
1037
1037
|
visible: true
|
|
1038
1038
|
}
|
|
1039
1039
|
}))
|
|
@@ -1238,15 +1238,15 @@ class AdminClassesCustomizeComponent extends SubscriptionnerDirective {
|
|
|
1238
1238
|
this.subscriptions.add(this.currentPropertiesConfig$.pipe(combineLatestWith(this.currentClass$)).subscribe(([attrs, clazz]) => {
|
|
1239
1239
|
this.defaultAttributes = JSON.parse(JSON.stringify(attrs));
|
|
1240
1240
|
this.otherAttributes = (clazz ?? { attributes: [] }).attributes
|
|
1241
|
-
.
|
|
1242
|
-
.
|
|
1241
|
+
.filter((attr) => !attrs.includes(attr.technicalName))
|
|
1242
|
+
.map((attr) => attr.technicalName);
|
|
1243
1243
|
}));
|
|
1244
1244
|
this.currentTilePropertiesConfig$ = this.store.select(ConfigSelectors.tileAttributesDefinitions).pipe(combineLatestWith(this.currentClass$, this.fields$), map(([defs, clazz, fields]) => ItemUtils.getAttributesDefinitionForClass((clazz ?? { attributes: [] }), defs, fields)), map((attrs) => attrs.filter((_, i) => i < this.maxTilesAttributes)));
|
|
1245
1245
|
this.subscriptions.add(this.currentTilePropertiesConfig$.pipe(combineLatestWith(this.currentClass$)).subscribe(([attrs, clazz]) => {
|
|
1246
1246
|
this.defaultTileAttributes = JSON.parse(JSON.stringify(attrs));
|
|
1247
1247
|
this.otherTileAttributes = (clazz ?? { attributes: [] }).attributes
|
|
1248
|
-
.
|
|
1249
|
-
.
|
|
1248
|
+
.filter((attr) => !attrs.includes(attr.technicalName))
|
|
1249
|
+
.map((attr) => attr.technicalName);
|
|
1250
1250
|
}));
|
|
1251
1251
|
this.subscriptions.add(this.store.select(ConfigSelectors.maxAttributesInTiles).subscribe((max) => {
|
|
1252
1252
|
this.maxTilesAttributes = max;
|
|
@@ -1430,8 +1430,9 @@ class AdminAttributesFormComponent {
|
|
|
1430
1430
|
this.viewContainerRef = viewContainerRef;
|
|
1431
1431
|
this.i18nService = i18nService;
|
|
1432
1432
|
this.sub = new Subscription();
|
|
1433
|
-
this.fieldTypeDescription = FIELD_OPTIONS;
|
|
1434
1433
|
this.nameAlreadyExists = false;
|
|
1434
|
+
this.technicalNameAlreadyExists = false;
|
|
1435
|
+
this.fieldTypeDescription = FIELD_OPTIONS;
|
|
1435
1436
|
this.isShowedCategory = false;
|
|
1436
1437
|
this.catToAdd = {};
|
|
1437
1438
|
this.filterCategories$ = new BehaviorSubject(undefined);
|
|
@@ -1441,7 +1442,11 @@ class AdminAttributesFormComponent {
|
|
|
1441
1442
|
this.categories$ = combineLatest([this.store.select(CategorySelectors.categories), this.filterCategories$]).pipe(map(([categories, filter]) => categories.filter((cat) => !filter || cat.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))));
|
|
1442
1443
|
this.attrForm = this.formBuilder.group({
|
|
1443
1444
|
id: [v4()],
|
|
1444
|
-
|
|
1445
|
+
technicalName: [
|
|
1446
|
+
'',
|
|
1447
|
+
[Validators.required, Validators.minLength(2), Validators.maxLength(100), noWhitespaceValidator]
|
|
1448
|
+
],
|
|
1449
|
+
name: ['', [Validators.maxLength(50), noWhitespaceValidator]],
|
|
1445
1450
|
description: [{ value: '', disabled: true }],
|
|
1446
1451
|
field: ['', [Validators.required]],
|
|
1447
1452
|
category: [DEFAULT_CATEGORY_UUID],
|
|
@@ -1450,12 +1455,15 @@ class AdminAttributesFormComponent {
|
|
|
1450
1455
|
}
|
|
1451
1456
|
ngOnInit() {
|
|
1452
1457
|
this.attributeNames = this.interClass?.attributes.map((attr) => attr.name);
|
|
1458
|
+
this.attributeTechnicalNames = this.interClass?.attributes.map((attr) => attr.technicalName);
|
|
1453
1459
|
if (this.selectedClass) {
|
|
1454
1460
|
this.attributeNames = this.selectedClass.attributes.map((attr) => attr.name);
|
|
1461
|
+
this.attributeTechnicalNames = this.selectedClass.attributes.map((attr) => attr.technicalName);
|
|
1455
1462
|
if (this.selectedAttribute) {
|
|
1456
1463
|
this.attrForm.patchValue({
|
|
1457
1464
|
id: this.selectedAttribute.id,
|
|
1458
|
-
|
|
1465
|
+
technicalName: this.selectedAttribute.technicalName,
|
|
1466
|
+
name: this.selectedAttribute.name ?? this.selectedAttribute.technicalName,
|
|
1459
1467
|
field: this.selectedAttribute.field,
|
|
1460
1468
|
category: this.selectedAttribute.category
|
|
1461
1469
|
});
|
|
@@ -1463,12 +1471,19 @@ class AdminAttributesFormComponent {
|
|
|
1463
1471
|
}
|
|
1464
1472
|
}
|
|
1465
1473
|
if (this.attributeNames) {
|
|
1466
|
-
this.nameAlreadyExists$ =
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
]).pipe(map(([value, attributeNames]) => attributeNames.includes(value) && value != this.selectedAttribute?.name));
|
|
1474
|
+
this.nameAlreadyExists$ = this.attrForm
|
|
1475
|
+
.get('name')
|
|
1476
|
+
.valueChanges.pipe(map((value) => !!this.attributeNames?.includes(value) && value != this.selectedAttribute?.name));
|
|
1470
1477
|
this.sub.add(this.nameAlreadyExists$.subscribe((value) => (this.nameAlreadyExists = value)));
|
|
1471
1478
|
}
|
|
1479
|
+
if (this.attributeTechnicalNames) {
|
|
1480
|
+
this.technicalNameAlreadyExists$ = this.attrForm
|
|
1481
|
+
.get('technicalName')
|
|
1482
|
+
.valueChanges.pipe(map((value) => !!this.attributeTechnicalNames?.includes(value) && value != this.selectedAttribute?.technicalName));
|
|
1483
|
+
this.sub.add(this.technicalNameAlreadyExists$.subscribe((value) => {
|
|
1484
|
+
this.technicalNameAlreadyExists = value;
|
|
1485
|
+
}));
|
|
1486
|
+
}
|
|
1472
1487
|
this.selectedFieldTypeDescription$ = this.attrForm.get('field')?.valueChanges.pipe(startWith(this.attrForm.get('field')?.value), distinctUntilChanged$1(), switchMap((selectedFieldId) => {
|
|
1473
1488
|
return this.fields$.pipe(map((fields) => {
|
|
1474
1489
|
const fieldDescription = this.fieldTypeDescription.find((fieldType) => fieldType.varType === fields.find((field) => field.id === selectedFieldId)?.type);
|
|
@@ -1488,6 +1503,16 @@ class AdminAttributesFormComponent {
|
|
|
1488
1503
|
this.attrForm.patchValue({
|
|
1489
1504
|
name: this.attrForm.value.name.trim()
|
|
1490
1505
|
});
|
|
1506
|
+
if (!this.attrForm.value.name) {
|
|
1507
|
+
this.attrForm.patchValue({
|
|
1508
|
+
name: this.attrForm.value.technicalName.slice(0, 50)
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
if (this.attributeNames?.includes(this.attrForm.value.technicalName.slice(0, 50))) {
|
|
1512
|
+
this.nameAlreadyExists = true;
|
|
1513
|
+
this.attrForm.controls['name'].setErrors({ alreadyExists: true });
|
|
1514
|
+
return;
|
|
1515
|
+
}
|
|
1491
1516
|
if (this.attrForm.valid) {
|
|
1492
1517
|
let attrToSave = this.attrForm.getRawValue();
|
|
1493
1518
|
let path = this.router.createUrlTree(['..'], { relativeTo: this.route });
|
|
@@ -1543,11 +1568,11 @@ class AdminAttributesFormComponent {
|
|
|
1543
1568
|
this.closeCategory();
|
|
1544
1569
|
}
|
|
1545
1570
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminAttributesFormComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3$1.UntypedFormBuilder }, { token: i5.Overlay }, { token: i0.ViewContainerRef }, { token: i4.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 }], 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_name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</label>\n <input id=\"attr_name\" type=\"text\" class=\"a-form-field\" formControlName=\"name\" required />\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('required')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{ '@pry.admin.required' | i18n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('name')?.hasError('minlength')\">\n <label class=\"a-label a-label--help -error\" for=\"attr_name\">{{\n '@pry.admin.minLength' | i18n : { len: 2 }\n }}</label>\n </div>\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: 100 }\n }}</label>\n </div>\n <div *ngIf=\"attrForm.get('name')?.hasError('whitespace') && !attrForm.get('name')?.hasError('minlength')\">\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=\"title-container\">\n <pry-select\n id=\"type\"\n class=\"a-pry-select\"\n formControlName=\"field\"\n [items]=\"fields$ | async\"\n [itemsAsOption]=\"true\"\n [autocomplete]=\"true\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [isForm]=\"true\"\n required=\"true\"\n [templateLabel]=\"templateOption\"\n [templateOption]=\"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-chips\" *ngIf=\"item.crs\">{{ item.crs }}</div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"selectedFieldTypeDescription$ | async as description\">\n <div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n </div>\n <div class=\"description-tooltip title-tooltip\">\n <p class=\"a-p -date\">{{ description }}</p>\n </div>\n </ng-container>\n </div>\n <div *ngIf=\"attrForm.get('field')?.invalid\">\n <div *ngIf=\"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 [labelTranslate]=\"true\"\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\"\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 scole=\"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--ghost 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: ["labelTranslate", "baseTranslate", "translationFn", "translationFnArgs", "clearable", "multiple", "multipleClearRight", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "items", "itemsAsOption", "bindData", "bindValue", "bindLabel", "bindIcon", "iconSize", "templateLabel", "templateOption", "autocomplete"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 }], 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=\"title-container\">\n <pry-select\n id=\"type\"\n class=\"a-pry-select\"\n formControlName=\"field\"\n [items]=\"fields$ | async\"\n [itemsAsOption]=\"true\"\n [autocomplete]=\"true\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [isForm]=\"true\"\n required=\"true\"\n [templateLabel]=\"templateOption\"\n [templateOption]=\"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-chips\" *ngIf=\"item.crs\">{{ item.crs }}</div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"selectedFieldTypeDescription$ | async as description\">\n <div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n </div>\n <div class=\"description-tooltip title-tooltip\">\n <p class=\"a-p -date\">{{ description }}</p>\n </div>\n </ng-container>\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 [labelTranslate]=\"true\"\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 scole=\"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--ghost 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: ["labelTranslate", "baseTranslate", "translationFn", "translationFnArgs", "clearable", "multiple", "multipleClearRight", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "items", "itemsAsOption", "bindData", "bindValue", "bindLabel", "bindIcon", "iconSize", "templateLabel", "templateOption", "autocomplete"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1547
1572
|
}
|
|
1548
1573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminAttributesFormComponent, decorators: [{
|
|
1549
1574
|
type: Component,
|
|
1550
|
-
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=\"
|
|
1575
|
+
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=\"title-container\">\n <pry-select\n id=\"type\"\n class=\"a-pry-select\"\n formControlName=\"field\"\n [items]=\"fields$ | async\"\n [itemsAsOption]=\"true\"\n [autocomplete]=\"true\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [isForm]=\"true\"\n required=\"true\"\n [templateLabel]=\"templateOption\"\n [templateOption]=\"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-chips\" *ngIf=\"item.crs\">{{ item.crs }}</div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"selectedFieldTypeDescription$ | async as description\">\n <div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n </div>\n <div class=\"description-tooltip title-tooltip\">\n <p class=\"a-p -date\">{{ description }}</p>\n </div>\n </ng-container>\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 [labelTranslate]=\"true\"\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 scole=\"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--ghost 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" }]
|
|
1551
1576
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.UntypedFormBuilder }, { type: i5.Overlay }, { type: i0.ViewContainerRef }, { type: i4.PryI18nService }]; }, propDecorators: { selectedClass: [{
|
|
1552
1577
|
type: Input
|
|
1553
1578
|
}], interClass: [{
|
|
@@ -1761,11 +1786,11 @@ class AdminClassesViewComponent {
|
|
|
1761
1786
|
this.dispatchCloseModal();
|
|
1762
1787
|
}
|
|
1763
1788
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminClassesViewComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i5.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1764
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdminClassesViewComponent, selector: "pry-admin-classes-view", viewQueries: [{ propertyName: "confirmationModal", first: true, predicate: ["confirmationModal"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"(selectedclass$ | async) || (interClass$ | async) as selectedClass\">\n <div class=\"o-base-container\">\n <h1 class=\"a-h1\">\n {{ '@pry.admin.classes.title' | i18n: { class: selectedClass.name } }}\n </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.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th></th>\n <th prySortHeader=\"name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</th>\n <th prySortHeader=\"field\">{{ '@pry.admin.classes.attributes.field' | i18n }}</th>\n <th prySortHeader=\"category\">{{ '@pry.admin.classes.attributes.category' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let attr of attributesExtended$ | async | prySortData: sortActive : sortDirection\"\n (click)=\"selectAttr(attr)\"\n [class.is-selected]=\"(selectedAttributeId$ | async) === attr.id\"\n >\n <td class=\"view-details\">\n <button\n [id]=\"'button-attr-' + attr.id\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.action.viewDetails' | i18n }}\"\n [attr.aria-expanded]=\"(selectedAttributeId$ | async) === attr.id\"\n aria-haspopup\n [attr.aria-controls]=\"'panel-attr-' + attr.id\"\n >\n <span class=\"u-visually-hidden\">{{ attr.name }}, {{ '@pry.action.viewDetails' | i18n }}</span>\n <pry-icon iconSvg=\"eye\" [width]=\"15\" [height]=\"15\"></pry-icon>\n </button>\n </td>\n <td>{{ attr.name }}</td>\n <td>{{ attr.fieldName }}</td>\n <td>{{ attr.categoryName }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-container>\n\n<ng-template #confirmationModal>\n <div class=\"o-modal\">\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.createClassConfirmMessage' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"dispatchCloseModal()\">\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 <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"saveClass()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"dispatchCloseModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n </div>\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: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i4.PrySortHeaderComponent, selector: "th[prySortHeader]", inputs: ["prySortHeader"], outputs: ["sortChange"] }, { kind: "directive", type: i4.PrySortHeaderDirective, selector: "[prySortHeader]" }, { kind: "directive", type: i4.PrySortTableDirective, selector: "[prySortTable]", inputs: ["prySortActive", "prySortDirection"], outputs: ["prySortChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.PrySortDataPipe, name: "prySortData" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1789
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdminClassesViewComponent, selector: "pry-admin-classes-view", viewQueries: [{ propertyName: "confirmationModal", first: true, predicate: ["confirmationModal"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"(selectedclass$ | async) || (interClass$ | async) as selectedClass\">\n <div class=\"o-base-container\">\n <h1 class=\"a-h1\">\n {{ '@pry.admin.classes.title' | i18n : { class: selectedClass.name } }}\n </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.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th></th>\n <th prySortHeader=\"technicalName\">{{ '@pry.admin.classes.attributes.technicalName' | i18n }}</th>\n <th prySortHeader=\"name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</th>\n <th prySortHeader=\"field\">{{ '@pry.admin.classes.attributes.field' | i18n }}</th>\n <th prySortHeader=\"category\">{{ '@pry.admin.classes.attributes.category' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let attr of attributesExtended$ | async | prySortData : sortActive : sortDirection\"\n (click)=\"selectAttr(attr)\"\n [class.is-selected]=\"(selectedAttributeId$ | async) === attr.id\"\n >\n <td class=\"view-details\">\n <button\n [id]=\"'button-attr-' + attr.id\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.action.viewDetails' | i18n }}\"\n [attr.aria-expanded]=\"(selectedAttributeId$ | async) === attr.id\"\n aria-haspopup\n [attr.aria-controls]=\"'panel-attr-' + attr.id\"\n >\n <span class=\"u-visually-hidden\">{{ attr.name }}, {{ '@pry.action.viewDetails' | i18n }}</span>\n <pry-icon iconSvg=\"eye\" [width]=\"15\" [height]=\"15\"></pry-icon>\n </button>\n </td>\n <td>{{ attr.technicalName }}</td>\n <td>{{ attr.name }}</td>\n <td>{{ attr.fieldName }}</td>\n <td>{{ attr.categoryName }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-container>\n\n<ng-template #confirmationModal>\n <div class=\"o-modal\">\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.createClassConfirmMessage' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"dispatchCloseModal()\">\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 <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"saveClass()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"dispatchCloseModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n </div>\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: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i4.PrySortHeaderComponent, selector: "th[prySortHeader]", inputs: ["prySortHeader"], outputs: ["sortChange"] }, { kind: "directive", type: i4.PrySortHeaderDirective, selector: "[prySortHeader]" }, { kind: "directive", type: i4.PrySortTableDirective, selector: "[prySortTable]", inputs: ["prySortActive", "prySortDirection"], outputs: ["prySortChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.PrySortDataPipe, name: "prySortData" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1765
1790
|
}
|
|
1766
1791
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminClassesViewComponent, decorators: [{
|
|
1767
1792
|
type: Component,
|
|
1768
|
-
args: [{ selector: 'pry-admin-classes-view', template: "<ng-container *ngIf=\"(selectedclass$ | async) || (interClass$ | async) as selectedClass\">\n <div class=\"o-base-container\">\n <h1 class=\"a-h1\">\n {{ '@pry.admin.classes.title' | i18n: { class: selectedClass.name } }}\n </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.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th></th>\n <th prySortHeader=\"name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</th>\n <th prySortHeader=\"field\">{{ '@pry.admin.classes.attributes.field' | i18n }}</th>\n <th prySortHeader=\"category\">{{ '@pry.admin.classes.attributes.category' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let attr of attributesExtended$ | async | prySortData: sortActive : sortDirection\"\n (click)=\"selectAttr(attr)\"\n [class.is-selected]=\"(selectedAttributeId$ | async) === attr.id\"\n >\n <td class=\"view-details\">\n <button\n [id]=\"'button-attr-' + attr.id\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.action.viewDetails' | i18n }}\"\n [attr.aria-expanded]=\"(selectedAttributeId$ | async) === attr.id\"\n aria-haspopup\n [attr.aria-controls]=\"'panel-attr-' + attr.id\"\n >\n <span class=\"u-visually-hidden\">{{ attr.name }}, {{ '@pry.action.viewDetails' | i18n }}</span>\n <pry-icon iconSvg=\"eye\" [width]=\"15\" [height]=\"15\"></pry-icon>\n </button>\n </td>\n <td>{{ attr.name }}</td>\n <td>{{ attr.fieldName }}</td>\n <td>{{ attr.categoryName }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-container>\n\n<ng-template #confirmationModal>\n <div class=\"o-modal\">\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.createClassConfirmMessage' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"dispatchCloseModal()\">\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 <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"saveClass()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"dispatchCloseModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
|
|
1793
|
+
args: [{ selector: 'pry-admin-classes-view', template: "<ng-container *ngIf=\"(selectedclass$ | async) || (interClass$ | async) as selectedClass\">\n <div class=\"o-base-container\">\n <h1 class=\"a-h1\">\n {{ '@pry.admin.classes.title' | i18n : { class: selectedClass.name } }}\n </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.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th></th>\n <th prySortHeader=\"technicalName\">{{ '@pry.admin.classes.attributes.technicalName' | i18n }}</th>\n <th prySortHeader=\"name\">{{ '@pry.admin.classes.attributes.name' | i18n }}</th>\n <th prySortHeader=\"field\">{{ '@pry.admin.classes.attributes.field' | i18n }}</th>\n <th prySortHeader=\"category\">{{ '@pry.admin.classes.attributes.category' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let attr of attributesExtended$ | async | prySortData : sortActive : sortDirection\"\n (click)=\"selectAttr(attr)\"\n [class.is-selected]=\"(selectedAttributeId$ | async) === attr.id\"\n >\n <td class=\"view-details\">\n <button\n [id]=\"'button-attr-' + attr.id\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.action.viewDetails' | i18n }}\"\n [attr.aria-expanded]=\"(selectedAttributeId$ | async) === attr.id\"\n aria-haspopup\n [attr.aria-controls]=\"'panel-attr-' + attr.id\"\n >\n <span class=\"u-visually-hidden\">{{ attr.name }}, {{ '@pry.action.viewDetails' | i18n }}</span>\n <pry-icon iconSvg=\"eye\" [width]=\"15\" [height]=\"15\"></pry-icon>\n </button>\n </td>\n <td>{{ attr.technicalName }}</td>\n <td>{{ attr.name }}</td>\n <td>{{ attr.fieldName }}</td>\n <td>{{ attr.categoryName }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-container>\n\n<ng-template #confirmationModal>\n <div class=\"o-modal\">\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.createClassConfirmMessage' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"dispatchCloseModal()\">\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 <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"saveClass()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"dispatchCloseModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
|
|
1769
1794
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i5.Overlay }, { type: i0.ViewContainerRef }]; }, propDecorators: { confirmationModal: [{
|
|
1770
1795
|
type: ViewChild,
|
|
1771
1796
|
args: ['confirmationModal', { read: TemplateRef }]
|
|
@@ -2717,11 +2742,11 @@ class AdminAttributesSelectComponent {
|
|
|
2717
2742
|
}
|
|
2718
2743
|
}
|
|
2719
2744
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminAttributesSelectComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2720
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdminAttributesSelectComponent, selector: "pry-admin-attribute-select", ngImport: i0, template: "<div\n *ngIf=\"selectedAttribute$ | async as attribute\"\n [id]=\"'panel-attr-' + attribute.id\"\n [attr.aria-labelledby]=\"'button-attr-' + attribute.id\"\n class=\"o-panel\"\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.classes.attributes.info' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"attributeDetails\" name=\"details\"></pry-tab>\n <pry-tab [templateRef]=\"attributeAssociations\" name=\"classes.associations\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #attributeDetails>\n <h4 class=\"a-h4\">{{ '@pry.admin.properties' | i18n }}</h4>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.name' | i18n }} :\n <strong>{{ attribute.name }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.field' | i18n }} :\n <strong>{{ attribute.fieldName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.category' | i18n }} :\n <strong>{{ attribute.categoryName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.multiValued' | i18n }} :\n <strong>{{ attribute.multiValued }}</strong>\n </p>\n </ng-template>\n\n <ng-template #attributeAssociations>\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</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"] }, { 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: "component", type: PryAssociationComponent, selector: "pry-association", inputs: ["associations"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
2745
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdminAttributesSelectComponent, selector: "pry-admin-attribute-select", ngImport: i0, template: "<div\n *ngIf=\"selectedAttribute$ | async as attribute\"\n [id]=\"'panel-attr-' + attribute.id\"\n [attr.aria-labelledby]=\"'button-attr-' + attribute.id\"\n class=\"o-panel\"\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.classes.attributes.info' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"attributeDetails\" name=\"details\"></pry-tab>\n <pry-tab [templateRef]=\"attributeAssociations\" name=\"classes.associations\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #attributeDetails>\n <h4 class=\"a-h4\">{{ '@pry.admin.properties' | i18n }}</h4>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.technicalName' | i18n }} :\n <strong>{{ attribute.technicalName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.name' | i18n }} :\n <strong>{{ attribute.name }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.field' | i18n }} :\n <strong>{{ attribute.fieldName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.category' | i18n }} :\n <strong>{{ attribute.categoryName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.multiValued' | i18n }} :\n <strong>{{ attribute.multiValued }}</strong>\n </p>\n </ng-template>\n\n <ng-template #attributeAssociations>\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</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"] }, { 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: "component", type: PryAssociationComponent, selector: "pry-association", inputs: ["associations"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
2721
2746
|
}
|
|
2722
2747
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminAttributesSelectComponent, decorators: [{
|
|
2723
2748
|
type: Component,
|
|
2724
|
-
args: [{ selector: 'pry-admin-attribute-select', template: "<div\n *ngIf=\"selectedAttribute$ | async as attribute\"\n [id]=\"'panel-attr-' + attribute.id\"\n [attr.aria-labelledby]=\"'button-attr-' + attribute.id\"\n class=\"o-panel\"\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.classes.attributes.info' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"attributeDetails\" name=\"details\"></pry-tab>\n <pry-tab [templateRef]=\"attributeAssociations\" name=\"classes.associations\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #attributeDetails>\n <h4 class=\"a-h4\">{{ '@pry.admin.properties' | i18n }}</h4>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.name' | i18n }} :\n <strong>{{ attribute.name }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.field' | i18n }} :\n <strong>{{ attribute.fieldName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.category' | i18n }} :\n <strong>{{ attribute.categoryName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.multiValued' | i18n }} :\n <strong>{{ attribute.multiValued }}</strong>\n </p>\n </ng-template>\n\n <ng-template #attributeAssociations>\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</div>\n" }]
|
|
2749
|
+
args: [{ selector: 'pry-admin-attribute-select', template: "<div\n *ngIf=\"selectedAttribute$ | async as attribute\"\n [id]=\"'panel-attr-' + attribute.id\"\n [attr.aria-labelledby]=\"'button-attr-' + attribute.id\"\n class=\"o-panel\"\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.classes.attributes.info' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"attributeDetails\" name=\"details\"></pry-tab>\n <pry-tab [templateRef]=\"attributeAssociations\" name=\"classes.associations\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #attributeDetails>\n <h4 class=\"a-h4\">{{ '@pry.admin.properties' | i18n }}</h4>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.technicalName' | i18n }} :\n <strong>{{ attribute.technicalName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.name' | i18n }} :\n <strong>{{ attribute.name }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.field' | i18n }} :\n <strong>{{ attribute.fieldName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.category' | i18n }} :\n <strong>{{ attribute.categoryName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.classes.attributes.multiValued' | i18n }} :\n <strong>{{ attribute.multiValued }}</strong>\n </p>\n </ng-template>\n\n <ng-template #attributeAssociations>\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</div>\n" }]
|
|
2725
2750
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }]; } });
|
|
2726
2751
|
|
|
2727
2752
|
class AdminSelectDatasetComponent extends SubscriptionnerDirective {
|
|
@@ -2897,7 +2922,7 @@ class AdminFieldsSelectComponent {
|
|
|
2897
2922
|
return classes
|
|
2898
2923
|
.map((clazz) => clazz.attributes
|
|
2899
2924
|
.filter((attribute) => attribute.field === field?.id)
|
|
2900
|
-
.map((attribute) => ({
|
|
2925
|
+
.map((attribute) => ({ technicalName: attribute.technicalName, classId: clazz.id })))
|
|
2901
2926
|
.flat();
|
|
2902
2927
|
}));
|
|
2903
2928
|
}
|
|
@@ -5993,7 +6018,8 @@ const enTranslations = {
|
|
|
5993
6018
|
attributes: {
|
|
5994
6019
|
add: 'business model Add attribute',
|
|
5995
6020
|
edit: 'Edit attribute',
|
|
5996
|
-
name: 'Attribute
|
|
6021
|
+
name: 'Attribute label',
|
|
6022
|
+
technicalName: 'Technical name',
|
|
5997
6023
|
info: 'Attribute information',
|
|
5998
6024
|
description: 'Description',
|
|
5999
6025
|
field: 'Field',
|
|
@@ -6362,7 +6388,8 @@ const frTranslations = {
|
|
|
6362
6388
|
edit: "Modifier l'attribut",
|
|
6363
6389
|
info: "Détail de l'attribut",
|
|
6364
6390
|
delete: "Supprimer l'attribut",
|
|
6365
|
-
name: '
|
|
6391
|
+
name: "Libellé de l'attribut",
|
|
6392
|
+
technicalName: 'Nom technique',
|
|
6366
6393
|
description: 'Description',
|
|
6367
6394
|
field: 'Type',
|
|
6368
6395
|
category: 'Catégorie',
|