@provoly/dashboard 1.2.0 → 1.2.2
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-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +3 -3
- package/components/sinceDate/sinceDate.pipe.d.ts +2 -0
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +6 -6
- package/esm2022/components/sinceDate/sinceDate.pipe.mjs +27 -10
- package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +28 -21
- package/esm2022/lib/core/components/share/legacy-share/share.component.mjs +25 -37
- package/esm2022/lib/core/components/share/share.model.mjs +2 -7
- package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
- package/esm2022/lib/core/model/widget-analytic-manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/widget.interface.mjs +1 -1
- package/esm2022/lib/core/store/data-source/data-source.actions.mjs +1 -1
- package/esm2022/lib/core/store/data-source/data-source.model.mjs +7 -2
- package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +3 -6
- package/esm2022/restitution/components/restitution/restitution.component.mjs +8 -12
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +4 -5
- package/esm2022/restitution/components/restitution-list/restitution-list.component.mjs +2 -2
- package/esm2022/restitution/components/restitution-list-item/restitution-list-item.component.mjs +4 -5
- package/esm2022/search/components/save-query/save-query.component.mjs +2 -2
- package/esm2022/search/search-tools/search-tools.component.mjs +1 -1
- package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +88 -14
- package/esm2022/widgets/widget-analytic/i18n/en.translations.mjs +7 -2
- package/esm2022/widgets/widget-analytic/i18n/fr.translations.mjs +7 -2
- package/esm2022/widgets/widget-analytic/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-analytic/widget-analytic.module.mjs +12 -8
- package/fesm2022/provoly-dashboard-admin.mjs +5 -5
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-sinceDate.mjs +26 -9
- package/fesm2022/provoly-dashboard-components-sinceDate.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +11 -17
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-search.mjs +2 -2
- package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +112 -24
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +105 -108
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/share/group-share/group-share.component.d.ts +15 -10
- package/lib/core/components/share/legacy-share/share.component.d.ts +8 -14
- package/lib/core/components/share/share.model.d.ts +0 -9
- package/lib/core/i18n/en.translations.d.ts +2 -1
- package/lib/core/i18n/fr.translations.d.ts +2 -1
- package/lib/core/model/widget-analytic-manifest.interface.d.ts +8 -1
- package/lib/core/model/widget.interface.d.ts +1 -2
- package/lib/core/store/data-source/data-source.actions.d.ts +9 -4
- package/lib/core/store/data-source/data-source.model.d.ts +9 -2
- package/lib/core/toolbox/toolbox-menu.service.d.ts +1 -3
- package/package.json +7 -7
- package/restitution/components/restitution/restitution.component.d.ts +2 -3
- package/restitution/components/restitution-catalog/restitution-catalog.component.d.ts +1 -2
- package/restitution/components/restitution-list-item/restitution-list-item.component.d.ts +1 -2
- package/search/components/save-query/save-query.component.d.ts +5 -2
- package/search/search-fulltext/store/search-fulltext.effects.d.ts +4 -1
- package/search/search-mono-class/store/search-mono-class.effects.d.ts +4 -1
- package/search/search-multi-class/store/search-multi-class.effects.d.ts +4 -1
- package/widgets/widget-analytic/component/widget-analytic.component.d.ts +18 -0
- package/widgets/widget-analytic/i18n/en.translations.d.ts +5 -0
- package/widgets/widget-analytic/i18n/fr.translations.d.ts +5 -0
- package/widgets/widget-analytic/style/_o-widget-analytic.scss +48 -0
- package/widgets/widget-analytic/widget-analytic.module.d.ts +3 -2
|
@@ -8,24 +8,41 @@ class PrySinceDatePipe {
|
|
|
8
8
|
}
|
|
9
9
|
transform(value, ...args) {
|
|
10
10
|
const date = new Date(value);
|
|
11
|
-
|
|
12
|
-
const dayDif = this.getDayDiff(date, dateNow);
|
|
13
|
-
if (dayDif > 30 || (!!args[0] && args[0].onlyLocale)) {
|
|
11
|
+
if (!!args[0] && args[0].onlyLocale) {
|
|
14
12
|
return date.toLocaleString();
|
|
15
13
|
}
|
|
16
|
-
|
|
17
|
-
return
|
|
14
|
+
if (isNaN(date.getTime())) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
const dateNow = this._now ?? new Date();
|
|
18
|
+
if (date.getFullYear() === dateNow.getFullYear() &&
|
|
19
|
+
date.getMonth() === dateNow.getMonth() &&
|
|
20
|
+
date.getDate() === dateNow.getDate()) {
|
|
21
|
+
return this.translateService.instant('@pry.toolbox.today', {
|
|
22
|
+
hour: `${date.getHours()}`.padStart(2, '0'),
|
|
23
|
+
min: `${date.getMinutes()}`.padStart(2, '0')
|
|
24
|
+
});
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
const dayDiff = this.getDayDiff(date, dateNow);
|
|
27
|
+
const dayDiffAbs = Math.ceil(Math.abs(dayDiff));
|
|
28
|
+
const dayDiffPast = dayDiff > 0;
|
|
29
|
+
if (dayDiffAbs > 30) {
|
|
30
|
+
return date.toLocaleString();
|
|
21
31
|
}
|
|
22
32
|
else {
|
|
23
|
-
return ''
|
|
33
|
+
return this.translateService.instant(dayDiffPast ? '@pry.toolbox.since_day' : '@pry.toolbox.from_day', {
|
|
34
|
+
day: dayDiffAbs,
|
|
35
|
+
plural: dayDiffAbs >= 2 ? 's' : ''
|
|
36
|
+
});
|
|
24
37
|
}
|
|
25
38
|
}
|
|
26
39
|
getDayDiff(startDate, endDate) {
|
|
27
40
|
const msInDay = 24 * 60 * 60 * 1000;
|
|
28
|
-
return
|
|
41
|
+
return (endDate.getTime() - startDate.getTime()) / msInDay;
|
|
42
|
+
}
|
|
43
|
+
useNow(date) {
|
|
44
|
+
this._now = date;
|
|
45
|
+
return this;
|
|
29
46
|
}
|
|
30
47
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PrySinceDatePipe, deps: [{ token: i1.PryI18nService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
31
48
|
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PrySinceDatePipe, name: "sinceDate" }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-components-sinceDate.mjs","sources":["../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.pipe.ts","../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.module.ts","../../../../projects/provoly/dashboard/components/sinceDate/provoly-dashboard-components-sinceDate.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { PryI18nService } from '@provoly/dashboard';\n\n@Pipe({\n name: 'sinceDate'\n})\nexport class PrySinceDatePipe implements PipeTransform {\n constructor(private translateService: PryI18nService) {}\n\n transform(value: string, ...args: any[]): string {\n const date = new Date(value);\n
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-components-sinceDate.mjs","sources":["../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.pipe.ts","../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.module.ts","../../../../projects/provoly/dashboard/components/sinceDate/provoly-dashboard-components-sinceDate.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { PryI18nService } from '@provoly/dashboard';\n\n@Pipe({\n name: 'sinceDate'\n})\nexport class PrySinceDatePipe implements PipeTransform {\n private _now?: Date;\n\n constructor(private translateService: PryI18nService) {}\n\n transform(value: string, ...args: any[]): string {\n const date = new Date(value);\n\n if (!!args[0] && args[0].onlyLocale) {\n return date.toLocaleString();\n }\n\n if (isNaN(date.getTime())) {\n return '';\n }\n\n const dateNow = this._now ?? new Date();\n\n if (\n date.getFullYear() === dateNow.getFullYear() &&\n date.getMonth() === dateNow.getMonth() &&\n date.getDate() === dateNow.getDate()\n ) {\n return this.translateService.instant('@pry.toolbox.today', {\n hour: `${date.getHours()}`.padStart(2, '0'),\n min: `${date.getMinutes()}`.padStart(2, '0')\n });\n }\n\n const dayDiff = this.getDayDiff(date, dateNow);\n const dayDiffAbs = Math.ceil(Math.abs(dayDiff));\n const dayDiffPast = dayDiff > 0;\n if (dayDiffAbs > 30) {\n return date.toLocaleString();\n } else {\n return this.translateService.instant(dayDiffPast ? '@pry.toolbox.since_day' : '@pry.toolbox.from_day', {\n day: dayDiffAbs,\n plural: dayDiffAbs >= 2 ? 's' : ''\n });\n }\n }\n\n getDayDiff(startDate: Date, endDate: Date): number {\n const msInDay = 24 * 60 * 60 * 1000;\n return (endDate.getTime() - startDate.getTime()) / msInDay;\n }\n\n useNow(date?: Date) {\n this._now = date;\n return this;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { PrySinceDatePipe } from './sinceDate.pipe';\n\n@NgModule({\n declarations: [PrySinceDatePipe],\n exports: [PrySinceDatePipe]\n})\nexport class PrySinceDateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAMa,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CAAoB,gBAAgC,EAAA;QAAhC,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAgB;KAAI;AAExD,IAAA,SAAS,CAAC,KAAa,EAAE,GAAG,IAAW,EAAA;AACrC,QAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;AAE7B,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE;AACnC,YAAA,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;SAC9B;QAED,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE;AACzB,YAAA,OAAO,EAAE,CAAC;SACX;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QAExC,IACE,IAAI,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,WAAW,EAAE;AAC5C,YAAA,IAAI,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC,QAAQ,EAAE;YACtC,IAAI,CAAC,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,EAAE,EACpC;AACA,YAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,oBAAoB,EAAE;AACzD,gBAAA,IAAI,EAAE,CAAA,EAAG,IAAI,CAAC,QAAQ,EAAE,CAAE,CAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAC3C,gBAAA,GAAG,EAAE,CAAA,EAAG,IAAI,CAAC,UAAU,EAAE,CAAE,CAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAC7C,aAAA,CAAC,CAAC;SACJ;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AAChD,QAAA,MAAM,WAAW,GAAG,OAAO,GAAG,CAAC,CAAC;AAChC,QAAA,IAAI,UAAU,GAAG,EAAE,EAAE;AACnB,YAAA,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;SAC9B;aAAM;AACL,YAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,GAAG,wBAAwB,GAAG,uBAAuB,EAAE;AACrG,gBAAA,GAAG,EAAE,UAAU;gBACf,MAAM,EAAE,UAAU,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE;AACnC,aAAA,CAAC,CAAC;SACJ;KACF;IAED,UAAU,CAAC,SAAe,EAAE,OAAa,EAAA;QACvC,MAAM,OAAO,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACpC,QAAA,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC;KAC5D;AAED,IAAA,MAAM,CAAC,IAAW,EAAA;AAChB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjB,QAAA,OAAO,IAAI,CAAC;KACb;8GAlDU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAAhB,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA,EAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AAClB,iBAAA,CAAA;;;MCEY,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHd,gBAAgB,CAAA,EAAA,OAAA,EAAA,CACrB,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAEf,kBAAkB,EAAA,CAAA,CAAA,EAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;oBAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import { Component, ViewEncapsulation, EventEmitter, Input, Output, TemplateRef,
|
|
|
5
5
|
import * as i4 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i1 from '@provoly/dashboard';
|
|
8
|
-
import { SubscriptionnerDirective, DEFAULT_RESTITUTION_ICON_URL,
|
|
8
|
+
import { SubscriptionnerDirective, DEFAULT_RESTITUTION_ICON_URL, LibraryTypes, DataSourceActions, ClassActions, ConfigActions, FieldActions, ClassSelectors, DataSourceSelectors, DashboardActions, ViewMode, getDisplayOptions, SearchActions, ConfigSelectors, DashboardSelectors, DashboardGridLayout, PryCoreModule, PryIconModule, PrySelectModule, PryDashboardModule, PryShareModule, PryI18nModule, PryOverlayModule } from '@provoly/dashboard';
|
|
9
9
|
import { PryCardModule } from '@provoly/dashboard/components/card';
|
|
10
10
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
11
11
|
import * as i8 from '@provoly/dashboard/components/sinceDate';
|
|
@@ -47,12 +47,8 @@ class PryRestitutionComponent extends SubscriptionnerDirective {
|
|
|
47
47
|
image: DEFAULT_RESTITUTION_ICON_URL,
|
|
48
48
|
description: ''
|
|
49
49
|
};
|
|
50
|
-
this.
|
|
51
|
-
type: PryVisibilityType.PRIVATE,
|
|
52
|
-
users: []
|
|
53
|
-
};
|
|
50
|
+
this.groups = [];
|
|
54
51
|
this.openSettings$ = new Subject();
|
|
55
|
-
this.users$ = null;
|
|
56
52
|
this.consultMode = false;
|
|
57
53
|
this.selectedRestitution = null;
|
|
58
54
|
this.edit = true;
|
|
@@ -116,8 +112,8 @@ class PryRestitutionComponent extends SubscriptionnerDirective {
|
|
|
116
112
|
from: 'PryRestitutionComponent.ngOnInit()-2'
|
|
117
113
|
}));
|
|
118
114
|
}
|
|
119
|
-
if (this.selectedRestitution.
|
|
120
|
-
this.
|
|
115
|
+
if (this.selectedRestitution.groups) {
|
|
116
|
+
this.groups = this.selectedRestitution.groups;
|
|
121
117
|
}
|
|
122
118
|
this.form.selectedDataSources.forEach((dataSource) => {
|
|
123
119
|
this.store.dispatch(SearchActions.getDatasourceItems({
|
|
@@ -199,7 +195,7 @@ class PryRestitutionComponent extends SubscriptionnerDirective {
|
|
|
199
195
|
name: this.form.title,
|
|
200
196
|
description: this.form.description,
|
|
201
197
|
image: this.form.image ?? '',
|
|
202
|
-
|
|
198
|
+
groups: this.groups,
|
|
203
199
|
datasource: this.form.selectedDataSources ?? [],
|
|
204
200
|
modificationDate: ''
|
|
205
201
|
}
|
|
@@ -209,11 +205,11 @@ class PryRestitutionComponent extends SubscriptionnerDirective {
|
|
|
209
205
|
this.restitutionCreated.emit();
|
|
210
206
|
}
|
|
211
207
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryRestitutionComponent, deps: [{ token: i1.ToolboxManifestService }, { token: i1$1.Store }, { token: i1.ToolboxMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
212
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryRestitutionComponent, selector: "pry-restitution", inputs: { selectedRestitution: "selectedRestitution", edit: "edit", isDataSourceSelected: "isDataSourceSelected", bindId: "bindId" }, outputs: { restitutionCreated: "restitutionCreated" }, usesInheritance: true, ngImport: i0, template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-restitution\">\n <h3 class=\"a-h2 o-restitution__title\">\n {{ (consultMode ? '@pry.restitution.consult' : edit ? '@pry.restitution.edit' : '@pry.restitution.create') | i18n }}\n </h3>\n <pry-stepper
|
|
208
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryRestitutionComponent, selector: "pry-restitution", inputs: { selectedRestitution: "selectedRestitution", edit: "edit", isDataSourceSelected: "isDataSourceSelected", bindId: "bindId" }, outputs: { restitutionCreated: "restitutionCreated" }, usesInheritance: true, ngImport: i0, template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-restitution\">\n <h3 class=\"a-h2 o-restitution__title\">\n {{ (consultMode ? '@pry.restitution.consult' : edit ? '@pry.restitution.edit' : '@pry.restitution.create') | i18n }}\n </h3>\n <pry-stepper\n #stepper\n [isConsultMode]=\"consultMode\"\n (lastStepCompleted)=\"lastStepCompleted()\"\n (activeIndexChange)=\"activeStepIndex = $event\"\n >\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.configure' | i18n }}</h4>\n <div class=\"m-form-label-field\">\n <label for=\"restitution\" class=\"a-label\">{{ '@pry.restitution.restitution_type' | i18n }}</label>\n <pry-select\n id=\"restitution\"\n [items]=\"types$ | async\"\n [(ngModel)]=\"form.selectedWidget\"\n [disabled]=\"consultMode\"\n [closeOnSelect]=\"true\"\n bindIcon=\"icon\"\n bindLabel=\"label\"\n bindValue=\"type\"\n >\n </pry-select>\n </div>\n <ng-container *ngIf=\"form.selectedWidget !== ''\">\n <div class=\"m-form-label-field\">\n <label for=\"graphTitle\" class=\"a-label\">{{ '@pry.restitution.graph_title' | i18n }}</label>\n <input\n name=\"title\"\n id=\"graphTitle\"\n class=\"a-form-field\"\n [(ngModel)]=\"form.title\"\n type=\"text\"\n [disabled]=\"consultMode\"\n maxlength=\"30\"\n ngDefaultControl\n />\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"description\" class=\"a-label\">{{ '@pry.restitution.description' | i18n }}</label>\n <textarea\n name=\"description\"\n id=\"description\"\n class=\"a-form-field\"\n [(ngModel)]=\"form.description\"\n style=\"resize: none\"\n [disabled]=\"consultMode\"\n maxlength=\"255\"\n ngDefaultControl\n >\n </textarea>\n </div>\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\">{{ '@pry.presentation.form.image' | i18n }}</label>\n <div class=\"o-file-input\">\n <pry-select-image (changed)=\"image = $event\" [iconUrl]=\"image\" [mode]=\"type\"></pry-select-image>\n </div>\n </div>\n <div class=\"m-btn-group -space-evenly actions\">\n <button (click)=\"cancel(stepper)\" type=\"button\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.restitution.close' | i18n }}\n </button>\n <button\n (click)=\"goNext(stepper)\"\n [disabled]=\"form.selectedWidget === '' || form.title.trim().length === 0\"\n class=\"a-btn a-btn--primary\"\n >\n {{ '@pry.restitution.validate' | i18n }}\n </button>\n </div>\n </ng-container>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.dataSource' | i18n }}</h4>\n <pry-datasource-selector\n bindLabel=\"name\"\n bindValue=\"id\"\n translationStringBase=\"@pry.components.chipsSelector.datasource.\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n [usedItems]=\"(usedDatasources$ | async) ?? []\"\n [showActionButtons]=\"false\"\n ></pry-datasource-selector>\n <ng-container [ngTemplateOutlet]=\"buttons\" [ngTemplateOutletContext]=\"{ submit: true }\"></ng-container>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.visualize' | i18n }}</h4>\n <div class=\"widget-instanciator\">\n <pry-widget-instanciator\n [standalone]=\"true\"\n [staticManifest]=\"customManifest\"\n [open$]=\"openSettings$\"\n (manifestModified)=\"updateManifest($event)\"\n ></pry-widget-instanciator>\n </div>\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.share' | i18n }}</h4>\n <h3>{{ '@pry.restitution.access' | i18n }}</h3>\n {{ '@pry.restitution.choice' | i18n }}\n <ul>\n <li>\n {{ '@pry.restitution.public' | i18n }}\n </li>\n </ul>\n {{ '@pry.restitution.or' | i18n }}\n <ul>\n <li>\n {{ '@pry.restitution.private' | i18n }}\n </li>\n </ul>\n <pry-share [(ngModel)]=\"groups\" labelProperty=\"name\" valueProperty=\"id\" [disabled]=\"consultMode\"></pry-share>\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </pry-step>\n </pry-stepper>\n</div>\n\n<ng-template #buttons let-submit=\"submit\">\n <div class=\"m-btn-group -space-evenly actions\">\n <button (click)=\"prev(stepper)\" type=\"button\" class=\"a-btn a-btn--secondary\">\n {{ (consultMode ? '@pry.restitution.goBack' : '@pry.restitution.close') | i18n }}\n </button>\n <button (click)=\"goNext(stepper, submit)\" type=\"button\" class=\"a-btn a-btn--primary\">\n {{ (activeStepIndex === 3 ? '@pry.restitution.share' : '@pry.restitution.next') | i18n }}\n </button>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.PryStepperComponent, selector: "pry-stepper", inputs: ["isConsultMode"], outputs: ["lastStepCompleted", "activeIndexChange"] }, { kind: "component", type: i5.PryStepComponent, selector: "pry-step", inputs: ["setActiveState"] }, { kind: "directive", type: i5.PryStepTitleDirective, selector: "[stepTitle]" }, { kind: "component", type: i1.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i1.WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: i1.DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["usedItems", "manifest"] }, { kind: "component", type: i1.PryShareComponent, selector: "pry-share", inputs: ["labelProperty", "valueProperty"] }, { kind: "component", type: PryCatalogCssComponent, selector: "pry-restitution-css" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.I18nPipe, name: "i18n" }] }); }
|
|
213
209
|
}
|
|
214
210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryRestitutionComponent, decorators: [{
|
|
215
211
|
type: Component,
|
|
216
|
-
args: [{ selector: 'pry-restitution', template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-restitution\">\n <h3 class=\"a-h2 o-restitution__title\">\n {{ (consultMode ? '@pry.restitution.consult' : edit ? '@pry.restitution.edit' : '@pry.restitution.create') | i18n }}\n </h3>\n <pry-stepper
|
|
212
|
+
args: [{ selector: 'pry-restitution', template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-restitution\">\n <h3 class=\"a-h2 o-restitution__title\">\n {{ (consultMode ? '@pry.restitution.consult' : edit ? '@pry.restitution.edit' : '@pry.restitution.create') | i18n }}\n </h3>\n <pry-stepper\n #stepper\n [isConsultMode]=\"consultMode\"\n (lastStepCompleted)=\"lastStepCompleted()\"\n (activeIndexChange)=\"activeStepIndex = $event\"\n >\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.configure' | i18n }}</h4>\n <div class=\"m-form-label-field\">\n <label for=\"restitution\" class=\"a-label\">{{ '@pry.restitution.restitution_type' | i18n }}</label>\n <pry-select\n id=\"restitution\"\n [items]=\"types$ | async\"\n [(ngModel)]=\"form.selectedWidget\"\n [disabled]=\"consultMode\"\n [closeOnSelect]=\"true\"\n bindIcon=\"icon\"\n bindLabel=\"label\"\n bindValue=\"type\"\n >\n </pry-select>\n </div>\n <ng-container *ngIf=\"form.selectedWidget !== ''\">\n <div class=\"m-form-label-field\">\n <label for=\"graphTitle\" class=\"a-label\">{{ '@pry.restitution.graph_title' | i18n }}</label>\n <input\n name=\"title\"\n id=\"graphTitle\"\n class=\"a-form-field\"\n [(ngModel)]=\"form.title\"\n type=\"text\"\n [disabled]=\"consultMode\"\n maxlength=\"30\"\n ngDefaultControl\n />\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"description\" class=\"a-label\">{{ '@pry.restitution.description' | i18n }}</label>\n <textarea\n name=\"description\"\n id=\"description\"\n class=\"a-form-field\"\n [(ngModel)]=\"form.description\"\n style=\"resize: none\"\n [disabled]=\"consultMode\"\n maxlength=\"255\"\n ngDefaultControl\n >\n </textarea>\n </div>\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\">{{ '@pry.presentation.form.image' | i18n }}</label>\n <div class=\"o-file-input\">\n <pry-select-image (changed)=\"image = $event\" [iconUrl]=\"image\" [mode]=\"type\"></pry-select-image>\n </div>\n </div>\n <div class=\"m-btn-group -space-evenly actions\">\n <button (click)=\"cancel(stepper)\" type=\"button\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.restitution.close' | i18n }}\n </button>\n <button\n (click)=\"goNext(stepper)\"\n [disabled]=\"form.selectedWidget === '' || form.title.trim().length === 0\"\n class=\"a-btn a-btn--primary\"\n >\n {{ '@pry.restitution.validate' | i18n }}\n </button>\n </div>\n </ng-container>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.dataSource' | i18n }}</h4>\n <pry-datasource-selector\n bindLabel=\"name\"\n bindValue=\"id\"\n translationStringBase=\"@pry.components.chipsSelector.datasource.\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n [usedItems]=\"(usedDatasources$ | async) ?? []\"\n [showActionButtons]=\"false\"\n ></pry-datasource-selector>\n <ng-container [ngTemplateOutlet]=\"buttons\" [ngTemplateOutletContext]=\"{ submit: true }\"></ng-container>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.visualize' | i18n }}</h4>\n <div class=\"widget-instanciator\">\n <pry-widget-instanciator\n [standalone]=\"true\"\n [staticManifest]=\"customManifest\"\n [open$]=\"openSettings$\"\n (manifestModified)=\"updateManifest($event)\"\n ></pry-widget-instanciator>\n </div>\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.share' | i18n }}</h4>\n <h3>{{ '@pry.restitution.access' | i18n }}</h3>\n {{ '@pry.restitution.choice' | i18n }}\n <ul>\n <li>\n {{ '@pry.restitution.public' | i18n }}\n </li>\n </ul>\n {{ '@pry.restitution.or' | i18n }}\n <ul>\n <li>\n {{ '@pry.restitution.private' | i18n }}\n </li>\n </ul>\n <pry-share [(ngModel)]=\"groups\" labelProperty=\"name\" valueProperty=\"id\" [disabled]=\"consultMode\"></pry-share>\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </pry-step>\n </pry-stepper>\n</div>\n\n<ng-template #buttons let-submit=\"submit\">\n <div class=\"m-btn-group -space-evenly actions\">\n <button (click)=\"prev(stepper)\" type=\"button\" class=\"a-btn a-btn--secondary\">\n {{ (consultMode ? '@pry.restitution.goBack' : '@pry.restitution.close') | i18n }}\n </button>\n <button (click)=\"goNext(stepper, submit)\" type=\"button\" class=\"a-btn a-btn--primary\">\n {{ (activeStepIndex === 3 ? '@pry.restitution.share' : '@pry.restitution.next') | i18n }}\n </button>\n </div>\n</ng-template>\n" }]
|
|
217
213
|
}], ctorParameters: () => [{ type: i1.ToolboxManifestService }, { type: i1$1.Store }, { type: i1.ToolboxMenuService }], propDecorators: { selectedRestitution: [{
|
|
218
214
|
type: Input
|
|
219
215
|
}], edit: [{
|
|
@@ -235,7 +231,6 @@ class PryRestitutionCatalogComponent {
|
|
|
235
231
|
this.mode = ViewMode;
|
|
236
232
|
this.selectedMode = ViewMode.CATALOG;
|
|
237
233
|
this.selectedRestitution = null;
|
|
238
|
-
this.PryVisibilityType = PryVisibilityType;
|
|
239
234
|
this.store.dispatch(ConfigActions.loadWidgets());
|
|
240
235
|
this.store.dispatch(ConfigActions.getMapStyles());
|
|
241
236
|
this.restitutions$ = this.store
|
|
@@ -290,11 +285,11 @@ class PryRestitutionCatalogComponent {
|
|
|
290
285
|
}
|
|
291
286
|
}
|
|
292
287
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryRestitutionCatalogComponent, deps: [{ token: i1$1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
293
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryRestitutionCatalogComponent, selector: "pry-restitution-catalog", viewQueries: [{ propertyName: "templateActions", first: true, predicate: ["modalActions"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-manifest-layout o-restitution-catalog\">\n <ng-template [ngIf]=\"selectedMode === mode.CATALOG\">\n <div class=\"o-manifest-layout__toolbox\">\n <button\n type=\"button\"\n (click)=\"selectMode(mode.CREATION)\"\n class=\"a-btn a-btn--primary\"\n data-tooltip-position=\"bottom\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.restitution.create' | i18n }}\n </button>\n <div>\n <div class=\"o-catalog__search o-manifest-layout__toolbox__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.restitution.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.restitution.catalog' | i18n }}</h1>\n\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let restitution of filteredRestitution$ | async; let index = index\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"restitution.
|
|
288
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryRestitutionCatalogComponent, selector: "pry-restitution-catalog", viewQueries: [{ propertyName: "templateActions", first: true, predicate: ["modalActions"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-manifest-layout o-restitution-catalog\">\n <ng-template [ngIf]=\"selectedMode === mode.CATALOG\">\n <div class=\"o-manifest-layout__toolbox\">\n <button\n type=\"button\"\n (click)=\"selectMode(mode.CREATION)\"\n class=\"a-btn a-btn--primary\"\n data-tooltip-position=\"bottom\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.restitution.create' | i18n }}\n </button>\n <div>\n <div class=\"o-catalog__search o-manifest-layout__toolbox__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.restitution.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.restitution.catalog' | i18n }}</h1>\n\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let restitution of filteredRestitution$ | async; let index = index\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"restitution.groups?.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.restitution.lock' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"selectRestitution(restitution)\"\n [attr.data-tooltip]=\"'@pry.restitution.consultRestitution' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"restitution.image | getSecuredImage: [600, 600] | async\" />\n </div>\n </div>\n <ng-container *ngIf=\"restitution.owner\">\n <div class=\"more-button\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-actions-' + index\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"toggleModalActions(restitution, button)\"\n #button\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n </ng-container>\n </div>\n <div\n class=\"o-presentation__item__txt\"\n (click)=\"selectRestitution(restitution)\"\n [attr.data-tooltip]=\"'@pry.restitution.consultRestitution' | i18n\"\n >\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <h3 class=\"a-h3\">{{ restitution.name }}</h3>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ restitution.description }}\n </div>\n </div>\n <p class=\"a-p -date\">{{ restitution.modificationDate | sinceDate }}</p>\n </div>\n\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"selectRestitution(restitution)\"\n [attr.data-tooltip]=\"'@pry.restitution.consultRestitution' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.restitution.view' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </ng-template>\n <ng-template #modalActions>\n <div class=\"m-context-menu\">\n <ul\n *ngIf=\"selectedRestitution\"\n class=\"m-context-menu__list\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog restitution options\"\n >\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editRestitution(selectedRestitution)\"\n [disabled]=\"!selectedRestitution.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'edit' }\"\n >\n {{ '@pry.restitution.update' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"deleteRestitution(selectedRestitution.id)\"\n [disabled]=\"!selectedRestitution.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'delete' }\"\n >\n {{ '@pry.restitution.delete' | i18n }}\n </button>\n </li>\n </ul>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"selectedMode === mode.CONSULT\">\n <div class=\"o-manifest-layout__toolbox\">\n <button type=\"button\" (click)=\"selectMode(mode.CATALOG)\" class=\"a-btn a-btn--primary\">\n {{ '@pry.restitution.backToCatalog' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content\">\n <pry-restitution\n [selectedRestitution]=\"selectedRestitution\"\n [edit]=\"false\"\n (restitutionCreated)=\"closeRestitution($event)\"\n class=\"restitution\"\n ></pry-restitution>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"selectedMode === mode.CREATION\">\n <div class=\"o-manifest-layout__toolbox\">\n <button type=\"button\" (click)=\"selectMode(mode.CATALOG)\" class=\"a-btn a-btn--primary\">\n {{ '@pry.restitution.backToCatalog' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content\">\n <pry-restitution\n [edit]=\"false\"\n (restitutionCreated)=\"closeRestitution($event)\"\n class=\"restitution\"\n ></pry-restitution>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"selectedMode === mode.EDITION\">\n <div class=\"o-manifest-layout__toolbox\">\n <button type=\"button\" (click)=\"selectMode(mode.CATALOG)\" class=\"a-btn a-btn--primary\">\n {{ '@pry.restitution.backToCatalog' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content\">\n <pry-restitution\n (restitutionCreated)=\"closeRestitution($event)\"\n [selectedRestitution]=\"selectedRestitution\"\n class=\"restitution\"\n ></pry-restitution>\n </div>\n </ng-template>\n</div>\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: i1.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "directive", type: i1.EllipsisDirective, selector: "[ellipsis]", inputs: ["textElementSelector"] }, { kind: "component", type: i1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryRestitutionComponent, selector: "pry-restitution", inputs: ["selectedRestitution", "edit", "isDataSourceSelected", "bindId"], outputs: ["restitutionCreated"] }, { kind: "component", type: PryCatalogCssComponent, selector: "pry-restitution-css" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i1.I18nPipe, name: "i18n" }, { kind: "pipe", type: i8.PrySinceDatePipe, name: "sinceDate" }] }); }
|
|
294
289
|
}
|
|
295
290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryRestitutionCatalogComponent, decorators: [{
|
|
296
291
|
type: Component,
|
|
297
|
-
args: [{ selector: 'pry-restitution-catalog', template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-manifest-layout o-restitution-catalog\">\n <ng-template [ngIf]=\"selectedMode === mode.CATALOG\">\n <div class=\"o-manifest-layout__toolbox\">\n <button\n type=\"button\"\n (click)=\"selectMode(mode.CREATION)\"\n class=\"a-btn a-btn--primary\"\n data-tooltip-position=\"bottom\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.restitution.create' | i18n }}\n </button>\n <div>\n <div class=\"o-catalog__search o-manifest-layout__toolbox__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.restitution.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.restitution.catalog' | i18n }}</h1>\n\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let restitution of filteredRestitution$ | async; let index = index\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"restitution.
|
|
292
|
+
args: [{ selector: 'pry-restitution-catalog', template: "<pry-restitution-css></pry-restitution-css>\n<div class=\"o-manifest-layout o-restitution-catalog\">\n <ng-template [ngIf]=\"selectedMode === mode.CATALOG\">\n <div class=\"o-manifest-layout__toolbox\">\n <button\n type=\"button\"\n (click)=\"selectMode(mode.CREATION)\"\n class=\"a-btn a-btn--primary\"\n data-tooltip-position=\"bottom\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.restitution.create' | i18n }}\n </button>\n <div>\n <div class=\"o-catalog__search o-manifest-layout__toolbox__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.restitution.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.restitution.catalog' | i18n }}</h1>\n\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let restitution of filteredRestitution$ | async; let index = index\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"restitution.groups?.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.restitution.lock' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"selectRestitution(restitution)\"\n [attr.data-tooltip]=\"'@pry.restitution.consultRestitution' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"restitution.image | getSecuredImage: [600, 600] | async\" />\n </div>\n </div>\n <ng-container *ngIf=\"restitution.owner\">\n <div class=\"more-button\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-actions-' + index\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"toggleModalActions(restitution, button)\"\n #button\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n </ng-container>\n </div>\n <div\n class=\"o-presentation__item__txt\"\n (click)=\"selectRestitution(restitution)\"\n [attr.data-tooltip]=\"'@pry.restitution.consultRestitution' | i18n\"\n >\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <h3 class=\"a-h3\">{{ restitution.name }}</h3>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ restitution.description }}\n </div>\n </div>\n <p class=\"a-p -date\">{{ restitution.modificationDate | sinceDate }}</p>\n </div>\n\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"selectRestitution(restitution)\"\n [attr.data-tooltip]=\"'@pry.restitution.consultRestitution' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.restitution.view' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </ng-template>\n <ng-template #modalActions>\n <div class=\"m-context-menu\">\n <ul\n *ngIf=\"selectedRestitution\"\n class=\"m-context-menu__list\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog restitution options\"\n >\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editRestitution(selectedRestitution)\"\n [disabled]=\"!selectedRestitution.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'edit' }\"\n >\n {{ '@pry.restitution.update' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"deleteRestitution(selectedRestitution.id)\"\n [disabled]=\"!selectedRestitution.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'restitution', action: 'delete' }\"\n >\n {{ '@pry.restitution.delete' | i18n }}\n </button>\n </li>\n </ul>\n </div>\n </ng-template>\n\n <ng-template [ngIf]=\"selectedMode === mode.CONSULT\">\n <div class=\"o-manifest-layout__toolbox\">\n <button type=\"button\" (click)=\"selectMode(mode.CATALOG)\" class=\"a-btn a-btn--primary\">\n {{ '@pry.restitution.backToCatalog' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content\">\n <pry-restitution\n [selectedRestitution]=\"selectedRestitution\"\n [edit]=\"false\"\n (restitutionCreated)=\"closeRestitution($event)\"\n class=\"restitution\"\n ></pry-restitution>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"selectedMode === mode.CREATION\">\n <div class=\"o-manifest-layout__toolbox\">\n <button type=\"button\" (click)=\"selectMode(mode.CATALOG)\" class=\"a-btn a-btn--primary\">\n {{ '@pry.restitution.backToCatalog' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content\">\n <pry-restitution\n [edit]=\"false\"\n (restitutionCreated)=\"closeRestitution($event)\"\n class=\"restitution\"\n ></pry-restitution>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"selectedMode === mode.EDITION\">\n <div class=\"o-manifest-layout__toolbox\">\n <button type=\"button\" (click)=\"selectMode(mode.CATALOG)\" class=\"a-btn a-btn--primary\">\n {{ '@pry.restitution.backToCatalog' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content\">\n <pry-restitution\n (restitutionCreated)=\"closeRestitution($event)\"\n [selectedRestitution]=\"selectedRestitution\"\n class=\"restitution\"\n ></pry-restitution>\n </div>\n </ng-template>\n</div>\n" }]
|
|
298
293
|
}], ctorParameters: () => [{ type: i1$1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }], propDecorators: { templateActions: [{
|
|
299
294
|
type: ViewChild,
|
|
300
295
|
args: ['modalActions', { read: TemplateRef }]
|
|
@@ -307,7 +302,6 @@ class PryRestitutionListItemComponent extends SubscriptionnerDirective {
|
|
|
307
302
|
this.toolboxManifestService = toolboxManifestService;
|
|
308
303
|
this.translate = true;
|
|
309
304
|
this.automaticGridMode = false;
|
|
310
|
-
this.PryVisibilityType = PryVisibilityType;
|
|
311
305
|
this.store.select(ConfigSelectors.catalog).subscribe((catalog) => (this.catalog = catalog));
|
|
312
306
|
this.automaticGridMode$ = this.store
|
|
313
307
|
.select(DashboardSelectors.gridLayout)
|
|
@@ -323,11 +317,11 @@ class PryRestitutionListItemComponent extends SubscriptionnerDirective {
|
|
|
323
317
|
this.store.dispatch(DashboardActions.addWidgetToPresentation({ widgetType: widget.type }));
|
|
324
318
|
}
|
|
325
319
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryRestitutionListItemComponent, deps: [{ token: i1$1.Store }, { token: i1.ToolboxManifestService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
326
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryRestitutionListItemComponent, selector: "pry-catalog-item", inputs: { widget: "widget", translate: "translate" }, usesInheritance: true, ngImport: i0, template: "<li\n class=\"o-catalog__list__item\"\n [class.is-point]=\"automaticGridMode$ | async\"\n [draggable]=\"!(automaticGridMode$ | async)\"\n role=\"listitem\"\n aria-grabbed=\"false\"\n aria-haspopup=\"true\"\n tabindex=\"-1\"\n [title]=\"widget.description ?? widget.label | i18n : { warn: false }\"\n (dragstart)=\"dragStart($event, widget.type)\"\n>\n <ng-container *ngIf=\"automaticGridMode$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"viewInDashboard(widget)\"\n [title]=\"'@pry.restitution.add_icon' | i18n\"\n >\n <pry-icon [width]=\"25\" [height]=\"25\" iconSvg=\"add_column\" class=\"o-catalog__list__icon\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.restitution.add_icon' | i18n }}</span>\n </button>\n </ng-container>\n <img\n [alt]=\"widget.label | i18n : { warn: false }\"\n [src]=\"widget.icon | getSecuredImage : [53, 53] | async\"\n [height]=\"53\"\n [width]=\"53\"\n />\n <p class=\"o-catalog__list__item__libelle\" *ngIf=\"widget.isCustom; else translate\">{{ widget.label }}</p>\n <ng-template #translate>\n <p class=\"o-catalog__list__item__libelle\">{{ widget.label | i18n : { warn: false } }}</p>\n </ng-template>\n <ng-container *ngIf=\"widget.
|
|
320
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryRestitutionListItemComponent, selector: "pry-catalog-item", inputs: { widget: "widget", translate: "translate" }, usesInheritance: true, ngImport: i0, template: "<li\n class=\"o-catalog__list__item\"\n [class.is-point]=\"automaticGridMode$ | async\"\n [draggable]=\"!(automaticGridMode$ | async)\"\n role=\"listitem\"\n aria-grabbed=\"false\"\n aria-haspopup=\"true\"\n tabindex=\"-1\"\n [title]=\"widget.description ?? widget.label | i18n : { warn: false }\"\n (dragstart)=\"dragStart($event, widget.type)\"\n>\n <ng-container *ngIf=\"automaticGridMode$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"viewInDashboard(widget)\"\n [title]=\"'@pry.restitution.add_icon' | i18n\"\n >\n <pry-icon [width]=\"25\" [height]=\"25\" iconSvg=\"add_column\" class=\"o-catalog__list__icon\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.restitution.add_icon' | i18n }}</span>\n </button>\n </ng-container>\n <img\n [alt]=\"widget.label | i18n : { warn: false }\"\n [src]=\"widget.icon | getSecuredImage : [53, 53] | async\"\n [height]=\"53\"\n [width]=\"53\"\n />\n <p class=\"o-catalog__list__item__libelle\" *ngIf=\"widget.isCustom; else translate\">{{ widget.label }}</p>\n <ng-template #translate>\n <p class=\"o-catalog__list__item__libelle\">{{ widget.label | i18n : { warn: false } }}</p>\n </ng-template>\n <ng-container *ngIf=\"widget.groups?.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip\"\n [attr.data-tooltip]=\"'@pry.restitution.lock' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n</li>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i1.I18nPipe, name: "i18n" }] }); }
|
|
327
321
|
}
|
|
328
322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryRestitutionListItemComponent, decorators: [{
|
|
329
323
|
type: Component,
|
|
330
|
-
args: [{ selector: 'pry-catalog-item', template: "<li\n class=\"o-catalog__list__item\"\n [class.is-point]=\"automaticGridMode$ | async\"\n [draggable]=\"!(automaticGridMode$ | async)\"\n role=\"listitem\"\n aria-grabbed=\"false\"\n aria-haspopup=\"true\"\n tabindex=\"-1\"\n [title]=\"widget.description ?? widget.label | i18n : { warn: false }\"\n (dragstart)=\"dragStart($event, widget.type)\"\n>\n <ng-container *ngIf=\"automaticGridMode$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"viewInDashboard(widget)\"\n [title]=\"'@pry.restitution.add_icon' | i18n\"\n >\n <pry-icon [width]=\"25\" [height]=\"25\" iconSvg=\"add_column\" class=\"o-catalog__list__icon\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.restitution.add_icon' | i18n }}</span>\n </button>\n </ng-container>\n <img\n [alt]=\"widget.label | i18n : { warn: false }\"\n [src]=\"widget.icon | getSecuredImage : [53, 53] | async\"\n [height]=\"53\"\n [width]=\"53\"\n />\n <p class=\"o-catalog__list__item__libelle\" *ngIf=\"widget.isCustom; else translate\">{{ widget.label }}</p>\n <ng-template #translate>\n <p class=\"o-catalog__list__item__libelle\">{{ widget.label | i18n : { warn: false } }}</p>\n </ng-template>\n <ng-container *ngIf=\"widget.
|
|
324
|
+
args: [{ selector: 'pry-catalog-item', template: "<li\n class=\"o-catalog__list__item\"\n [class.is-point]=\"automaticGridMode$ | async\"\n [draggable]=\"!(automaticGridMode$ | async)\"\n role=\"listitem\"\n aria-grabbed=\"false\"\n aria-haspopup=\"true\"\n tabindex=\"-1\"\n [title]=\"widget.description ?? widget.label | i18n : { warn: false }\"\n (dragstart)=\"dragStart($event, widget.type)\"\n>\n <ng-container *ngIf=\"automaticGridMode$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"viewInDashboard(widget)\"\n [title]=\"'@pry.restitution.add_icon' | i18n\"\n >\n <pry-icon [width]=\"25\" [height]=\"25\" iconSvg=\"add_column\" class=\"o-catalog__list__icon\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.restitution.add_icon' | i18n }}</span>\n </button>\n </ng-container>\n <img\n [alt]=\"widget.label | i18n : { warn: false }\"\n [src]=\"widget.icon | getSecuredImage : [53, 53] | async\"\n [height]=\"53\"\n [width]=\"53\"\n />\n <p class=\"o-catalog__list__item__libelle\" *ngIf=\"widget.isCustom; else translate\">{{ widget.label }}</p>\n <ng-template #translate>\n <p class=\"o-catalog__list__item__libelle\">{{ widget.label | i18n : { warn: false } }}</p>\n </ng-template>\n <ng-container *ngIf=\"widget.groups?.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip\"\n [attr.data-tooltip]=\"'@pry.restitution.lock' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n</li>\n" }]
|
|
331
325
|
}], ctorParameters: () => [{ type: i1$1.Store }, { type: i1.ToolboxManifestService }], propDecorators: { widget: [{
|
|
332
326
|
type: Input
|
|
333
327
|
}], translate: [{
|