@provoly/dashboard 0.15.8 → 0.15.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/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +7 -6
- package/esm2022/admin/components/admin-classes/admin-classes-form/admin-classes-form.component.mjs +5 -4
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +3 -3
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +2 -2
- package/esm2022/admin/i18n/fr.translations.mjs +2 -2
- package/esm2022/dataset/i18n/fr.translations.mjs +2 -2
- package/esm2022/filters/date/date-filter.component.mjs +3 -3
- package/esm2022/lib/core/auth/geoAuth.service.mjs +8 -15
- package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +2 -2
- package/esm2022/lib/core/model/dataset.interface.mjs +1 -1
- package/esm2022/lib/core/model/filter.interface.mjs +1 -1
- package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -1
- package/esm2022/lib/core/public-api.mjs +2 -2
- package/esm2022/lib/core/store/aggregation/frontend-aggregation/aggregation-utils.class.mjs +184 -0
- package/esm2022/lib/core/store/aggregation/frontend-aggregation/frontend-aggregation.service.mjs +93 -0
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +2 -2
- package/esm2022/presentation/components/presentation.component.mjs +3 -3
- package/esm2022/presentation/i18n/en.translations.mjs +3 -2
- package/esm2022/presentation/i18n/fr.translations.mjs +6 -5
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/i18n/fr.translations.mjs +2 -2
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/tooltips/attribute/attribute-tooltip.component.mjs +19 -10
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +18 -11
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +36 -1
- package/esm2022/widgets/widget-table/component/widget-table.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-admin.mjs +14 -12
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-date.mjs +2 -2
- package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +11 -9
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +3 -3
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs +18 -9
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +52 -10
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +237 -179
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/auth/geoAuth.service.d.ts +3 -1
- package/lib/core/model/dataset.interface.d.ts +1 -1
- package/lib/core/model/filter.interface.d.ts +1 -1
- package/lib/core/model/widget-map-manifest.interface.d.ts +1 -0
- package/lib/core/public-api.d.ts +1 -1
- package/lib/core/store/aggregation/frontend-aggregation/aggregation-utils.class.d.ts +33 -0
- package/lib/core/store/aggregation/frontend-aggregation/frontend-aggregation.service.d.ts +22 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +1 -1
- package/package.json +30 -30
- package/presentation/i18n/en.translations.d.ts +1 -0
- package/presentation/i18n/fr.translations.d.ts +1 -0
- package/presentation/style/_o-pry-presentation.scss +7 -2
- package/tooltips/attribute/attribute-tooltip.component.d.ts +5 -1
- package/widgets/widget-map/component/widget-map.component.d.ts +3 -4
- package/widgets/widget-map/utils/widget-map.utils.d.ts +1 -0
- package/esm2022/lib/core/store/aggregation/frontend-aggregation.service.mjs +0 -210
- package/lib/core/store/aggregation/frontend-aggregation.service.d.ts +0 -33
|
@@ -983,11 +983,11 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
983
983
|
this.possibleNonAttributesFields = [
|
|
984
984
|
{
|
|
985
985
|
name: 'id',
|
|
986
|
-
|
|
986
|
+
id: 'id'
|
|
987
987
|
},
|
|
988
988
|
{
|
|
989
989
|
name: 'oClass',
|
|
990
|
-
|
|
990
|
+
id: 'oClass'
|
|
991
991
|
}
|
|
992
992
|
];
|
|
993
993
|
this.backPressed = new EventEmitter();
|
|
@@ -1008,7 +1008,7 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
1008
1008
|
tooltipTypeChanged($event) {
|
|
1009
1009
|
this.currentClassConfig.type = $event;
|
|
1010
1010
|
if (this.currentClassConfig.type === 'attribute') {
|
|
1011
|
-
this.currentClassConfig.options = { attributes: this.possibleAttributes.map((attr) => attr.
|
|
1011
|
+
this.currentClassConfig.options = { attributes: this.possibleAttributes.map((attr) => attr.id) };
|
|
1012
1012
|
}
|
|
1013
1013
|
else {
|
|
1014
1014
|
this.currentClassConfig.options = {};
|
|
@@ -1059,13 +1059,14 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
changeAttributes($event) {
|
|
1061
1061
|
this.currentClassConfig.options.attributes = $event;
|
|
1062
|
+
setTimeout(() => this.updateExample(), 100);
|
|
1062
1063
|
}
|
|
1063
1064
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminClassesCustomizeTooltipComponent, deps: [{ token: i4.TooltipFactoryService }, { token: i0.Injector }, { token: i4.PryI18nService }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1064
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: AdminClassesCustomizeTooltipComponent, selector: "pry-admin-classes-customize-tooltip", inputs: { currentClass: "currentClass" }, outputs: { backPressed: "backPressed" }, viewQueries: [{ propertyName: "example", first: true, predicate: ["example"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<div>\n <div class=\"m-form-label-field -width-xl\">\n <label class=\"a-label\" for=\"tooltip_type\">{{ '@pry.admin.customize.type' | i18n }}</label>\n <pry-select\n id=\"tooltip_type\"\n class=\"a-pry-select\"\n (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\n [itemsAsOption]=\"true\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n\n <div>\n <pry-checkbox [(ngModel)]=\"advancedTooltip\">{{ '@pry.admin.customize.advanced' | i18n }}</pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!advancedTooltip && currentClassConfig.type === 'attribute'\">\n <label class=\"a-label\" for=\"customize_simplified\">{{ '@pry.admin.customize.simplified' | i18n }}</label>\n <pry-select\n id=\"customize_simplified\"\n class=\"a-pry-select\"\n (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [itemsAsOption]=\"true\"\n [items]=\"possibleAttributes\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n bindLabel=\"name\"\n bindValue=\"
|
|
1065
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: AdminClassesCustomizeTooltipComponent, selector: "pry-admin-classes-customize-tooltip", inputs: { currentClass: "currentClass" }, outputs: { backPressed: "backPressed" }, viewQueries: [{ propertyName: "example", first: true, predicate: ["example"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<div>\n <div class=\"m-form-label-field -width-xl\">\n <label class=\"a-label\" for=\"tooltip_type\">{{ '@pry.admin.customize.type' | i18n }}</label>\n <pry-select\n id=\"tooltip_type\"\n class=\"a-pry-select\"\n (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\n [itemsAsOption]=\"true\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n\n <div>\n <pry-checkbox [(ngModel)]=\"advancedTooltip\">{{ '@pry.admin.customize.advanced' | i18n }}</pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!advancedTooltip && currentClassConfig.type === 'attribute'\">\n <label class=\"a-label\" for=\"customize_simplified\">{{ '@pry.admin.customize.simplified' | i18n }}</label>\n <pry-select\n id=\"customize_simplified\"\n class=\"a-pry-select\"\n (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [itemsAsOption]=\"true\"\n [items]=\"possibleAttributes\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n bindLabel=\"name\"\n bindValue=\"id\"\n ></pry-select>\n </ng-container>\n\n <ng-container *ngIf=\"advancedTooltip\">\n <textarea\n cols=\"100\"\n rows=\"15\"\n class=\"a-form-field\"\n [(ngModel)]=\"strOptions\"\n (focusout)=\"optionsChanged()\"\n ></textarea>\n </ng-container>\n</div>\n\n<div class=\"m-tooltip m-tooltip--example\" [class.-hidden]=\"noTooltip\">\n <div #example></div>\n</div>\n\n<div class=\"m-btn-group -width-md\">\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 class=\"a-btn a-btn--primary\" type=\"submit\" (click)=\"updateTemplate()\">\n {{ '@pry.admin.customize.update' | i18n }}\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { 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" }] }); }
|
|
1065
1066
|
}
|
|
1066
1067
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminClassesCustomizeTooltipComponent, decorators: [{
|
|
1067
1068
|
type: Component,
|
|
1068
|
-
args: [{ selector: 'pry-admin-classes-customize-tooltip', template: "<div>\n <div class=\"m-form-label-field -width-xl\">\n <label class=\"a-label\" for=\"tooltip_type\">{{ '@pry.admin.customize.type' | i18n }}</label>\n <pry-select\n id=\"tooltip_type\"\n class=\"a-pry-select\"\n (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\n [itemsAsOption]=\"true\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n\n <div>\n <pry-checkbox [(ngModel)]=\"advancedTooltip\">{{ '@pry.admin.customize.advanced' | i18n }}</pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!advancedTooltip && currentClassConfig.type === 'attribute'\">\n <label class=\"a-label\" for=\"customize_simplified\">{{ '@pry.admin.customize.simplified' | i18n }}</label>\n <pry-select\n id=\"customize_simplified\"\n class=\"a-pry-select\"\n (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [itemsAsOption]=\"true\"\n [items]=\"possibleAttributes\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n bindLabel=\"name\"\n bindValue=\"
|
|
1069
|
+
args: [{ selector: 'pry-admin-classes-customize-tooltip', template: "<div>\n <div class=\"m-form-label-field -width-xl\">\n <label class=\"a-label\" for=\"tooltip_type\">{{ '@pry.admin.customize.type' | i18n }}</label>\n <pry-select\n id=\"tooltip_type\"\n class=\"a-pry-select\"\n (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\n [itemsAsOption]=\"true\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n\n <div>\n <pry-checkbox [(ngModel)]=\"advancedTooltip\">{{ '@pry.admin.customize.advanced' | i18n }}</pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!advancedTooltip && currentClassConfig.type === 'attribute'\">\n <label class=\"a-label\" for=\"customize_simplified\">{{ '@pry.admin.customize.simplified' | i18n }}</label>\n <pry-select\n id=\"customize_simplified\"\n class=\"a-pry-select\"\n (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [itemsAsOption]=\"true\"\n [items]=\"possibleAttributes\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n bindLabel=\"name\"\n bindValue=\"id\"\n ></pry-select>\n </ng-container>\n\n <ng-container *ngIf=\"advancedTooltip\">\n <textarea\n cols=\"100\"\n rows=\"15\"\n class=\"a-form-field\"\n [(ngModel)]=\"strOptions\"\n (focusout)=\"optionsChanged()\"\n ></textarea>\n </ng-container>\n</div>\n\n<div class=\"m-tooltip m-tooltip--example\" [class.-hidden]=\"noTooltip\">\n <div #example></div>\n</div>\n\n<div class=\"m-btn-group -width-md\">\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 class=\"a-btn a-btn--primary\" type=\"submit\" (click)=\"updateTemplate()\">\n {{ '@pry.admin.customize.update' | i18n }}\n </button>\n</div>\n" }]
|
|
1069
1070
|
}], ctorParameters: function () { return [{ type: i4.TooltipFactoryService }, { type: i0.Injector }, { type: i4.PryI18nService }, { type: i1.Store }]; }, propDecorators: { example: [{
|
|
1070
1071
|
type: ViewChild,
|
|
1071
1072
|
args: ['example', { read: ViewContainerRef }]
|
|
@@ -1348,7 +1349,8 @@ class AdminClassesFormComponent extends SubscriptionnerDirective {
|
|
|
1348
1349
|
if (this._currentClass) {
|
|
1349
1350
|
this.classForm.patchValue({
|
|
1350
1351
|
id: this._currentClass.id,
|
|
1351
|
-
name: this._currentClass.name
|
|
1352
|
+
name: this._currentClass.name,
|
|
1353
|
+
storage: this._currentClass.storage
|
|
1352
1354
|
});
|
|
1353
1355
|
}
|
|
1354
1356
|
}
|
|
@@ -1381,11 +1383,11 @@ class AdminClassesFormComponent extends SubscriptionnerDirective {
|
|
|
1381
1383
|
}
|
|
1382
1384
|
}
|
|
1383
1385
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminClassesFormComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3$1.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1384
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: AdminClassesFormComponent, selector: "pry-admin-classes-form", inputs: { currentClass: "currentClass" }, usesInheritance: true, ngImport: i0, template: "<form class=\"o-form\" [formGroup]=\"classForm\" (ngSubmit)=\"addClass()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"name-label\" for=\"name\">\n {{ '@pry.admin.classes.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n [attr.aria-labelledby]=\"isSubmitted && classForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n class=\"a-form-field\"\n formControlName=\"name\"\n id=\"name\"\n required\n type=\"text\"\n [attr.aria-invalid]=\"isSubmitted && classForm.get('name')?.invalid\"\n />\n <label\n *ngIf=\"isSubmitted && classForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"classForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('minlength')\">{{ '@pry.admin.minLength' | i18n : { len: 3 } }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('whitespace')\">{{ '@pry.admin.noWhitespace' | i18n }}</span>\n </label>\n </div>\n <div class=\"u-display-flex -row -no-gap -align-center\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"storage_options\">\n {{ '@pry.admin.storage.label' | i18n }}\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <pry-select\n [items]=\"storageOptions$ | async\"\n [labelTranslate]=\"true\"\n baseTranslate=\"@pry.admin.storage.options.\"\n [bindData]=\"true\"\n [itemsAsOption]=\"true\"\n formControlName=\"storage\"\n class=\"a-pry-select\"\n id=\"storage_options\"\n ></pry-select>\n </div>\n <div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n </div>\n <div class=\"description-tooltip\">\n <p class=\"a-p\">\n {{ '@pry.admin.storage.description.' + classForm.get('storage')?.value | i18n }}\n </p>\n </div>\n </div>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(_currentClass ? '@pry.admin.edit' : '@pry.admin.next') | i18n\"\n ></button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: ["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" }] }); }
|
|
1386
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: AdminClassesFormComponent, selector: "pry-admin-classes-form", inputs: { currentClass: "currentClass" }, usesInheritance: true, ngImport: i0, template: "<form class=\"o-form\" [formGroup]=\"classForm\" (ngSubmit)=\"addClass()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"name-label\" for=\"name\">\n {{ '@pry.admin.classes.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n [attr.aria-labelledby]=\"isSubmitted && classForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n class=\"a-form-field\"\n formControlName=\"name\"\n id=\"name\"\n required\n type=\"text\"\n [attr.aria-invalid]=\"isSubmitted && classForm.get('name')?.invalid\"\n />\n <label\n *ngIf=\"isSubmitted && classForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"classForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('minlength')\">{{ '@pry.admin.minLength' | i18n : { len: 3 } }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('whitespace')\">{{ '@pry.admin.noWhitespace' | i18n }}</span>\n </label>\n </div>\n <div class=\"u-display-flex -row -no-gap -align-center\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"storage_options\">\n {{ '@pry.admin.storage.label' | i18n }}\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <pry-select\n [items]=\"storageOptions$ | async\"\n [labelTranslate]=\"true\"\n baseTranslate=\"@pry.admin.storage.options.\"\n [bindData]=\"true\"\n [itemsAsOption]=\"true\"\n formControlName=\"storage\"\n class=\"a-pry-select\"\n id=\"storage_options\"\n [readonly]=\"!!_currentClass\"\n ></pry-select>\n </div>\n <div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n </div>\n <div class=\"description-tooltip\">\n <p class=\"a-p\">\n {{ '@pry.admin.storage.description.' + classForm.get('storage')?.value | i18n }}\n </p>\n </div>\n </div>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(_currentClass ? '@pry.admin.edit' : '@pry.admin.next') | i18n\"\n ></button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: ["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" }] }); }
|
|
1385
1387
|
}
|
|
1386
1388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminClassesFormComponent, decorators: [{
|
|
1387
1389
|
type: Component,
|
|
1388
|
-
args: [{ selector: 'pry-admin-classes-form', template: "<form class=\"o-form\" [formGroup]=\"classForm\" (ngSubmit)=\"addClass()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"name-label\" for=\"name\">\n {{ '@pry.admin.classes.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n [attr.aria-labelledby]=\"isSubmitted && classForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n class=\"a-form-field\"\n formControlName=\"name\"\n id=\"name\"\n required\n type=\"text\"\n [attr.aria-invalid]=\"isSubmitted && classForm.get('name')?.invalid\"\n />\n <label\n *ngIf=\"isSubmitted && classForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"classForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('minlength')\">{{ '@pry.admin.minLength' | i18n : { len: 3 } }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('whitespace')\">{{ '@pry.admin.noWhitespace' | i18n }}</span>\n </label>\n </div>\n <div class=\"u-display-flex -row -no-gap -align-center\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"storage_options\">\n {{ '@pry.admin.storage.label' | i18n }}\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <pry-select\n [items]=\"storageOptions$ | async\"\n [labelTranslate]=\"true\"\n baseTranslate=\"@pry.admin.storage.options.\"\n [bindData]=\"true\"\n [itemsAsOption]=\"true\"\n formControlName=\"storage\"\n class=\"a-pry-select\"\n id=\"storage_options\"\n ></pry-select>\n </div>\n <div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n </div>\n <div class=\"description-tooltip\">\n <p class=\"a-p\">\n {{ '@pry.admin.storage.description.' + classForm.get('storage')?.value | i18n }}\n </p>\n </div>\n </div>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(_currentClass ? '@pry.admin.edit' : '@pry.admin.next') | i18n\"\n ></button>\n </div>\n</form>\n" }]
|
|
1390
|
+
args: [{ selector: 'pry-admin-classes-form', template: "<form class=\"o-form\" [formGroup]=\"classForm\" (ngSubmit)=\"addClass()\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" id=\"name-label\" for=\"name\">\n {{ '@pry.admin.classes.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n [attr.aria-labelledby]=\"isSubmitted && classForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n class=\"a-form-field\"\n formControlName=\"name\"\n id=\"name\"\n required\n type=\"text\"\n [attr.aria-invalid]=\"isSubmitted && classForm.get('name')?.invalid\"\n />\n <label\n *ngIf=\"isSubmitted && classForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"classForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('minlength')\">{{ '@pry.admin.minLength' | i18n : { len: 3 } }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"classForm.get('name')?.hasError('whitespace')\">{{ '@pry.admin.noWhitespace' | i18n }}</span>\n </label>\n </div>\n <div class=\"u-display-flex -row -no-gap -align-center\">\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\" for=\"storage_options\">\n {{ '@pry.admin.storage.label' | i18n }}\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <pry-select\n [items]=\"storageOptions$ | async\"\n [labelTranslate]=\"true\"\n baseTranslate=\"@pry.admin.storage.options.\"\n [bindData]=\"true\"\n [itemsAsOption]=\"true\"\n formControlName=\"storage\"\n class=\"a-pry-select\"\n id=\"storage_options\"\n [readonly]=\"!!_currentClass\"\n ></pry-select>\n </div>\n <div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n </div>\n <div class=\"description-tooltip\">\n <p class=\"a-p\">\n {{ '@pry.admin.storage.description.' + classForm.get('storage')?.value | i18n }}\n </p>\n </div>\n </div>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(_currentClass ? '@pry.admin.edit' : '@pry.admin.next') | i18n\"\n ></button>\n </div>\n</form>\n" }]
|
|
1389
1391
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.UntypedFormBuilder }]; }, propDecorators: { currentClass: [{
|
|
1390
1392
|
type: Input
|
|
1391
1393
|
}] } });
|
|
@@ -1540,11 +1542,11 @@ class AdminAttributesFormComponent {
|
|
|
1540
1542
|
this.closeCategory();
|
|
1541
1543
|
}
|
|
1542
1544
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", 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 }); }
|
|
1543
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", 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
|
|
1545
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", 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 [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=\"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" }] }); }
|
|
1544
1546
|
}
|
|
1545
1547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminAttributesFormComponent, decorators: [{
|
|
1546
1548
|
type: Component,
|
|
1547
|
-
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_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
|
|
1549
|
+
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_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 [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=\"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" }]
|
|
1548
1550
|
}], 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: [{
|
|
1549
1551
|
type: Input
|
|
1550
1552
|
}], interClass: [{
|
|
@@ -1916,7 +1918,7 @@ class AdminFormDatasetComponent {
|
|
|
1916
1918
|
this.classes = this.store.select(ClassSelectors.classes);
|
|
1917
1919
|
this.form = this.formBuilder.group({
|
|
1918
1920
|
id: [v4()],
|
|
1919
|
-
name: ['', [Validators.required]],
|
|
1921
|
+
name: ['', [Validators.required, Validators.maxLength(100)]],
|
|
1920
1922
|
oClass: ['', [Validators.required]],
|
|
1921
1923
|
type: ['', [Validators.required]]
|
|
1922
1924
|
});
|
|
@@ -6379,7 +6381,7 @@ const frTranslations = {
|
|
|
6379
6381
|
list: 'Types métier',
|
|
6380
6382
|
edit: 'Modifier le type métier',
|
|
6381
6383
|
name: 'Nom',
|
|
6382
|
-
description: '
|
|
6384
|
+
description: 'Description',
|
|
6383
6385
|
type: 'Type technique',
|
|
6384
6386
|
attributes: 'Présence dans des attributs',
|
|
6385
6387
|
attributesTab: 'Attributs',
|