@provoly/dashboard 0.22.5 → 0.22.6
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/README.md +0 -2
- package/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.d.ts +8 -4
- package/esm2022/admin/components/admin-classes/admin-classes-customize/admin-classes-customize.component.mjs +7 -6
- package/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +44 -30
- package/esm2022/admin/components/admin-menu/admin-menu.component.mjs +3 -3
- package/esm2022/lib/core/components/about/about.component.mjs +3 -3
- package/esm2022/lib/core/components/base-menu/base-menu.component.mjs +3 -3
- package/esm2022/lib/core/components/select/select.component.mjs +5 -4
- package/esm2022/lib/core/components/select/select.module.mjs +5 -4
- package/esm2022/lib/core/components/select-image/select-image.component.mjs +2 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +16 -1
- package/esm2022/lib/dashboard/item-utils.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +1 -4
- package/esm2022/lib/dashboard/store/refresh.service.mjs +14 -9
- package/esm2022/presentation/components/presentation.component.mjs +3 -3
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +3 -3
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/toolbox/components/automate-refresh/automate-refresh.component.mjs +12 -9
- package/esm2022/toolbox/components/refresh-datasets/refresh-datasets.component.mjs +19 -17
- package/esm2022/toolbox/components/toolbox.component.mjs +7 -4
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +3 -3
- package/esm2022/widgets/widget-aggregated-chart/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-graph/component/widget-graph.component.mjs +4 -5
- package/esm2022/widgets/widget-graph/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-admin.mjs +49 -34
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +4 -4
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +4 -4
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +29 -21
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +4 -4
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs +5 -6
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +56 -39
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/select/select.module.d.ts +2 -1
- package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +1 -1
- package/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.d.ts +8 -1
- package/lib/dashboard/store/dashboard.selectors.d.ts +0 -13
- package/lib/dashboard/store/refresh.service.d.ts +3 -1
- package/package.json +7 -7
- package/presentation/style/_o-pry-presentation.scss +0 -3
- package/styles/components/_a-chip.scss +6 -0
- package/styles/components/_a-pry-select.scss +13 -0
- package/styles/components/_a-range-slider.scss +4 -5
- package/styles/components/_m-nav-links.scss +2 -7
- package/styles/components/_o-widget.scss +6 -0
- package/styles-theme/abstracts-theme/variables/_variables-colors.scss +4 -3
- package/styles-theme/base-theme/_typography.theme.scss +5 -2
- package/styles-theme/components-theme/_a-btn.theme.scss +3 -7
- package/styles-theme/components-theme/_a-label.theme.scss +1 -0
- package/styles-theme/components-theme/_a-pry-select.theme.scss +4 -6
- package/styles-theme/components-theme/_a-range-slider.theme.scss +16 -16
- package/styles-theme/components-theme/_a-table.theme.scss +2 -2
- package/styles-theme/components-theme/_m-btn-sorttable.theme.scss +3 -3
- package/styles-theme/components-theme/_m-nav-links.theme.scss +18 -0
- package/styles-theme/components-theme/_o-pry-presentation.theme.scss +9 -0
- package/styles-theme/components-theme/_o-tabs.theme.scss +1 -1
- package/styles-theme/layout-theme/_o-base-layout.theme.scss +1 -0
- package/styles-theme/main-theme.scss +1 -0
- package/toolbox/components/automate-refresh/automate-refresh.component.d.ts +3 -1
- package/toolbox/components/refresh-datasets/refresh-datasets.component.d.ts +3 -2
- package/widgets/widget-aggregated-chart/style/_o-widget-chart.scss +3 -0
- package/widgets/widget-graph/component/widget-graph.component.d.ts +0 -1
- package/widgets/widget-graph/style/_o-widget-graph.scss +14 -0
|
@@ -20,7 +20,7 @@ import * as i5$3 from '@provoly/dashboard/components/metadata-editor';
|
|
|
20
20
|
import { MetadataSelectors, MetadataActions, PryExpandPanelModule } from '@provoly/dashboard/components/metadata-editor';
|
|
21
21
|
import * as i2 from '@angular/router';
|
|
22
22
|
import { RouterModule } from '@angular/router';
|
|
23
|
-
import { switchMap, mergeMap, combineLatest, of, map, filter, combineLatestWith, Subscription,
|
|
23
|
+
import { switchMap, mergeMap, combineLatest, of, map, filter, BehaviorSubject, combineLatestWith, Subscription, distinctUntilChanged as distinctUntilChanged$1, debounceTime, startWith, Subject, zip, takeUntil, catchError, withLatestFrom, tap } from 'rxjs';
|
|
24
24
|
import { v4 } from 'uuid';
|
|
25
25
|
import equal from 'fast-deep-equal/es6';
|
|
26
26
|
import { distinctUntilChanged, map as map$1, filter as filter$1, mergeMap as mergeMap$1, catchError as catchError$1 } from 'rxjs/operators';
|
|
@@ -961,15 +961,11 @@ const AdminClassSelectors = {
|
|
|
961
961
|
|
|
962
962
|
class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
963
963
|
set currentClass(clazz) {
|
|
964
|
-
this._currentClass
|
|
965
|
-
this.
|
|
966
|
-
this.possibleAttributes = this.possibleNonAttributesFields
|
|
967
|
-
.concat(this.fields)
|
|
968
|
-
.sort((f1, f2) => f1.name.localeCompare(f2.name));
|
|
969
|
-
this.currentClassConfig = JSON.parse(JSON.stringify(this.defs[this.currentClass.id] ?? { type: 'default' }));
|
|
964
|
+
this._currentClass$.next(clazz ?? {});
|
|
965
|
+
this.currentClassConfig = this.removeUnknown(JSON.parse(JSON.stringify(this.defs[this.currentClass.id] ?? { type: 'default' })));
|
|
970
966
|
}
|
|
971
967
|
get currentClass() {
|
|
972
|
-
return this._currentClass;
|
|
968
|
+
return this._currentClass$.value;
|
|
973
969
|
}
|
|
974
970
|
constructor(tooltipFactoryService, injector, translateService, store) {
|
|
975
971
|
super();
|
|
@@ -979,7 +975,6 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
979
975
|
this.store = store;
|
|
980
976
|
this.currentClassConfig = { type: 'default' };
|
|
981
977
|
this.advancedTooltip = false;
|
|
982
|
-
this.possibleAttributes = [];
|
|
983
978
|
this.possibleNonAttributesFields = [
|
|
984
979
|
{
|
|
985
980
|
name: 'id',
|
|
@@ -991,11 +986,11 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
991
986
|
}
|
|
992
987
|
];
|
|
993
988
|
this.backPressed = new EventEmitter();
|
|
994
|
-
this._currentClass = {};
|
|
995
|
-
this.fields = [];
|
|
989
|
+
this._currentClass$ = new BehaviorSubject({});
|
|
996
990
|
this.strOptions = '';
|
|
997
991
|
this.defs = {};
|
|
998
992
|
this.noTooltip = false;
|
|
993
|
+
this.attributes = [];
|
|
999
994
|
this.possibleTooltipTypes$ = this.tooltipFactoryService.types$.pipe(map((types) => types.map((type) => ({
|
|
1000
995
|
value: type,
|
|
1001
996
|
label: this.translateService.instant('@pry.tooltip.' + type)
|
|
@@ -1004,11 +999,31 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
1004
999
|
this.defs = defs;
|
|
1005
1000
|
this.currentClassConfig = JSON.parse(JSON.stringify(defs[this.currentClass.id] ?? { type: 'default' }));
|
|
1006
1001
|
}));
|
|
1002
|
+
this.classes$ = this.store.select(ClassSelectors.classes);
|
|
1003
|
+
this.fields$ = this.store.select(FieldSelectors.fields);
|
|
1004
|
+
this.attributesOfClass$ = combineLatest([this._currentClass$, this.classes$]).pipe(map(([clazz, classes]) => classes.find((cl) => cl.id === clazz.id)?.attributes ?? []), map((attrs) => [...attrs, ...this.possibleNonAttributesFields].sort((f1, f2) => f1.name.localeCompare(f2.name))));
|
|
1005
|
+
this.subscriptions.add(this.attributesOfClass$.subscribe((attrs) => {
|
|
1006
|
+
this.attributes = attrs;
|
|
1007
|
+
this.mockData = attrs
|
|
1008
|
+
.map((attr) => ({
|
|
1009
|
+
[attr.technicalName]: {
|
|
1010
|
+
type: 'VALUE',
|
|
1011
|
+
value: '«' + this.translateService.instant('@pry.admin.customize.exemple', { expr: attr.technicalName }) + '»',
|
|
1012
|
+
visible: true
|
|
1013
|
+
}
|
|
1014
|
+
}))
|
|
1015
|
+
.reduce((p, c) => ({ ...p, attributes: { ...p.attributes, ...c } }), {
|
|
1016
|
+
oClass: this.currentClass.id,
|
|
1017
|
+
id: v4(),
|
|
1018
|
+
label: '«' + this.translateService.instant('@pry.admin.customize.exemple', { expr: 'label' }) + '»',
|
|
1019
|
+
attributes: {}
|
|
1020
|
+
});
|
|
1021
|
+
}));
|
|
1007
1022
|
}
|
|
1008
1023
|
tooltipTypeChanged($event) {
|
|
1009
1024
|
this.currentClassConfig.type = $event;
|
|
1010
1025
|
if (this.currentClassConfig.type === 'attribute') {
|
|
1011
|
-
this.currentClassConfig.options = { attributes: this.
|
|
1026
|
+
this.currentClassConfig.options = { attributes: this.attributes.map((attr) => attr.id) };
|
|
1012
1027
|
}
|
|
1013
1028
|
else {
|
|
1014
1029
|
this.currentClassConfig.options = {};
|
|
@@ -1029,20 +1044,7 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
1029
1044
|
component$.subscribe((component) => {
|
|
1030
1045
|
this.noTooltip = !component;
|
|
1031
1046
|
if (component) {
|
|
1032
|
-
component.instance.data.item = this.
|
|
1033
|
-
.map((attr) => ({
|
|
1034
|
-
[attr.technicalName]: {
|
|
1035
|
-
type: 'VALUE',
|
|
1036
|
-
value: '«' + this.translateService.instant('@pry.admin.customize.exemple', { expr: attr.technicalName }) + '»',
|
|
1037
|
-
visible: true
|
|
1038
|
-
}
|
|
1039
|
-
}))
|
|
1040
|
-
.reduce((p, c) => ({ ...p, attributes: { ...p.attributes, ...c } }), {
|
|
1041
|
-
oClass: this.currentClass.id,
|
|
1042
|
-
id: v4(),
|
|
1043
|
-
label: '«' + this.translateService.instant('@pry.admin.customize.exemple', { expr: 'label' }) + '»',
|
|
1044
|
-
attributes: {}
|
|
1045
|
-
});
|
|
1047
|
+
component.instance.data.item = this.mockData;
|
|
1046
1048
|
this.tmpComponent = component;
|
|
1047
1049
|
component.instance.context = this.currentClassConfig.options;
|
|
1048
1050
|
}
|
|
@@ -1061,12 +1063,24 @@ class AdminClassesCustomizeTooltipComponent extends SubscriptionnerDirective {
|
|
|
1061
1063
|
this.currentClassConfig.options.attributes = $event;
|
|
1062
1064
|
setTimeout(() => this.updateExample(), 100);
|
|
1063
1065
|
}
|
|
1066
|
+
removeUnknown(config) {
|
|
1067
|
+
if (config.type === 'attribute') {
|
|
1068
|
+
const toRemove = [];
|
|
1069
|
+
config.options.attributes.forEach((attr) => {
|
|
1070
|
+
if (!this.attributes.map((attr) => attr.id).includes(attr)) {
|
|
1071
|
+
toRemove.push(attr);
|
|
1072
|
+
}
|
|
1073
|
+
});
|
|
1074
|
+
config.options.attributes = config.options.attributes.filter((attr) => !toRemove.includes(attr));
|
|
1075
|
+
}
|
|
1076
|
+
return config;
|
|
1077
|
+
}
|
|
1064
1078
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminClassesCustomizeTooltipComponent, deps: [{ token: i4.TooltipFactoryService }, { token: i0.Injector }, { token: i4.PryI18nService }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1065
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\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 <div class=\"m-form-label-field -width-xl\" *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 (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [items]=\"
|
|
1079
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\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 <div class=\"m-form-label-field -width-xl\" *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 (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [items]=\"attributesOfClass$ | async\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n bindLabel=\"name\"\n bindValue=\"id\"\n ></pry-select>\n </div>\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: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
1066
1080
|
}
|
|
1067
1081
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminClassesCustomizeTooltipComponent, decorators: [{
|
|
1068
1082
|
type: Component,
|
|
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 (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\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 <div class=\"m-form-label-field -width-xl\" *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 (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [items]=\"
|
|
1083
|
+
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 (ngModelChange)=\"tooltipTypeChanged($event)\"\n [ngModel]=\"currentClassConfig.type\"\n [items]=\"possibleTooltipTypes$ | async\"\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 <div class=\"m-form-label-field -width-xl\" *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 (ngModelChange)=\"changeAttributes($event)\"\n [ngModel]=\"currentClassConfig.options.attributes\"\n [items]=\"attributesOfClass$ | async\"\n [multiple]=\"true\"\n [closeOnSelect]=\"false\"\n bindLabel=\"name\"\n bindValue=\"id\"\n ></pry-select>\n </div>\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" }]
|
|
1070
1084
|
}], ctorParameters: function () { return [{ type: i4.TooltipFactoryService }, { type: i0.Injector }, { type: i4.PryI18nService }, { type: i1.Store }]; }, propDecorators: { example: [{
|
|
1071
1085
|
type: ViewChild,
|
|
1072
1086
|
args: ['example', { read: ViewContainerRef }]
|
|
@@ -1227,6 +1241,7 @@ class AdminClassesCustomizeComponent extends SubscriptionnerDirective {
|
|
|
1227
1241
|
this.maxTilesAttributes = 5;
|
|
1228
1242
|
this.subscriptions.add(this.route.params.subscribe((params) => this.store.dispatch(AdminClassActions.selectClass({ clazz: { id: params['id'] } }))));
|
|
1229
1243
|
this.store.dispatch(ClassActions.load());
|
|
1244
|
+
this.store.dispatch(FieldActions.load());
|
|
1230
1245
|
this.store.dispatch(ConfigActions.loadCustomization());
|
|
1231
1246
|
this.fields$ = this.store.select(FieldSelectors.fields);
|
|
1232
1247
|
this.currentClass$ = combineLatest([
|
|
@@ -1238,15 +1253,15 @@ class AdminClassesCustomizeComponent extends SubscriptionnerDirective {
|
|
|
1238
1253
|
this.subscriptions.add(this.currentPropertiesConfig$.pipe(combineLatestWith(this.currentClass$)).subscribe(([attrs, clazz]) => {
|
|
1239
1254
|
this.defaultAttributes = JSON.parse(JSON.stringify(attrs));
|
|
1240
1255
|
this.otherAttributes = (clazz ?? { attributes: [] }).attributes
|
|
1241
|
-
.filter((attr) => !attrs.includes(attr.
|
|
1242
|
-
.map((attr) => attr.
|
|
1256
|
+
.filter((attr) => !attrs.includes(attr.name))
|
|
1257
|
+
.map((attr) => attr.name);
|
|
1243
1258
|
}));
|
|
1244
1259
|
this.currentTilePropertiesConfig$ = this.store.select(ConfigSelectors.tileAttributesDefinitions).pipe(combineLatestWith(this.currentClass$, this.fields$), map(([defs, clazz, fields]) => ItemUtils.getAttributesDefinitionForClass((clazz ?? { attributes: [] }), defs, fields)), map((attrs) => attrs.filter((_, i) => i < this.maxTilesAttributes)));
|
|
1245
1260
|
this.subscriptions.add(this.currentTilePropertiesConfig$.pipe(combineLatestWith(this.currentClass$)).subscribe(([attrs, clazz]) => {
|
|
1246
1261
|
this.defaultTileAttributes = JSON.parse(JSON.stringify(attrs));
|
|
1247
1262
|
this.otherTileAttributes = (clazz ?? { attributes: [] }).attributes
|
|
1248
|
-
.filter((attr) => !attrs.includes(attr.
|
|
1249
|
-
.map((attr) => attr.
|
|
1263
|
+
.filter((attr) => !attrs.includes(attr.name))
|
|
1264
|
+
.map((attr) => attr.name);
|
|
1250
1265
|
}));
|
|
1251
1266
|
this.subscriptions.add(this.store.select(ConfigSelectors.maxAttributesInTiles).subscribe((max) => {
|
|
1252
1267
|
this.maxTilesAttributes = max;
|
|
@@ -3530,11 +3545,11 @@ class AdminMenuComponent extends BaseMenuComponent {
|
|
|
3530
3545
|
this.store.dispatch(AdminActions.highlightMenu({ menu }));
|
|
3531
3546
|
}
|
|
3532
3547
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminMenuComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3533
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdminMenuComponent, selector: "pry-admin-menu", usesInheritance: true, ngImport: i0, template: "<nav class=\"m-nav-links\">\n <ng-container *ngFor=\"let sub of subMenu$ | async\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of sub.subMenus\">\n <li\n *pryAccess=\"{ module: menu.module, page: menu.page, subMenu: menu.subMenu }\"\n class=\"m-nav-links__list__item\"\n >\n <a [routerLink]=\"menu.menu\" class=\"a-btn
|
|
3548
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AdminMenuComponent, selector: "pry-admin-menu", usesInheritance: true, ngImport: i0, template: "<nav class=\"m-nav-links\">\n <ng-container *ngFor=\"let sub of subMenu$ | async\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of sub.subMenus\">\n <li\n *pryAccess=\"{ module: menu.module, page: menu.page, subMenu: menu.subMenu }\"\n class=\"m-nav-links__list__item\"\n >\n <a [routerLink]=\"menu.menu\" class=\"a-btn -width-full\" [routerLinkActive]=\"'is-active'\">\n {{ baseMenuTranslation + menu.menu | i18n }}\n </a>\n </li>\n </ng-container>\n </ul>\n </ng-container>\n</nav>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
3534
3549
|
}
|
|
3535
3550
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdminMenuComponent, decorators: [{
|
|
3536
3551
|
type: Component,
|
|
3537
|
-
args: [{ selector: 'pry-admin-menu', template: "<nav class=\"m-nav-links\">\n <ng-container *ngFor=\"let sub of subMenu$ | async\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of sub.subMenus\">\n <li\n *pryAccess=\"{ module: menu.module, page: menu.page, subMenu: menu.subMenu }\"\n class=\"m-nav-links__list__item\"\n >\n <a [routerLink]=\"menu.menu\" class=\"a-btn
|
|
3552
|
+
args: [{ selector: 'pry-admin-menu', template: "<nav class=\"m-nav-links\">\n <ng-container *ngFor=\"let sub of subMenu$ | async\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of sub.subMenus\">\n <li\n *pryAccess=\"{ module: menu.module, page: menu.page, subMenu: menu.subMenu }\"\n class=\"m-nav-links__list__item\"\n >\n <a [routerLink]=\"menu.menu\" class=\"a-btn -width-full\" [routerLinkActive]=\"'is-active'\">\n {{ baseMenuTranslation + menu.menu | i18n }}\n </a>\n </li>\n </ng-container>\n </ul>\n </ng-container>\n</nav>\n" }]
|
|
3538
3553
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }]; } });
|
|
3539
3554
|
|
|
3540
3555
|
class AdminTitleComponent extends SubscriptionnerDirective {
|