@provoly/dashboard 1.4.23 → 1.4.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +1 -1
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/store/search/search.actions.mjs +1 -1
- package/esm2022/lib/core/store/search/search.effects.mjs +9 -4
- package/esm2022/lib/core/store/search/search.service.mjs +1 -1
- package/esm2022/lib/dashboard/components/dashboard.component.mjs +8 -26
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +1 -1
- package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +32 -23
- package/esm2022/lib/dashboard/filter/components/filter-group/filter-group.component.mjs +4 -6
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +8 -18
- package/esm2022/lib/dashboard/store/manifest-utils.class.mjs +17 -1
- package/esm2022/toolbox/components/select-grid-layout/select-grid-layout.component.mjs +1 -1
- package/esm2022/widgets/widget-map/interaction/tooltip-manager.class.mjs +3 -2
- package/fesm2022/provoly-dashboard-dataset.mjs +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +2 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +108 -109
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/model/manifest.interface.d.ts +7 -0
- package/lib/core/store/search/search.actions.d.ts +5 -4
- package/lib/core/store/search/search.effects.d.ts +2 -1
- package/lib/core/store/search/search.service.d.ts +3 -2
- package/lib/dashboard/components/dashboard.component.d.ts +1 -3
- package/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.d.ts +3 -9
- package/lib/dashboard/filter/components/filter-group/filter-group.component.d.ts +1 -2
- package/lib/dashboard/store/dashboard.actions.d.ts +6 -14
- package/lib/dashboard/store/dashboard.effects.d.ts +3 -4
- package/lib/dashboard/store/manifest-utils.class.d.ts +2 -1
- package/package.json +19 -19
- package/search/search-fulltext/store/search-fulltext.effects.d.ts +1 -1
- package/search/search-mono-class/store/search-mono-class.effects.d.ts +1 -1
- package/search/search-multi-class/store/search-multi-class.effects.d.ts +1 -1
|
@@ -3492,7 +3492,7 @@ const DashboardActions = {
|
|
|
3492
3492
|
removeFilter: createAction('[Dashboard] (bus) remove filter in presentation', props()),
|
|
3493
3493
|
removeFilters: createAction('[Dashboard] (bus) remove filters'),
|
|
3494
3494
|
updateFilterValue: createAction('[Dashboard] (bus) update filter value', props()),
|
|
3495
|
-
clearAllFilterValues: createAction('[Dashboard] (bus) clear all filter values'
|
|
3495
|
+
clearAllFilterValues: createAction('[Dashboard] (bus) clear all filter values'),
|
|
3496
3496
|
dispatchFilters: createAction('[Dashboard] (bus) apply filters to presentation datasources', props()),
|
|
3497
3497
|
resetWmsFeatures: createAction('[Widget map] Reset Wms layer features', props()),
|
|
3498
3498
|
getWmsFeatures: createAction('[Widget map] Get Wms layer features', props()),
|
|
@@ -5252,6 +5252,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
5252
5252
|
args: [{ selector: 'pry-widget-placeholder', template: "<p>{{ '@pry.widget.unrecognized' | i18n: { type: manifest ? manifest.type : 'placeholder' } }}</p>\n" }]
|
|
5253
5253
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ElementRef }] });
|
|
5254
5254
|
|
|
5255
|
+
const DEFAULT_GAP_PX = 15;
|
|
5256
|
+
const DEFAULT_COLUMNS_NUMBER = 12;
|
|
5257
|
+
const DEFAULT_ROWS_NUMBER = 12;
|
|
5258
|
+
const DEFAULT_ROW_HEIGHT_PX = 50;
|
|
5259
|
+
|
|
5260
|
+
class ManifestUtils {
|
|
5261
|
+
static getDatasourcesUsedByManifest(manifest) {
|
|
5262
|
+
const mapOfDatasources = manifest.windows
|
|
5263
|
+
.map((window) => (window.widgets ?? []).map((widget) => ({ datasetId: widget.datasource, excludeGeo: widget?.type !== 'map' })))
|
|
5264
|
+
.flat(3)
|
|
5265
|
+
.filter((dataset) => !!dataset.datasetId)
|
|
5266
|
+
.map((res) => Array.isArray(res.datasetId)
|
|
5267
|
+
? res.datasetId.map((r) => ({ datasetId: r, excludeGeo: res.excludeGeo }))
|
|
5268
|
+
: [res])
|
|
5269
|
+
.flat().reduce((p, c) => ({ ...p, [c.datasetId]: { ...p[c.datasetId], ...c } }), {});
|
|
5270
|
+
return Object.values(mapOfDatasources);
|
|
5271
|
+
}
|
|
5272
|
+
static cleanupManifest(manifest) {
|
|
5273
|
+
return {
|
|
5274
|
+
...manifest,
|
|
5275
|
+
windows: manifest.windows.map((window) => ManifestUtils.cleanupDashboardManifest(window))
|
|
5276
|
+
};
|
|
5277
|
+
}
|
|
5278
|
+
static cleanupDashboardManifest(window) {
|
|
5279
|
+
return {
|
|
5280
|
+
...window,
|
|
5281
|
+
grid: {
|
|
5282
|
+
columns: DEFAULT_COLUMNS_NUMBER,
|
|
5283
|
+
rows: DEFAULT_ROWS_NUMBER,
|
|
5284
|
+
layout: DashboardGridLayout.MANUAL,
|
|
5285
|
+
gap: DEFAULT_GAP_PX,
|
|
5286
|
+
...window.grid
|
|
5287
|
+
},
|
|
5288
|
+
widgets: window.widgets ?? []
|
|
5289
|
+
};
|
|
5290
|
+
}
|
|
5291
|
+
static mergeDatasourceRequests(datasourceRequests) {
|
|
5292
|
+
const uniqueDatasourceRequestIds = [...new Set((datasourceRequests ?? []).map((ds) => ds.datasetId))];
|
|
5293
|
+
// We keep the most inclusive request for multiple requests for the same dataset
|
|
5294
|
+
return uniqueDatasourceRequestIds.map((id) => ({
|
|
5295
|
+
datasetId: id,
|
|
5296
|
+
// If at least one request must include geo data, then keep request with geo data
|
|
5297
|
+
excludeGeo: !datasourceRequests.some((ds) => ds.datasetId === id && !ds.excludeGeo),
|
|
5298
|
+
// If at least one request must include source or destination items, then create request with everything needed
|
|
5299
|
+
linkedItems: [
|
|
5300
|
+
...new Set(datasourceRequests
|
|
5301
|
+
.filter((ds) => ds.datasetId === id)
|
|
5302
|
+
.map((ds) => ds.linkedItems ?? [])
|
|
5303
|
+
.flat())
|
|
5304
|
+
]
|
|
5305
|
+
}));
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5308
|
+
|
|
5255
5309
|
const WIDGET_DEFINITION = new InjectionToken('Widgets definition');
|
|
5256
5310
|
const NON_EXCLUDE_GEO_WIDGET_TYPES = {
|
|
5257
5311
|
values: ['map', 'tile']
|
|
@@ -5301,23 +5355,31 @@ class WidgetFactoryService {
|
|
|
5301
5355
|
return this.reference$.pipe(map((componentDefs) => !!componentDefs[type]));
|
|
5302
5356
|
}
|
|
5303
5357
|
datasourcesToAutoLoad(manifest) {
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
(
|
|
5313
|
-
|
|
5314
|
-
(widgetDefinition.autoLoadDatasource ===
|
|
5315
|
-
|
|
5358
|
+
return ManifestUtils.mergeDatasourceRequests(manifest.widgets
|
|
5359
|
+
.map((widgetManifest) => {
|
|
5360
|
+
const widgetDefinition = this.reference$.getValue()[widgetManifest.type];
|
|
5361
|
+
const datasourcesArray = Array.isArray(widgetManifest.datasource ?? [])
|
|
5362
|
+
? (widgetManifest.datasource ?? [])
|
|
5363
|
+
: [widgetManifest.datasource];
|
|
5364
|
+
return datasourcesArray
|
|
5365
|
+
.filter((datasource) => {
|
|
5366
|
+
const matching = this.datasources.find((ds) => ds.id === datasource);
|
|
5367
|
+
return (!!matching &&
|
|
5368
|
+
(widgetDefinition.autoLoadDatasource === undefined ||
|
|
5369
|
+
widgetDefinition.autoLoadDatasource === 'all' ||
|
|
5370
|
+
(widgetDefinition.autoLoadDatasource === 'geo' && DatasourceUtils.isGeo(matching)) ||
|
|
5371
|
+
(widgetDefinition.autoLoadDatasource === 'not-geo' && !DatasourceUtils.isGeo(matching))));
|
|
5372
|
+
})
|
|
5373
|
+
.map((datasetId) => {
|
|
5374
|
+
const matching = this.datasources.find((ds) => ds.id === datasetId);
|
|
5375
|
+
return {
|
|
5376
|
+
datasetId: datasetId,
|
|
5377
|
+
excludeGeo: this.calculateExcludeGeo(widgetManifest, matching),
|
|
5378
|
+
linkedItems: manifest.linkedItems
|
|
5379
|
+
};
|
|
5380
|
+
});
|
|
5316
5381
|
})
|
|
5317
|
-
.
|
|
5318
|
-
const matching = this.datasources.find((ds) => ds.id === datasetId);
|
|
5319
|
-
return { datasetId: datasetId, excludeGeo: this.calculateExcludeGeo(manifest, matching) };
|
|
5320
|
-
});
|
|
5382
|
+
.flat());
|
|
5321
5383
|
}
|
|
5322
5384
|
calculateExcludeGeo(manifest, matching) {
|
|
5323
5385
|
if (manifest.excludeGeo === undefined || manifest.excludeGeo === 'widget-type-based') {
|
|
@@ -5345,16 +5407,16 @@ class WidgetFactoryService {
|
|
|
5345
5407
|
const datasources = [];
|
|
5346
5408
|
const aggregates = [];
|
|
5347
5409
|
manifest.windows.forEach((windowManifest) => {
|
|
5410
|
+
this.datasourcesToAutoLoad(windowManifest).forEach((res) => {
|
|
5411
|
+
if (res.datasetId) {
|
|
5412
|
+
datasources.push(res);
|
|
5413
|
+
}
|
|
5414
|
+
});
|
|
5348
5415
|
(windowManifest.widgets ?? []).forEach((widgetManifest) => {
|
|
5349
|
-
this.datasourcesToAutoLoad(widgetManifest).forEach((res) => {
|
|
5350
|
-
if (res.datasetId) {
|
|
5351
|
-
datasources.push(res);
|
|
5352
|
-
}
|
|
5353
|
-
});
|
|
5354
5416
|
this.aggregatesToAutoLoad(widgetManifest).forEach((ds) => aggregates.push(ds));
|
|
5355
5417
|
});
|
|
5356
5418
|
});
|
|
5357
|
-
return { datasources, aggregates };
|
|
5419
|
+
return { datasources: ManifestUtils.mergeDatasourceRequests(datasources), aggregates };
|
|
5358
5420
|
}
|
|
5359
5421
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: WidgetFactoryService, deps: [{ token: i0.Injector }, { token: WIDGET_DEFINITION }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5360
5422
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: WidgetFactoryService, providedIn: 'root' }); }
|
|
@@ -5385,15 +5447,20 @@ class SearchEffects {
|
|
|
5385
5447
|
})), catchError((error) => [SearchActions.searchFailure({ error, id: props.id })])))))));
|
|
5386
5448
|
this.fetchMore$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchMoreItems), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.resultSets)), filter(([props, rank, rs]) => rank === 0 && !!rs[props.id].searchAfter), debounceTime(300), mergeMap(([props]) => {
|
|
5387
5449
|
const ds = this.widgetFactoryService.datasourcesToAutoLoad({
|
|
5388
|
-
|
|
5389
|
-
|
|
5450
|
+
widgets: [
|
|
5451
|
+
{
|
|
5452
|
+
type: props.widgetType,
|
|
5453
|
+
datasource: [props.id]
|
|
5454
|
+
}
|
|
5455
|
+
]
|
|
5390
5456
|
})[0];
|
|
5391
5457
|
if (!!ds) {
|
|
5392
5458
|
return of(SearchActions.getDatasourceItems({
|
|
5393
5459
|
id: ds.datasetId,
|
|
5394
5460
|
excludeGeo: ds.excludeGeo,
|
|
5395
5461
|
from: 'fetchMore',
|
|
5396
|
-
next: true
|
|
5462
|
+
next: true,
|
|
5463
|
+
linkedItems: ds.linkedItems
|
|
5397
5464
|
}));
|
|
5398
5465
|
}
|
|
5399
5466
|
else {
|
|
@@ -8837,11 +8904,6 @@ const WidgetPlacementUtils = {
|
|
|
8837
8904
|
}
|
|
8838
8905
|
};
|
|
8839
8906
|
|
|
8840
|
-
const DEFAULT_GAP_PX = 15;
|
|
8841
|
-
const DEFAULT_COLUMNS_NUMBER = 12;
|
|
8842
|
-
const DEFAULT_ROWS_NUMBER = 12;
|
|
8843
|
-
const DEFAULT_ROW_HEIGHT_PX = 50;
|
|
8844
|
-
|
|
8845
8907
|
function orderWidgetsAccordingToPlacement(a, b) {
|
|
8846
8908
|
return ((b.layout.weight ?? 0) * 1000000 -
|
|
8847
8909
|
(a.layout.weight ?? 0) * 1000000 +
|
|
@@ -9368,9 +9430,6 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9368
9430
|
set forceModeEdition(mode) {
|
|
9369
9431
|
this.forceModeEdition$.next(mode);
|
|
9370
9432
|
}
|
|
9371
|
-
set linkedItems(linkedItems) {
|
|
9372
|
-
this.linkedItems$.next(linkedItems);
|
|
9373
|
-
}
|
|
9374
9433
|
constructor(store, overlay, viewContainerRef, el) {
|
|
9375
9434
|
super();
|
|
9376
9435
|
this.store = store;
|
|
@@ -9413,7 +9472,6 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9413
9472
|
};
|
|
9414
9473
|
this.DashboardGridLayout = DashboardGridLayout;
|
|
9415
9474
|
this.layout = DashboardGridLayout.MANUAL;
|
|
9416
|
-
this.linkedItems$ = new BehaviorSubject(undefined);
|
|
9417
9475
|
this.loading$ = this.store.select(DashboardSelectors.loading);
|
|
9418
9476
|
this.dataFetching$ = this.store.select(SearchSelectors.searchLoading).pipe(delay(10));
|
|
9419
9477
|
this.modeEdition$ = combineLatest([
|
|
@@ -9452,21 +9510,13 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9452
9510
|
return wManifest;
|
|
9453
9511
|
}), distinctUntilChanged((p, c) => equal(p, c)));
|
|
9454
9512
|
this.nonFillerWidgets$ = this.windowManifest$.pipe(map((wManifest) => (wManifest.widgets ?? []).filter((w) => w.type !== 'filler').length));
|
|
9455
|
-
this.subscriptions.add(this.staticDashboard$.pipe(withLatestFrom(this.linkedItems$)).subscribe(([manifest, linkedItems]) => {
|
|
9456
|
-
if (!!manifest) {
|
|
9457
|
-
this.store.dispatch(DashboardActions.assertResultSets({
|
|
9458
|
-
staticManifest: manifest,
|
|
9459
|
-
linkedItems
|
|
9460
|
-
}));
|
|
9461
|
-
}
|
|
9462
|
-
}));
|
|
9463
9513
|
this.subscriptions.add(combineLatest([
|
|
9464
9514
|
this.windowManifest$,
|
|
9465
9515
|
this.store.select(DataSourceSelectors.getDataSources),
|
|
9466
|
-
this.
|
|
9467
|
-
]).subscribe(([manifest, datasets,
|
|
9516
|
+
this.staticDashboard$
|
|
9517
|
+
]).subscribe(([manifest, datasets, staticManifest]) => {
|
|
9468
9518
|
if (datasets.length > 0) {
|
|
9469
|
-
this.store.dispatch(DashboardActions.assertResultSets({
|
|
9519
|
+
this.store.dispatch(DashboardActions.assertResultSets({ staticManifest }));
|
|
9470
9520
|
}
|
|
9471
9521
|
}));
|
|
9472
9522
|
this.store.dispatch(FieldActions.load({}));
|
|
@@ -9822,9 +9872,7 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9822
9872
|
layout: this.currentlyModifiedManifest?.layout ?? {}
|
|
9823
9873
|
};
|
|
9824
9874
|
this.movingMouse($event, false);
|
|
9825
|
-
this.store.dispatch(DashboardActions.assertResultSets({
|
|
9826
|
-
linkedItems: this.linkedItems
|
|
9827
|
-
}));
|
|
9875
|
+
this.store.dispatch(DashboardActions.assertResultSets({}));
|
|
9828
9876
|
}
|
|
9829
9877
|
this.clearActions();
|
|
9830
9878
|
}
|
|
@@ -9861,9 +9909,7 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9861
9909
|
widgets: listWidgetManifests
|
|
9862
9910
|
}
|
|
9863
9911
|
}));
|
|
9864
|
-
this.store.dispatch(DashboardActions.assertResultSets({
|
|
9865
|
-
linkedItems: this.linkedItems
|
|
9866
|
-
}));
|
|
9912
|
+
this.store.dispatch(DashboardActions.assertResultSets({}));
|
|
9867
9913
|
$event.preventDefault();
|
|
9868
9914
|
$event.stopPropagation();
|
|
9869
9915
|
}
|
|
@@ -9924,7 +9970,7 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9924
9970
|
}));
|
|
9925
9971
|
}
|
|
9926
9972
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9927
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", forceModeEdition: "forceModeEdition", CloseOnDragOut: "CloseOnDragOut", displayOptions: "displayOptions", noBackground: "noBackground", breakpoint: "breakpoint"
|
|
9973
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", forceModeEdition: "forceModeEdition", CloseOnDragOut: "CloseOnDragOut", displayOptions: "displayOptions", noBackground: "noBackground", breakpoint: "breakpoint" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }, { propertyName: "instanciators", predicate: WidgetInstanciatorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-dashboard-edit\" [class.-edit]=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\">\n <button (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <p>{{ '@pry.grid.rows' | i18n }}</p>\n </div>\n <div class=\"o-dashboard-add -cols\">\n <p>{{ '@pry.grid.columns' | i18n }}</p>\n <button (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n </div>\n <div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n >\n @for (\n widgetManifest of (windowManifest$ | async)?.widgets || [];\n track trackWidgets(widgetIndex, widgetManifest);\n let widgetIndex = $index\n ) {\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n @if (modeEdition) {\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if (\n {\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n };\n as data\n ) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"(dashboardSize$ | async)?.width\"\n [style.height.px]=\"(dashboardSize$ | async)?.height\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n }\n }\n </div>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i8.PryPageLoaderComponent, selector: "pry-page-loader", inputs: ["image", "imageAltText"] }, { kind: "component", type: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: ContextMenuComponent, selector: "pry-context-menu" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
9928
9974
|
}
|
|
9929
9975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
9930
9976
|
type: Component,
|
|
@@ -9954,8 +10000,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
9954
10000
|
type: Output
|
|
9955
10001
|
}], rows: [{
|
|
9956
10002
|
type: Output
|
|
9957
|
-
}], linkedItems: [{
|
|
9958
|
-
type: Input
|
|
9959
10003
|
}] } });
|
|
9960
10004
|
|
|
9961
10005
|
var TooltipMode;
|
|
@@ -11437,7 +11481,7 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
11437
11481
|
this.openSub?.unsubscribe();
|
|
11438
11482
|
}
|
|
11439
11483
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryWidgetHeaderComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: ToolboxMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11440
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: { manifest: "manifest", openData$: "openData$", additionalOptions: "additionalOptions", headerOptions: "headerOptions", displayCount: "displayCount", datasourceIds: "datasourceIds", widgetIndex: "widgetIndex" }, outputs: { manifestModified: "manifestModified" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "toggle", first: true, predicate: ["toggle"], descendants: true, read: TemplateRef }, { propertyName: "overlayMenu", first: true, predicate: ["overlayMenu"], descendants: true, read: TemplateRef }, { propertyName: "overlayCatalog", first: true, predicate: ["overlayCatalog"], descendants: true, read: TemplateRef }, { propertyName: "overlaySpot", first: true, predicate: ["overlaySpot"], descendants: true, read: TemplateRef }, { propertyName: "togglePanel", first: true, predicate: ["togglePanel"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }, { propertyName: "validateCatalog", first: true, predicate: ["validateCatalog"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "crossCatalog", first: true, predicate: ["crossCatalog"], descendants: true }, { propertyName: "inputCatalog", first: true, predicate: ["inputCatalog"], descendants: true }, { propertyName: "menuList", first: true, predicate: ["menuList"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n @if ((manifest$ | async)?.title) {\n <h2 class=\"o-widget__header__content__title\">\n {{ (manifest$ | async)?.title }}\n </h2>\n } @else {\n @for (ds of usedDatasources$ | async; track ds) {\n <div class=\"o-widget__header__content__query\">\n @if (ds.id | translateId: { type: 'datasource', output: 'icon', noDefault: true } | async; as url) {\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n }\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n @if (displayCount && !isGeo(ds)) {\n <h3 class=\"o-widget__header__content__query__name\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n }\n </div>\n }\n @if (((usedDatasources$ | async) ?? []).length === 0) {\n <div class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n }\n }\n </div>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n }\n</div>\n\n<ng-template #overlayMenu>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n @if (options === true || options['datasourceSelection'] === true) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['parameters'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <ng-content></ng-content>\n </li>\n }\n @if (options === true || options!['window'] === true) {\n @for (targetIndex of targetIndexes$ | async; track targetIndex) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n: { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n }\n }\n @if (hasGrid && (options === true || options!['changeSpot'] === true)) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['maximize'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n }\n @if (options === true || options!['addToCatalog'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['delete'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n }\n @for (option of additionalOptions; track option) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n [manifest]=\"manifest$ | async\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\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 <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint", "linkedItems"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["showButtons", "showTitle", "manifest"], outputs: ["previousTab", "nextTab", "cancel", "validated", "itemsChanged"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
11484
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: { manifest: "manifest", openData$: "openData$", additionalOptions: "additionalOptions", headerOptions: "headerOptions", displayCount: "displayCount", datasourceIds: "datasourceIds", widgetIndex: "widgetIndex" }, outputs: { manifestModified: "manifestModified" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "toggle", first: true, predicate: ["toggle"], descendants: true, read: TemplateRef }, { propertyName: "overlayMenu", first: true, predicate: ["overlayMenu"], descendants: true, read: TemplateRef }, { propertyName: "overlayCatalog", first: true, predicate: ["overlayCatalog"], descendants: true, read: TemplateRef }, { propertyName: "overlaySpot", first: true, predicate: ["overlaySpot"], descendants: true, read: TemplateRef }, { propertyName: "togglePanel", first: true, predicate: ["togglePanel"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }, { propertyName: "validateCatalog", first: true, predicate: ["validateCatalog"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "crossCatalog", first: true, predicate: ["crossCatalog"], descendants: true }, { propertyName: "inputCatalog", first: true, predicate: ["inputCatalog"], descendants: true }, { propertyName: "menuList", first: true, predicate: ["menuList"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n @if ((manifest$ | async)?.title) {\n <h2 class=\"o-widget__header__content__title\">\n {{ (manifest$ | async)?.title }}\n </h2>\n } @else {\n @for (ds of usedDatasources$ | async; track ds) {\n <div class=\"o-widget__header__content__query\">\n @if (ds.id | translateId: { type: 'datasource', output: 'icon', noDefault: true } | async; as url) {\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n }\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n @if (displayCount && !isGeo(ds)) {\n <h3 class=\"o-widget__header__content__query__name\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n }\n </div>\n }\n @if (((usedDatasources$ | async) ?? []).length === 0) {\n <div class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n }\n }\n </div>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n }\n</div>\n\n<ng-template #overlayMenu>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n @if (options === true || options['datasourceSelection'] === true) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['parameters'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <ng-content></ng-content>\n </li>\n }\n @if (options === true || options!['window'] === true) {\n @for (targetIndex of targetIndexes$ | async; track targetIndex) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n: { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n }\n }\n @if (hasGrid && (options === true || options!['changeSpot'] === true)) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['maximize'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n }\n @if (options === true || options!['addToCatalog'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['delete'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n }\n @for (option of additionalOptions; track option) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n [manifest]=\"manifest$ | async\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\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 <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["showButtons", "showTitle", "manifest"], outputs: ["previousTab", "nextTab", "cancel", "validated", "itemsChanged"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
11441
11485
|
}
|
|
11442
11486
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryWidgetHeaderComponent, decorators: [{
|
|
11443
11487
|
type: Component,
|
|
@@ -11794,10 +11838,10 @@ class FilterGroupComponent {
|
|
|
11794
11838
|
}
|
|
11795
11839
|
filter() {
|
|
11796
11840
|
this.apply$.next();
|
|
11797
|
-
this.store.dispatch(DashboardActions.dispatchFilters({
|
|
11841
|
+
this.store.dispatch(DashboardActions.dispatchFilters({}));
|
|
11798
11842
|
}
|
|
11799
11843
|
clearFilters() {
|
|
11800
|
-
this.store.dispatch(DashboardActions.clearAllFilterValues(
|
|
11844
|
+
this.store.dispatch(DashboardActions.clearAllFilterValues());
|
|
11801
11845
|
}
|
|
11802
11846
|
openSelect() {
|
|
11803
11847
|
this.isSelectOpen =
|
|
@@ -11816,7 +11860,7 @@ class FilterGroupComponent {
|
|
|
11816
11860
|
}
|
|
11817
11861
|
}
|
|
11818
11862
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FilterGroupComponent, deps: [{ token: i1.Store }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11819
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FilterGroupComponent, selector: "pry-filter-group", inputs: { enterTriggerFilter: "enterTriggerFilter", clearTriggerFilter: "clearTriggerFilter"
|
|
11863
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FilterGroupComponent, selector: "pry-filter-group", inputs: { enterTriggerFilter: "enterTriggerFilter", clearTriggerFilter: "clearTriggerFilter" }, ngImport: i0, template: "<pry-filter-group-css></pry-filter-group-css>\n@if (globalManifest$ | async; as manifest) {\n @if (manifest.filters && manifest.filters.length > 0) {\n <div class=\"o-container__filters\">\n <div class=\"o-container__filter-container\" (click)=\"openSelect()\">\n @for (filterDescription of manifest.filters; track filterDescription.id) {\n @if (filterDescription.type !== 'invisible') {\n <pry-filter-instanciator\n [filter]=\"filterDescription\"\n [applyFilter$]=\"apply$\"\n (pressedEnter)=\"enterPressed()\"\n (cleared)=\"cleared()\"\n ></pry-filter-instanciator>\n }\n }\n </div>\n <div class=\"o-container__filter-actions\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"clearFilters()\">\n <pry-icon iconSvg=\"clear_filter\" [width]=\"30\" [height]=\"30\"></pry-icon>\n </button>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"filter()\">\n {{ '@pry.toolbox.apply' | i18n }}\n <pry-icon iconSvg=\"refresh_filter\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n </div>\n </div>\n }\n}\n", dependencies: [{ kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: FilterInstanciatorComponent, selector: "pry-filter-instanciator", inputs: ["filter", "applyFilter$"], outputs: ["pressedEnter", "cleared"] }, { kind: "component", type: PryFilterGroupCssComponent, selector: "pry-filter-group-css" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
11820
11864
|
}
|
|
11821
11865
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FilterGroupComponent, decorators: [{
|
|
11822
11866
|
type: Component,
|
|
@@ -11828,8 +11872,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
11828
11872
|
type: Input
|
|
11829
11873
|
}], clearTriggerFilter: [{
|
|
11830
11874
|
type: Input
|
|
11831
|
-
}], linkedItems: [{
|
|
11832
|
-
type: Input
|
|
11833
11875
|
}] } });
|
|
11834
11876
|
|
|
11835
11877
|
const BASE_CONFIG = new InjectionToken('base config');
|
|
@@ -11867,39 +11909,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
11867
11909
|
args: [BASE_CONFIG]
|
|
11868
11910
|
}] }] });
|
|
11869
11911
|
|
|
11870
|
-
class ManifestUtils {
|
|
11871
|
-
static getDatasourcesUsedByManifest(manifest) {
|
|
11872
|
-
const mapOfDatasources = manifest.windows
|
|
11873
|
-
.map((window) => (window.widgets ?? []).map((widget) => ({ datasetId: widget.datasource, excludeGeo: widget?.type !== 'map' })))
|
|
11874
|
-
.flat(3)
|
|
11875
|
-
.filter((dataset) => !!dataset.datasetId)
|
|
11876
|
-
.map((res) => Array.isArray(res.datasetId)
|
|
11877
|
-
? res.datasetId.map((r) => ({ datasetId: r, excludeGeo: res.excludeGeo }))
|
|
11878
|
-
: [res])
|
|
11879
|
-
.flat().reduce((p, c) => ({ ...p, [c.datasetId]: { ...p[c.datasetId], ...c } }), {});
|
|
11880
|
-
return Object.values(mapOfDatasources);
|
|
11881
|
-
}
|
|
11882
|
-
static cleanupManifest(manifest) {
|
|
11883
|
-
return {
|
|
11884
|
-
...manifest,
|
|
11885
|
-
windows: manifest.windows.map((window) => ManifestUtils.cleanupDashboardManifest(window))
|
|
11886
|
-
};
|
|
11887
|
-
}
|
|
11888
|
-
static cleanupDashboardManifest(window) {
|
|
11889
|
-
return {
|
|
11890
|
-
...window,
|
|
11891
|
-
grid: {
|
|
11892
|
-
columns: DEFAULT_COLUMNS_NUMBER,
|
|
11893
|
-
rows: DEFAULT_ROWS_NUMBER,
|
|
11894
|
-
layout: DashboardGridLayout.MANUAL,
|
|
11895
|
-
gap: DEFAULT_GAP_PX,
|
|
11896
|
-
...window.grid
|
|
11897
|
-
},
|
|
11898
|
-
widgets: window.widgets ?? []
|
|
11899
|
-
};
|
|
11900
|
-
}
|
|
11901
|
-
}
|
|
11902
|
-
|
|
11903
11912
|
class ManifestService {
|
|
11904
11913
|
constructor(httpClient, store, snackBar, translateService) {
|
|
11905
11914
|
this.httpClient = httpClient;
|
|
@@ -12240,29 +12249,19 @@ class DashboardEffects {
|
|
|
12240
12249
|
.map((widManifest) => this.widgetFactoryService.aggregatesToAutoLoad(widManifest))
|
|
12241
12250
|
.reduce((p, c) => [...p, ...c], []))
|
|
12242
12251
|
].map((ds) => DashboardActions.triggerAggregate({ id: ds }));
|
|
12243
|
-
const toItemsActions =
|
|
12244
|
-
.map((winManifest) => (winManifest
|
|
12245
|
-
.
|
|
12246
|
-
.map((widManifest) => this.widgetFactoryService.datasourcesToAutoLoad(widManifest))
|
|
12247
|
-
.flat()
|
|
12248
|
-
.reduce((p, c) => ({
|
|
12249
|
-
...p,
|
|
12250
|
-
[c.datasetId]: {
|
|
12251
|
-
...p[c.datasetId],
|
|
12252
|
-
...c,
|
|
12253
|
-
excludeGeo: p[c.datasetId]?.excludeGeo === false ? p[c.datasetId].excludeGeo : c.excludeGeo
|
|
12254
|
-
}
|
|
12255
|
-
}), {}))
|
|
12252
|
+
const toItemsActions = ManifestUtils.mergeDatasourceRequests(manifestToCheck.windows
|
|
12253
|
+
.map((winManifest) => this.widgetFactoryService.datasourcesToAutoLoad(winManifest))
|
|
12254
|
+
.flat())
|
|
12256
12255
|
.filter((resultSet) => !!resultSet.datasetId &&
|
|
12257
12256
|
resultSet.datasetId !== '' &&
|
|
12258
12257
|
(!resultSets[resultSet.datasetId] ||
|
|
12259
12258
|
resultSetsParams[resultSet.datasetId] !==
|
|
12260
|
-
this.searchService.getItemsSerializedParams(resultSet.datasetId, quickOrder, resultSet.excludeGeo,
|
|
12259
|
+
this.searchService.getItemsSerializedParams(resultSet.datasetId, quickOrder, resultSet.excludeGeo, resultSet.linkedItems)))
|
|
12261
12260
|
.map((resultSet) => SearchActions.getDatasourceItems({
|
|
12262
12261
|
id: resultSet.datasetId,
|
|
12263
12262
|
excludeGeo: resultSet.excludeGeo,
|
|
12264
12263
|
from: 'DashboardEffects.assertResultSets$-1',
|
|
12265
|
-
linkedItems:
|
|
12264
|
+
linkedItems: resultSet.linkedItems
|
|
12266
12265
|
}));
|
|
12267
12266
|
return [...toItemsActions, ...toAggregateActions];
|
|
12268
12267
|
})));
|