@provoly/dashboard 0.14.14 → 0.15.0
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-fields/admin-fields-form/admin-fields-form.component.d.ts +9 -0
- package/admin/i18n/fr.translations.d.ts +1 -0
- package/dataset/components/dataset-detail/dataset-detail.component.d.ts +0 -3
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +3 -3
- package/esm2022/admin/components/admin-fields/admin-fields-form/admin-fields-form.component.mjs +21 -5
- package/esm2022/admin/i18n/fr.translations.mjs +2 -1
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +1 -4
- package/esm2022/lib/core/model/filter.interface.mjs +1 -1
- package/esm2022/lib/core/public-api.mjs +2 -2
- package/esm2022/lib/core/store/data-source/data-source.selectors.mjs +3 -3
- package/esm2022/lib/core/store/data-source/datasource-utils.mjs +18 -0
- package/esm2022/lib/core/symbol/symbol.service.mjs +7 -9
- package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-selector.component.mjs +3 -3
- package/esm2022/restitution/components/restitution/restitution.component.mjs +2 -2
- package/esm2022/search/components/edit-named-query/edit-named-query.component.mjs +3 -3
- package/esm2022/search/components/save-query-button/save-query-button.component.mjs +3 -3
- package/esm2022/search/search-home/search-home.component.mjs +3 -3
- package/esm2022/search/search-mono-class/store/search-mono-class.effects.mjs +3 -3
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +3 -3
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +23 -6
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +0 -3
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-search.mjs +5 -5
- package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +3 -3
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +25 -22
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/model/filter.interface.d.ts +1 -1
- package/lib/core/public-api.d.ts +1 -1
- package/lib/core/store/data-source/{named-query-utils.d.ts → datasource-utils.d.ts} +3 -1
- package/lib/core/symbol/symbol.service.d.ts +1 -3
- package/package.json +31 -31
- package/schematics/ng-add/index.js +4 -4
- package/schematics/ng-add/index.js.map +1 -1
- package/styles/components/_a-pry-select.scss +4 -0
- package/styles/components/_o-pry-admin-classes-customize.scss +19 -0
- package/styles-theme/components-theme/_o-pry-admin-classes-customize.theme.scss +5 -0
- package/esm2022/lib/core/store/data-source/named-query-utils.mjs +0 -13
|
@@ -8,7 +8,7 @@ export class CqlUtils {
|
|
|
8
8
|
.map((cond) => {
|
|
9
9
|
const conditions = [];
|
|
10
10
|
const attributeName = attributesReference.find((attr) => attr.id === cond.attribute)?.name;
|
|
11
|
-
if (attributeName && cond.value && cond.value.length > 0) {
|
|
11
|
+
if (attributeName && cond.value && (typeof cond.value !== 'string' || cond.value.length > 0)) {
|
|
12
12
|
switch (cond.operator) {
|
|
13
13
|
case 'EQUALS':
|
|
14
14
|
conditions.push(`${attributeName}='${cond.value}'`);
|
|
@@ -53,4 +53,4 @@ export class CqlUtils {
|
|
|
53
53
|
.join(' AND ');
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3FsLXV0aWxzLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi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GJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnQ09OVEFJTlMnOlxuICAgICAgICAgICAgICBjb25kaXRpb25zLnB1c2goYCR7YXR0cmlidXRlTmFtZX0gTElLRSAnJSR7Y29uZC52YWx1ZX0lJ2ApO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ1NUQVJUX1dJVEgnOlxuICAgICAgICAgICAgICBjb25kaXRpb25zLnB1c2goYCR7YXR0cmlidXRlTmFtZX0gTElLRSAnJHtjb25kLnZhbHVlfSUnYCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnRU5EX1dJVEgnOlxuICAgICAgICAgICAgICBjb25kaXRpb25zLnB1c2goYCR7YXR0cmlidXRlTmFtZX0gTElLRSAnJSR7Y29uZC52YWx1ZX0nYCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnR1JFQVRFUl9USEFOJzpcbiAgICAgICAgICAgICAgY29uZGl0aW9ucy5wdXNoKGAke2F0dHJpYnV0ZU5hbWV9PiR7Y29uZC52YWx1ZX1gKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdMT1dFUl9USEFOJzpcbiAgICAgICAgICAgICAgY29uZGl0aW9ucy5wdXNoKGAke2F0dHJpYnV0ZU5hbWV9PCR7Y29uZC52YWx1ZX1gKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdJTlNJREUnOlxuICAgICAgICAgICAgICBjb25zdCBzcGxpdEkgPSAoY29uZC52YWx1ZSBhcyBzdHJpbmcpPy5zcGxpdCgnLCcpO1xuICAgICAgICAgICAgICBpZiAoc3BsaXRJICYmIHNwbGl0SS5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgICAgY29uZGl0aW9ucy5wdXNoKGAke2F0dHJpYnV0ZU5hbWV9PCR7c3BsaXRJWzBdfWApO1xuICAgICAgICAgICAgICAgIGNvbmRpdGlvbnMucHVzaChgJHthdHRyaWJ1dGVOYW1lfT4ke3NwbGl0SVsxXX1gKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ09VVFNJREUnOlxuICAgICAgICAgICAgICBjb25zdCBzcGxpdE8gPSAoY29uZC52YWx1ZSBhcyBzdHJpbmcpPy5zcGxpdCgnLCcpO1xuICAgICAgICAgICAgICBpZiAoc3BsaXRPICYmIHNwbGl0Ty5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgICAgY29uZGl0aW9ucy5wdXNoKGAke2F0dHJpYnV0ZU5hbWV9PiR7c3BsaXRPWzBdfWApO1xuICAgICAgICAgICAgICAgIGNvbmRpdGlvbnMucHVzaChgJHthdHRyaWJ1dGVOYW1lfTwke3NwbGl0T1sxXX1gKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29uc29sZS53YXJuKFxuICAgICAgICAgICAgYENhbm5vdCBhZGQgY3FsIGZpbHRlciBvbiBkYXRhc291cmNlICR7ZGF0YXNvdXJjZUlkfSBiZWNhdXNlICR7Y29uZC5hdHRyaWJ1dGV9IGF0dHJpYnV0ZSBub3QgZm91bmQgaW4gY2xhc3Nlc2BcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNvbmRpdGlvbnM7XG4gICAgICB9KVxuICAgICAgLmZpbHRlcigoY29uZHMpID0+IGNvbmRzLmxlbmd0aCA+IDApXG4gICAgICAuam9pbignIEFORCAnKTtcbiAgfVxufVxuIl19
|
|
@@ -7,13 +7,13 @@ import { CommonModule, DatePipe } from '@angular/common';
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
8
|
import { EventEmitter, Component, Output, Input, Injectable, ViewContainerRef, ViewChild, TemplateRef, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
9
9
|
import * as i3$1 from '@angular/forms';
|
|
10
|
-
import { Validators, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
+
import { Validators, FormControl, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
11
11
|
import * as i1$2 from '@ngrx/effects';
|
|
12
12
|
import { concatLatestFrom, createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
13
13
|
import * as i1 from '@ngrx/store';
|
|
14
14
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
15
15
|
import * as i4 from '@provoly/dashboard';
|
|
16
|
-
import { ClassSelectors, FieldSelectors, FieldType, ClassActions, FieldActions, SubscriptionnerDirective, ConfigSelectors, ConfigActions, DEFAULT_ICON_URL, IconPosition, compareOperationFunctions, ItemUtils, FIELD_OPTIONS, CategoryActions, CategorySelectors, DEFAULT_CATEGORY_UUID, DataSourceActions, DataSourceSelectors, PryDatasetType, ENV_OPTIONS, META_OPTIONS, RelationTypesSelectors, RelationTypesActions, BaseMenuComponent, BaseLayoutComponent, PRY_ACCESS_GUARD, PryDialogConfirmComponent, PrySortModule, PryIconModule, PryModalModule, PryI18nModule, PryCoreModule, PrySelectModule, PryToggleModule, PryOverlayModule } from '@provoly/dashboard';
|
|
16
|
+
import { ClassSelectors, FieldSelectors, FieldType, ClassActions, FieldActions, SubscriptionnerDirective, ConfigSelectors, ConfigActions, DEFAULT_ICON_URL, IconPosition, compareOperationFunctions, ItemUtils, FIELD_OPTIONS, CategoryActions, CategorySelectors, DEFAULT_CATEGORY_UUID, DataSourceActions, DataSourceSelectors, PryDatasetType, ENV_OPTIONS, GeometricFieldTypes, META_OPTIONS, RelationTypesSelectors, RelationTypesActions, BaseMenuComponent, BaseLayoutComponent, PRY_ACCESS_GUARD, PryDialogConfirmComponent, PrySortModule, PryIconModule, PryModalModule, PryI18nModule, PryCoreModule, PrySelectModule, PryToggleModule, PryOverlayModule } from '@provoly/dashboard';
|
|
17
17
|
import * as i5$1 from '@provoly/dashboard/components/checkbox';
|
|
18
18
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
19
19
|
import * as i5$3 from '@provoly/dashboard/components/metadata-editor';
|
|
@@ -1540,11 +1540,11 @@ class AdminAttributesFormComponent {
|
|
|
1540
1540
|
this.closeCategory();
|
|
1541
1541
|
}
|
|
1542
1542
|
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 [
|
|
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 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=\"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
1544
|
}
|
|
1545
1545
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminAttributesFormComponent, decorators: [{
|
|
1546
1546
|
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 [
|
|
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 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=\"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
1548
|
}], 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
1549
|
type: Input
|
|
1550
1550
|
}], interClass: [{
|
|
@@ -2271,6 +2271,10 @@ const FieldsActions = {
|
|
|
2271
2271
|
deleteFieldFailure: createAction('[Admin/Fields] Delete Field Failure', props())
|
|
2272
2272
|
};
|
|
2273
2273
|
|
|
2274
|
+
const CRS_OPTIONS = [
|
|
2275
|
+
{ label: 'WGS84 (EPSG:4326)', code: 'EPSG:4326' },
|
|
2276
|
+
{ label: 'Lambert93 (EPSG: 2154)', code: 'EPSG:2154' }
|
|
2277
|
+
];
|
|
2274
2278
|
class AdminFieldsFormComponent {
|
|
2275
2279
|
constructor(store, router, route, formBuilder, i18nService) {
|
|
2276
2280
|
this.store = store;
|
|
@@ -2281,6 +2285,7 @@ class AdminFieldsFormComponent {
|
|
|
2281
2285
|
this.sub = new Subscription();
|
|
2282
2286
|
this.isSubmitted = false;
|
|
2283
2287
|
this.fieldTypeTranslations = [];
|
|
2288
|
+
this.CRS_OPTIONS = CRS_OPTIONS;
|
|
2284
2289
|
this.fieldTypeTranslations = FIELD_OPTIONS.map((translate) => ({
|
|
2285
2290
|
varType: translate.varType,
|
|
2286
2291
|
translation: this.i18nService.instant(translate.translation),
|
|
@@ -2321,6 +2326,17 @@ class AdminFieldsFormComponent {
|
|
|
2321
2326
|
// @ts-ignore
|
|
2322
2327
|
this.selectedFieldTypeDescription$ = this.fieldForm.get('type').valueChanges.pipe(startWith(this.fieldTypeTranslations[0]['varType']), distinctUntilChanged(), map((selectedType) => this.fieldTypeTranslations.find((translation) => translation['varType'] === selectedType)?.['description'] ??
|
|
2323
2328
|
''));
|
|
2329
|
+
this.fieldForm.get('type').valueChanges.subscribe((type) => {
|
|
2330
|
+
if (this.isGeographicType) {
|
|
2331
|
+
this.fieldForm.addControl('crs', new FormControl(CRS_OPTIONS[0].code, [Validators.required]));
|
|
2332
|
+
}
|
|
2333
|
+
else {
|
|
2334
|
+
this.fieldForm.removeControl('crs');
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
}
|
|
2338
|
+
get isGeographicType() {
|
|
2339
|
+
return GeometricFieldTypes.includes(this.fieldForm.get('type')?.value);
|
|
2324
2340
|
}
|
|
2325
2341
|
ngOnDestroy() {
|
|
2326
2342
|
this.sub.unsubscribe();
|
|
@@ -2343,11 +2359,11 @@ class AdminFieldsFormComponent {
|
|
|
2343
2359
|
return this.currentField ? this.goBackPathEdit : this.goBackPath;
|
|
2344
2360
|
}
|
|
2345
2361
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminFieldsFormComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3$1.UntypedFormBuilder }, { token: i4.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2346
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: AdminFieldsFormComponent, selector: "pry-admin-fields-form", inputs: { currentField: "currentField" }, ngImport: i0, template: "<div>\n <form class=\"o-form\" [formGroup]=\"fieldForm\" (ngSubmit)=\"addField()\">\n <div class=\"m-form-label-field -width-sm\">\n <label id=\"name-label\" for=\"field_name\" class=\"a-label\">\n {{ '@pry.admin.fields.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n id=\"field_name\"\n type=\"text\"\n class=\"a-form-field\"\n formControlName=\"name\"\n [attr.aria-labelledby]=\"isSubmitted && fieldForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n [attr.aria-invalid]=\"isSubmitted && fieldForm.get('name')?.invalid\"\n required\n />\n <label\n *ngIf=\"isSubmitted && fieldForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"field_name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"fieldForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.minLength' | i18n : { len: 3 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('whitespace') && !fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.noWhitespace' | i18n\n }}</span>\n </label>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\">\n {{ '@pry.admin.fields.type' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <div class=\"title-container\">\n <pry-select\n class=\"a-pry-select -width-sm\"\n formControlName=\"type\"\n [labelTranslate]=\"true\"\n [items]=\"fieldTypeTranslations\"\n [itemsAsOption]=\"true\"\n bindValue=\"varType\"\n bindLabel=\"translation\"\n [isForm]=\"true\"\n ></pry-select>\n <ng-container>\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\">{{ selectedFieldTypeDescription$ | async }}</p>\n </div>\n </ng-container>\n </div>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(currentField ? '@pry.admin.edit' : '@pry.admin.create') | i18n\"\n ></button>\n </div>\n </form>\n</div>\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" }] }); }
|
|
2362
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: AdminFieldsFormComponent, selector: "pry-admin-fields-form", inputs: { currentField: "currentField" }, ngImport: i0, template: "<div>\n <form class=\"o-form\" [formGroup]=\"fieldForm\" (ngSubmit)=\"addField()\">\n <div class=\"m-form-label-field -width-sm\">\n <label id=\"name-label\" for=\"field_name\" class=\"a-label\">\n {{ '@pry.admin.fields.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n id=\"field_name\"\n type=\"text\"\n class=\"a-form-field\"\n formControlName=\"name\"\n [attr.aria-labelledby]=\"isSubmitted && fieldForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n [attr.aria-invalid]=\"isSubmitted && fieldForm.get('name')?.invalid\"\n required\n />\n <label\n *ngIf=\"isSubmitted && fieldForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"field_name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"fieldForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.minLength' | i18n : { len: 3 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('whitespace') && !fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.noWhitespace' | i18n\n }}</span>\n </label>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\">\n {{ '@pry.admin.fields.type' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <div class=\"title-container\">\n <pry-select\n class=\"a-pry-select -width-sm\"\n formControlName=\"type\"\n [labelTranslate]=\"true\"\n [items]=\"fieldTypeTranslations\"\n [itemsAsOption]=\"true\"\n bindValue=\"varType\"\n bindLabel=\"translation\"\n [isForm]=\"true\"\n ></pry-select>\n <ng-container>\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\">{{ selectedFieldTypeDescription$ | async }}</p>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\" *ngIf=\"isGeographicType\">\n <label class=\"a-label\">\n {{ '@pry.admin.fields.crs' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <div class=\"title-container\">\n <pry-select\n class=\"a-pry-select -width-sm\"\n formControlName=\"crs\"\n [labelTranslate]=\"false\"\n [items]=\"CRS_OPTIONS\"\n [itemsAsOption]=\"true\"\n bindValue=\"code\"\n bindLabel=\"label\"\n [isForm]=\"true\"\n id=\"crs\"\n ></pry-select>\n </div>\n <label\n *ngIf=\"isSubmitted && fieldForm.get('crs') && fieldForm.get('crs')?.invalid\"\n id=\"crs-error\"\n for=\"crs\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"fieldForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n </label>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(currentField ? '@pry.admin.edit' : '@pry.admin.create') | i18n\"\n ></button>\n </div>\n </form>\n</div>\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" }] }); }
|
|
2347
2363
|
}
|
|
2348
2364
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AdminFieldsFormComponent, decorators: [{
|
|
2349
2365
|
type: Component,
|
|
2350
|
-
args: [{ selector: 'pry-admin-fields-form', template: "<div>\n <form class=\"o-form\" [formGroup]=\"fieldForm\" (ngSubmit)=\"addField()\">\n <div class=\"m-form-label-field -width-sm\">\n <label id=\"name-label\" for=\"field_name\" class=\"a-label\">\n {{ '@pry.admin.fields.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n id=\"field_name\"\n type=\"text\"\n class=\"a-form-field\"\n formControlName=\"name\"\n [attr.aria-labelledby]=\"isSubmitted && fieldForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n [attr.aria-invalid]=\"isSubmitted && fieldForm.get('name')?.invalid\"\n required\n />\n <label\n *ngIf=\"isSubmitted && fieldForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"field_name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"fieldForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.minLength' | i18n : { len: 3 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('whitespace') && !fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.noWhitespace' | i18n\n }}</span>\n </label>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\">\n {{ '@pry.admin.fields.type' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <div class=\"title-container\">\n <pry-select\n class=\"a-pry-select -width-sm\"\n formControlName=\"type\"\n [labelTranslate]=\"true\"\n [items]=\"fieldTypeTranslations\"\n [itemsAsOption]=\"true\"\n bindValue=\"varType\"\n bindLabel=\"translation\"\n [isForm]=\"true\"\n ></pry-select>\n <ng-container>\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\">{{ selectedFieldTypeDescription$ | async }}</p>\n </div>\n </ng-container>\n </div>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(currentField ? '@pry.admin.edit' : '@pry.admin.create') | i18n\"\n ></button>\n </div>\n </form>\n</div>\n" }]
|
|
2366
|
+
args: [{ selector: 'pry-admin-fields-form', template: "<div>\n <form class=\"o-form\" [formGroup]=\"fieldForm\" (ngSubmit)=\"addField()\">\n <div class=\"m-form-label-field -width-sm\">\n <label id=\"name-label\" for=\"field_name\" class=\"a-label\">\n {{ '@pry.admin.fields.name' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <input\n id=\"field_name\"\n type=\"text\"\n class=\"a-form-field\"\n formControlName=\"name\"\n [attr.aria-labelledby]=\"isSubmitted && fieldForm.get('name')?.invalid ? 'name-label name-error' : 'name-label'\"\n [attr.aria-invalid]=\"isSubmitted && fieldForm.get('name')?.invalid\"\n required\n />\n <label\n *ngIf=\"isSubmitted && fieldForm.get('name')?.invalid\"\n id=\"name-error\"\n for=\"field_name\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"fieldForm.get('name')?.hasError('same-name')\">{{ '@pry.admin.exists' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.minLength' | i18n : { len: 3 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('maxlength')\">{{\n '@pry.admin.maxLength' | i18n : { len: 100 }\n }}</span>\n <span *ngIf=\"fieldForm.get('name')?.hasError('whitespace') && !fieldForm.get('name')?.hasError('minlength')\">{{\n '@pry.admin.noWhitespace' | i18n\n }}</span>\n </label>\n </div>\n\n <div class=\"m-form-label-field -width-sm\">\n <label class=\"a-label\">\n {{ '@pry.admin.fields.type' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <div class=\"title-container\">\n <pry-select\n class=\"a-pry-select -width-sm\"\n formControlName=\"type\"\n [labelTranslate]=\"true\"\n [items]=\"fieldTypeTranslations\"\n [itemsAsOption]=\"true\"\n bindValue=\"varType\"\n bindLabel=\"translation\"\n [isForm]=\"true\"\n ></pry-select>\n <ng-container>\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\">{{ selectedFieldTypeDescription$ | async }}</p>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-form-label-field -width-sm\" *ngIf=\"isGeographicType\">\n <label class=\"a-label\">\n {{ '@pry.admin.fields.crs' | i18n }} *\n <span class=\"u-visually-hidden\">({{ '@pry.admin.required' | i18n }})</span>\n </label>\n <div class=\"title-container\">\n <pry-select\n class=\"a-pry-select -width-sm\"\n formControlName=\"crs\"\n [labelTranslate]=\"false\"\n [items]=\"CRS_OPTIONS\"\n [itemsAsOption]=\"true\"\n bindValue=\"code\"\n bindLabel=\"label\"\n [isForm]=\"true\"\n id=\"crs\"\n ></pry-select>\n </div>\n <label\n *ngIf=\"isSubmitted && fieldForm.get('crs') && fieldForm.get('crs')?.invalid\"\n id=\"crs-error\"\n for=\"crs\"\n class=\"a-label a-label--help -error\"\n >\n <span *ngIf=\"fieldForm.get('name')?.hasError('required')\">{{ '@pry.admin.required' | i18n }}</span>\n </label>\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 class=\"a-btn a-btn--primary\"\n type=\"submit\"\n [innerHTML]=\"(currentField ? '@pry.admin.edit' : '@pry.admin.create') | i18n\"\n ></button>\n </div>\n </form>\n</div>\n" }]
|
|
2351
2367
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.UntypedFormBuilder }, { type: i4.PryI18nService }]; }, propDecorators: { currentField: [{
|
|
2352
2368
|
type: Input
|
|
2353
2369
|
}] } });
|
|
@@ -6351,6 +6367,7 @@ const frTranslations = {
|
|
|
6351
6367
|
},
|
|
6352
6368
|
fields: {
|
|
6353
6369
|
add: 'Créer un nouveau type métier',
|
|
6370
|
+
crs: 'CRS (code EPSG) :',
|
|
6354
6371
|
info: 'Détail du type métier',
|
|
6355
6372
|
list: 'Types métier',
|
|
6356
6373
|
edit: 'Modifier le type métier',
|