@provoly/dashboard 0.18.4 → 0.18.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/svgs/clear_filter.svg +7 -6
- package/assets/svgs/refresh_filter.svg +6 -7
- package/dataset/style/_o-pry-dataset-card.scss +0 -1
- package/dataset/style/_o-pry-dataset-detail.scss +4 -0
- package/dataset/style/_o-pry-dataset.scss +1 -1
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +3 -3
- package/esm2022/components/color-picker/color-picker.component.mjs +2 -2
- package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +3 -3
- package/esm2022/dataset/components/dataset.component.mjs +3 -3
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/filters/date/date-filter.component.mjs +8 -4
- package/esm2022/filters/list/list-filter.component.mjs +4 -3
- package/esm2022/filters/number/number-filter.component.mjs +3 -3
- package/esm2022/filters/text/text-filter.component.mjs +3 -3
- package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
- package/esm2022/lib/core/store/aggregation/backend-aggregation.service.mjs +5 -2
- package/esm2022/lib/core/store/data-source/datasource-utils.mjs +4 -2
- package/esm2022/lib/core/store/search/search.effects.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +10 -11
- package/esm2022/lib/dashboard/filter/base-filter.component.mjs +8 -2
- package/esm2022/lib/dashboard/filter/components/filter-instanciator/filter-instanciator.component.mjs +11 -2
- package/esm2022/lib/dashboard/item-utils.mjs +1 -60
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +3 -1
- package/esm2022/lib/dashboard/store/dashboard.contants.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +14 -2
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +12 -1
- package/esm2022/presentation/components/presentation.component.mjs +3 -3
- package/esm2022/presentation/components/title-presentation/title-presentation.component.mjs +3 -4
- package/esm2022/presentation/i18n/en.translations.mjs +2 -2
- package/esm2022/presentation/i18n/fr.translations.mjs +2 -2
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/toolbox/components/refresh-datasets/refresh-datasets.component.mjs +3 -3
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +45 -8
- package/esm2022/widgets/widget-aggregated-chart/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +39 -38
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +12 -12
- package/esm2022/widgets/widget-map/pipe/widget-map-geometry-fields-for.pipe.mjs +3 -3
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +262 -216
- package/esm2022/widgets/widget-table/component/widget-table.component.mjs +3 -3
- package/esm2022/widgets/widget-table/style/css.component.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-color-picker.mjs +1 -1
- package/fesm2022/provoly-dashboard-components-color-picker.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +6 -6
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-date.mjs +7 -3
- package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-list.mjs +3 -2
- package/fesm2022/provoly-dashboard-filters-list.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-number.mjs +2 -2
- package/fesm2022/provoly-dashboard-filters-number.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-text.mjs +2 -2
- package/fesm2022/provoly-dashboard-filters-text.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +9 -9
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +2 -2
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +2 -2
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +46 -9
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +377 -331
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +4 -4
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +88 -99
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/filters/date/date-filter.component.d.ts +1 -0
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +1 -0
- package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +1 -1
- package/lib/dashboard/filter/base-filter.component.d.ts +5 -1
- package/lib/dashboard/filter/components/filter-instanciator/filter-instanciator.component.d.ts +5 -2
- package/lib/dashboard/item-utils.d.ts +0 -8
- package/lib/dashboard/store/dashboard.actions.d.ts +2 -0
- package/lib/dashboard/store/dashboard.contants.d.ts +1 -1
- package/lib/dashboard/store/dashboard.effects.d.ts +1 -1
- package/package.json +7 -7
- package/presentation/style/_o-pry-new-presentation.scss +1 -1
- package/presentation/style/_o-pry-presentation.scss +7 -1
- package/styles/components/_a-btn.scss +14 -13
- package/styles/components/_a-color-picker.scss +1 -0
- package/styles/components/_a-table.scss +1 -1
- package/styles/components/_m-filter.scss +57 -2
- package/styles/components/_m-form-label-field.scss +6 -0
- package/styles/components/_o-about.scss +1 -1
- package/styles/components/_o-widget.scss +4 -2
- package/styles/layout/_o-workspace.scss +23 -1
- package/styles-theme/abstracts-theme/variables/_variables-typo.scss +10 -1
- package/styles-theme/components-theme/_m-filter.theme.scss +41 -2
- package/styles-theme/components-theme/_m-tooltip.theme.scss +2 -2
- package/styles-theme/components-theme/_o-pry-dataset.theme.scss +1 -1
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +1 -0
- package/widgets/widget-aggregated-chart/style/_o-widget-chart.scss +5 -0
- package/widgets/widget-map/utils/widget-map.utils.d.ts +23 -17
- package/widgets/widget-table/style/_o-widget-table.scss +15 -0
|
@@ -22,8 +22,6 @@ import { distinctUntilChanged, filter as filter$1, debounceTime as debounceTime$
|
|
|
22
22
|
import { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations';
|
|
23
23
|
import * as i5 from '@angular/cdk/a11y';
|
|
24
24
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
25
|
-
import { GeoJSON } from 'ol/format';
|
|
26
|
-
import { fromLonLat } from 'ol/proj';
|
|
27
25
|
import * as i1$4 from '@angular/cdk/accordion';
|
|
28
26
|
import { CdkAccordionModule } from '@angular/cdk/accordion';
|
|
29
27
|
import * as i3$1 from '@angular/forms';
|
|
@@ -282,10 +280,11 @@ const enTranslations$1 = {
|
|
|
282
280
|
launchIndication: 'Open this page in a',
|
|
283
281
|
chooseGrid: 'Change grid layout',
|
|
284
282
|
clear: 'Clear presentation',
|
|
285
|
-
refresh: 'Refresh',
|
|
283
|
+
refresh: 'Refresh data',
|
|
286
284
|
automateRefresh: 'Automate refresh',
|
|
287
285
|
options: 'Options',
|
|
288
286
|
close: 'Close',
|
|
287
|
+
filter: 'Filter',
|
|
289
288
|
heatmap: 'Heatmap',
|
|
290
289
|
bubblemap: 'Bubbles',
|
|
291
290
|
markermap: 'Markers',
|
|
@@ -630,10 +629,11 @@ const frTranslations$1 = {
|
|
|
630
629
|
launchIndication: 'Ouvrir cette page dans un',
|
|
631
630
|
chooseGrid: 'Changer la grille',
|
|
632
631
|
clear: "Vider l'affichage",
|
|
633
|
-
refresh: '
|
|
632
|
+
refresh: 'Rafraichir les données',
|
|
634
633
|
automateRefresh: "Automatiser l'actualisation",
|
|
635
634
|
options: 'Options',
|
|
636
635
|
close: 'Fermer',
|
|
636
|
+
filter: 'Filtrer',
|
|
637
637
|
heatmap: 'Fréquentation',
|
|
638
638
|
bubblemap: 'Bulles',
|
|
639
639
|
markermap: 'Marqueurs',
|
|
@@ -1367,6 +1367,8 @@ const DashboardActions = {
|
|
|
1367
1367
|
removeFilter: createAction('[Dashboard] (bus) remove filter in presentation', props()),
|
|
1368
1368
|
removeFilters: createAction('[Dashboard] (bus) remove filters'),
|
|
1369
1369
|
updateFilterValue: createAction('[Dashboard] (bus) update filter value', props()),
|
|
1370
|
+
clearAllFilterValues: createAction('[Dashboard] (bus) clear all filter values'),
|
|
1371
|
+
dispatchFilters: createAction('[Dashboard] (bus) apply filters to presentation datasources'),
|
|
1370
1372
|
resetWmsFeatures: createAction('[Widget map] Reset Wms layer features'),
|
|
1371
1373
|
getWmsFeatures: createAction('[Widget map] Get Wms layer features', props()),
|
|
1372
1374
|
addWmsFeatures: createAction('[Widget map] Set Wms layer features', props()),
|
|
@@ -2507,7 +2509,9 @@ class DatasourceUtils {
|
|
|
2507
2509
|
: NamedQueryTypes.FULL_TEXT;
|
|
2508
2510
|
}
|
|
2509
2511
|
static isGeo(ds) {
|
|
2510
|
-
return (ds
|
|
2512
|
+
return (!!ds &&
|
|
2513
|
+
!!ds.metadata &&
|
|
2514
|
+
ds.metadata?.find((m) => m.metadataDef.name === GeoMetadata.KEY) !== undefined &&
|
|
2511
2515
|
ds.metadata?.find((m) => m.metadataDef.name === GeoMetadata.NAMESPACE) !== undefined);
|
|
2512
2516
|
}
|
|
2513
2517
|
}
|
|
@@ -4351,93 +4355,8 @@ const ItemActions = {
|
|
|
4351
4355
|
createFailure: createAction('[Item] create failure', props())
|
|
4352
4356
|
};
|
|
4353
4357
|
|
|
4354
|
-
var FieldType;
|
|
4355
|
-
(function (FieldType) {
|
|
4356
|
-
FieldType["STRING"] = "string";
|
|
4357
|
-
FieldType["KEYWORD"] = "keyword";
|
|
4358
|
-
FieldType["INTEGER"] = "integer";
|
|
4359
|
-
FieldType["DECIMAL"] = "decimal";
|
|
4360
|
-
FieldType["INSTANT"] = "instant";
|
|
4361
|
-
FieldType["LONG"] = "long";
|
|
4362
|
-
FieldType["RAW"] = "raw";
|
|
4363
|
-
FieldType["POINT"] = "Point";
|
|
4364
|
-
FieldType["MULTIPOINT"] = "MultiPoint";
|
|
4365
|
-
FieldType["LINE"] = "LineString";
|
|
4366
|
-
FieldType["MULTILINE"] = "MultiLineString";
|
|
4367
|
-
FieldType["POLYGON"] = "Polygon";
|
|
4368
|
-
FieldType["MULTIPOLYGON"] = "MultiPolygon";
|
|
4369
|
-
FieldType["GEOMETRYCOLLECTION"] = "GeometryCollection";
|
|
4370
|
-
FieldType["OCLASS"] = "mod\u00E8le de donn\u00E9es";
|
|
4371
|
-
FieldType["DATASET"] = "test";
|
|
4372
|
-
})(FieldType || (FieldType = {}));
|
|
4373
|
-
const GeometricFieldTypes = [
|
|
4374
|
-
FieldType.POINT,
|
|
4375
|
-
FieldType.MULTIPOINT,
|
|
4376
|
-
FieldType.LINE,
|
|
4377
|
-
FieldType.MULTILINE,
|
|
4378
|
-
FieldType.POLYGON,
|
|
4379
|
-
FieldType.MULTIPOLYGON,
|
|
4380
|
-
FieldType.GEOMETRYCOLLECTION
|
|
4381
|
-
];
|
|
4382
|
-
|
|
4383
4358
|
const hiddenFieldText = '*********';
|
|
4384
4359
|
class ItemUtils {
|
|
4385
|
-
static readGeometry(item, type, attribute) {
|
|
4386
|
-
if (!attribute || !item.attributes[attribute.name]) {
|
|
4387
|
-
// @ts-ignore
|
|
4388
|
-
return null;
|
|
4389
|
-
}
|
|
4390
|
-
let value = item.attributes[attribute.name];
|
|
4391
|
-
if (value.type === 'MULTI') {
|
|
4392
|
-
value = value.values[0];
|
|
4393
|
-
}
|
|
4394
|
-
return new GeoJSON().readGeometry(this.projectGeometry(value.value));
|
|
4395
|
-
}
|
|
4396
|
-
static projectGeometry(geometry) {
|
|
4397
|
-
return {
|
|
4398
|
-
...geometry,
|
|
4399
|
-
coordinates: typeof geometry.coordinates[0] === 'number'
|
|
4400
|
-
? fromLonLat(geometry.coordinates)
|
|
4401
|
-
: geometry.coordinates.map((sub) => this.projectGeometry({ type: '', coordinates: sub }).coordinates)
|
|
4402
|
-
};
|
|
4403
|
-
}
|
|
4404
|
-
static readLocations(item, type) {
|
|
4405
|
-
const points = [];
|
|
4406
|
-
Object.entries(item.attributes).forEach(([key, value]) => {
|
|
4407
|
-
if (value.type === 'VALUE') {
|
|
4408
|
-
this.extractGeometries(value, points, type);
|
|
4409
|
-
}
|
|
4410
|
-
else {
|
|
4411
|
-
value.values.forEach((value) => {
|
|
4412
|
-
this.extractGeometries(value, points, type);
|
|
4413
|
-
});
|
|
4414
|
-
}
|
|
4415
|
-
});
|
|
4416
|
-
return points;
|
|
4417
|
-
}
|
|
4418
|
-
static extractGeometries(value, points, type) {
|
|
4419
|
-
const valueSimple = value.value;
|
|
4420
|
-
if (typeof valueSimple !== 'string' && typeof valueSimple !== 'number') {
|
|
4421
|
-
if (type === 'point' && valueSimple.type === FieldType.POINT) {
|
|
4422
|
-
points.push(valueSimple.coordinates);
|
|
4423
|
-
}
|
|
4424
|
-
if (type === 'point' && valueSimple.type === FieldType.MULTIPOINT) {
|
|
4425
|
-
points.push(...valueSimple.coordinates);
|
|
4426
|
-
}
|
|
4427
|
-
if (type === 'line' && valueSimple.type === FieldType.LINE) {
|
|
4428
|
-
points.push(valueSimple.coordinates);
|
|
4429
|
-
}
|
|
4430
|
-
if (type === 'line' && valueSimple.type === FieldType.MULTILINE) {
|
|
4431
|
-
points.push(...valueSimple.coordinates);
|
|
4432
|
-
}
|
|
4433
|
-
if (type === 'polygon' && valueSimple.type === FieldType.POLYGON) {
|
|
4434
|
-
points.push(valueSimple.coordinates);
|
|
4435
|
-
}
|
|
4436
|
-
if (type === 'polygon' && valueSimple.type === FieldType.MULTIPOLYGON) {
|
|
4437
|
-
points.push(...valueSimple.coordinates);
|
|
4438
|
-
}
|
|
4439
|
-
}
|
|
4440
|
-
}
|
|
4441
4360
|
static getAttributeValue(item, attribute) {
|
|
4442
4361
|
if (!attribute) {
|
|
4443
4362
|
return undefined;
|
|
@@ -4758,7 +4677,7 @@ class SearchEffects {
|
|
|
4758
4677
|
id: props.id,
|
|
4759
4678
|
params: this.searchService.getItemsSerializedParams(props.id, quickOrder)
|
|
4760
4679
|
})), catchError$1((error) => [SearchActions.searchFailure({ error, id: props.id })])))));
|
|
4761
|
-
this.updateAggregatesInWidget$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), filter((props) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), tap$1((props) =>
|
|
4680
|
+
this.updateAggregatesInWidget$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), filter((props) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), tap$1((props) => window.dispatchEvent(new CustomEvent('datasourceRefresh', { detail: props.id })))), { dispatch: false });
|
|
4762
4681
|
this.search$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.search), mergeMap((props) => this.searchService.search(props.payload).pipe(map((resultSet) => SearchActions.searchSuccess({ resultSet, id: props.id })), catchError$1((error) => [SearchActions.searchFailure({ error })])))));
|
|
4763
4682
|
this.searchSuccess$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.searchSuccess), map((action) => DashboardActions.updateResultSet({
|
|
4764
4683
|
id: action.id ?? DEFAULT_NAMED_QUERY_ID,
|
|
@@ -5055,6 +4974,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
5055
4974
|
}]
|
|
5056
4975
|
}], ctorParameters: function () { return [{ type: PryI18nService }]; } });
|
|
5057
4976
|
|
|
4977
|
+
var FieldType;
|
|
4978
|
+
(function (FieldType) {
|
|
4979
|
+
FieldType["STRING"] = "string";
|
|
4980
|
+
FieldType["KEYWORD"] = "keyword";
|
|
4981
|
+
FieldType["INTEGER"] = "integer";
|
|
4982
|
+
FieldType["DECIMAL"] = "decimal";
|
|
4983
|
+
FieldType["INSTANT"] = "instant";
|
|
4984
|
+
FieldType["LONG"] = "long";
|
|
4985
|
+
FieldType["RAW"] = "raw";
|
|
4986
|
+
FieldType["POINT"] = "Point";
|
|
4987
|
+
FieldType["MULTIPOINT"] = "MultiPoint";
|
|
4988
|
+
FieldType["LINE"] = "LineString";
|
|
4989
|
+
FieldType["MULTILINE"] = "MultiLineString";
|
|
4990
|
+
FieldType["POLYGON"] = "Polygon";
|
|
4991
|
+
FieldType["MULTIPOLYGON"] = "MultiPolygon";
|
|
4992
|
+
FieldType["GEOMETRYCOLLECTION"] = "GeometryCollection";
|
|
4993
|
+
FieldType["OCLASS"] = "mod\u00E8le de donn\u00E9es";
|
|
4994
|
+
FieldType["DATASET"] = "test";
|
|
4995
|
+
})(FieldType || (FieldType = {}));
|
|
4996
|
+
const GeometricFieldTypes = [
|
|
4997
|
+
FieldType.POINT,
|
|
4998
|
+
FieldType.MULTIPOINT,
|
|
4999
|
+
FieldType.LINE,
|
|
5000
|
+
FieldType.MULTILINE,
|
|
5001
|
+
FieldType.POLYGON,
|
|
5002
|
+
FieldType.MULTIPOLYGON,
|
|
5003
|
+
FieldType.GEOMETRYCOLLECTION
|
|
5004
|
+
];
|
|
5005
|
+
|
|
5058
5006
|
const feature$2 = createFeatureSelector(searchFeatureKey);
|
|
5059
5007
|
const searchLoading = createSelector(feature$2, (state) => state.searchLoading);
|
|
5060
5008
|
const SearchSelectors = {
|
|
@@ -5227,10 +5175,13 @@ class PryBackendAggregationService extends PryAggregationService {
|
|
|
5227
5175
|
if (!!options.ordinate.attribute) {
|
|
5228
5176
|
params = params.set('valueField', options.ordinate.attribute);
|
|
5229
5177
|
}
|
|
5178
|
+
if (operation === Operation.DISTINCT) {
|
|
5179
|
+
params = params.set('valueField', options.abscissa.attribute);
|
|
5180
|
+
}
|
|
5230
5181
|
if (options.groupBy) {
|
|
5231
5182
|
params = params.set('groupBy', options.groupBy.attribute);
|
|
5232
5183
|
}
|
|
5233
|
-
if (options.graph.sort) {
|
|
5184
|
+
if (options.graph && options.graph.sort) {
|
|
5234
5185
|
params = params.set('sort', `${options.graph.sort.direction},${options.graph.sort.attribute === options.abscissa.attribute ? 'KEY' : 'VALUE'}`);
|
|
5235
5186
|
}
|
|
5236
5187
|
params = this.searchService.getItemsFilter(targetDatasource, params);
|
|
@@ -7022,7 +6973,7 @@ function getDisplayOptions(mode) {
|
|
|
7022
6973
|
|
|
7023
6974
|
const MIME_TYPE_RESULTSET = 'application/resultset';
|
|
7024
6975
|
|
|
7025
|
-
const DEFAULT_GAP_PX =
|
|
6976
|
+
const DEFAULT_GAP_PX = 15;
|
|
7026
6977
|
const DEFAULT_COLUMNS_NUMBER = 12;
|
|
7027
6978
|
const DEFAULT_ROWS_NUMBER = 12;
|
|
7028
6979
|
const DEFAULT_ROW_HEIGHT_PX = 50;
|
|
@@ -9464,7 +9415,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
9464
9415
|
}]
|
|
9465
9416
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: PryI18nService }]; } });
|
|
9466
9417
|
|
|
9467
|
-
const WIDGET_HEADER_HEIGHT =
|
|
9418
|
+
const WIDGET_HEADER_HEIGHT = 30;
|
|
9468
9419
|
class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
9469
9420
|
set manifest(manifest) {
|
|
9470
9421
|
this.manifest$.next(manifest);
|
|
@@ -9828,11 +9779,11 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
9828
9779
|
this.openSub?.unsubscribe();
|
|
9829
9780
|
}
|
|
9830
9781
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryWidgetHeaderComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: ToolboxMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9831
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", 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 <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <pry-nq-color-selector [disabled]=\"true\" [datasource]=\"ds\"></pry-nq-color-selector>\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"!(lockedView$ | async) && displaySettings(headerOptions)\">\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</div>\n\n<ng-template #overlayMenu>\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 <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && displayOption(headerOptions, 'datasourceSelection')\"\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 a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.readSearch' | i18n\"\n data-tooltip-position=\"bottom\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'parameters')\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"displayOption(headerOptions, 'window')\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\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 </ng-container>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"hasGrid && displayOption(headerOptions, 'changeSpot')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n (click)=\"toggleChangeSpot()\"\n class=\"a-btn a-tooltip\"\n tabindex=\"-1\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.changeSpot' | i18n\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'maximize')\">\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'addToCatalog')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleCatalog()\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.catalogWidget' | i18n\"\n >\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'delete')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.deleteWidget' | i18n\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\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 </ul>\n </div>\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 (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (datasourcesChanged)=\"datasourcesChanged($event)\"\n [datasourceIds]=\"(selectedDataSourceIds$ | async) ?? []\"\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\">\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 <ng-container *ngFor=\"let place of places; let i = index\">\n <ng-container *ngIf=\"currentPlacementIndex !== i\">\n <button type=\"button\" class=\"a-btn\" (click)=\"moveToPlace(place)\">\n <span>{{ '@pry.widget.tooltip.spotName' | i18n : { place: i + 1 } }}</span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: PryNqColorSelectorComponent, selector: "pry-nq-color-selector", inputs: ["disabled", "datasource"], outputs: ["colorChanged"] }, { 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: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["manifest", "datasourceIds"], outputs: ["cancel", "validated", "previousTab", "nextTab", "datasourcesChanged"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
9782
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", 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 <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"!(lockedView$ | async) && displaySettings(headerOptions)\">\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</div>\n\n<ng-template #overlayMenu>\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 <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && displayOption(headerOptions, 'datasourceSelection')\"\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 a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.readSearch' | i18n\"\n data-tooltip-position=\"bottom\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'parameters')\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"displayOption(headerOptions, 'window')\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\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 </ng-container>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"hasGrid && displayOption(headerOptions, 'changeSpot')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n (click)=\"toggleChangeSpot()\"\n class=\"a-btn a-tooltip\"\n tabindex=\"-1\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.changeSpot' | i18n\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'maximize')\">\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'addToCatalog')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleCatalog()\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.catalogWidget' | i18n\"\n >\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'delete')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.deleteWidget' | i18n\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\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 </ul>\n </div>\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 (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (datasourcesChanged)=\"datasourcesChanged($event)\"\n [datasourceIds]=\"(selectedDataSourceIds$ | async) ?? []\"\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\">\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 <ng-container *ngFor=\"let place of places; let i = index\">\n <ng-container *ngIf=\"currentPlacementIndex !== i\">\n <button type=\"button\" class=\"a-btn\" (click)=\"moveToPlace(place)\">\n <span>{{ '@pry.widget.tooltip.spotName' | i18n : { place: i + 1 } }}</span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "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: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["manifest", "datasourceIds"], outputs: ["cancel", "validated", "previousTab", "nextTab", "datasourcesChanged"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
9832
9783
|
}
|
|
9833
9784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryWidgetHeaderComponent, decorators: [{
|
|
9834
9785
|
type: Component,
|
|
9835
|
-
args: [{ selector: 'pry-widget-header', template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <pry-nq-color-selector [disabled]=\"true\" [datasource]=\"ds\"></pry-nq-color-selector>\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"!(lockedView$ | async) && displaySettings(headerOptions)\">\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</div>\n\n<ng-template #overlayMenu>\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 <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && displayOption(headerOptions, 'datasourceSelection')\"\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 a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.readSearch' | i18n\"\n data-tooltip-position=\"bottom\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'parameters')\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"displayOption(headerOptions, 'window')\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\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 </ng-container>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"hasGrid && displayOption(headerOptions, 'changeSpot')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n (click)=\"toggleChangeSpot()\"\n class=\"a-btn a-tooltip\"\n tabindex=\"-1\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.changeSpot' | i18n\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'maximize')\">\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'addToCatalog')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleCatalog()\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.catalogWidget' | i18n\"\n >\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'delete')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.deleteWidget' | i18n\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\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 </ul>\n </div>\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 (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (datasourcesChanged)=\"datasourcesChanged($event)\"\n [datasourceIds]=\"(selectedDataSourceIds$ | async) ?? []\"\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\">\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 <ng-container *ngFor=\"let place of places; let i = index\">\n <ng-container *ngIf=\"currentPlacementIndex !== i\">\n <button type=\"button\" class=\"a-btn\" (click)=\"moveToPlace(place)\">\n <span>{{ '@pry.widget.tooltip.spotName' | i18n : { place: i + 1 } }}</span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
9786
|
+
args: [{ selector: 'pry-widget-header', template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"!(lockedView$ | async) && displaySettings(headerOptions)\">\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</div>\n\n<ng-template #overlayMenu>\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 <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && displayOption(headerOptions, 'datasourceSelection')\"\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 a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.readSearch' | i18n\"\n data-tooltip-position=\"bottom\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'parameters')\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"displayOption(headerOptions, 'window')\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\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 </ng-container>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"hasGrid && displayOption(headerOptions, 'changeSpot')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n (click)=\"toggleChangeSpot()\"\n class=\"a-btn a-tooltip\"\n tabindex=\"-1\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.changeSpot' | i18n\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'maximize')\">\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'addToCatalog')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleCatalog()\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.catalogWidget' | i18n\"\n >\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"displayOption(headerOptions, 'delete')\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.tooltip.deleteWidget' | i18n\"\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 <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\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 </ul>\n </div>\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 (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (datasourcesChanged)=\"datasourcesChanged($event)\"\n [datasourceIds]=\"(selectedDataSourceIds$ | async) ?? []\"\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\">\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 <ng-container *ngFor=\"let place of places; let i = index\">\n <ng-container *ngIf=\"currentPlacementIndex !== i\">\n <button type=\"button\" class=\"a-btn\" (click)=\"moveToPlace(place)\">\n <span>{{ '@pry.widget.tooltip.spotName' | i18n : { place: i + 1 } }}</span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
9836
9787
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: ToolboxMenuService }]; }, propDecorators: { template: [{
|
|
9837
9788
|
type: ViewChild,
|
|
9838
9789
|
args: ['template', { read: TemplateRef }]
|
|
@@ -10004,13 +9955,19 @@ class BaseFilterComponent extends SubscriptionnerDirective {
|
|
|
10004
9955
|
this.store = store;
|
|
10005
9956
|
this.type = 'base';
|
|
10006
9957
|
}
|
|
9958
|
+
ngOnInit() {
|
|
9959
|
+
this._value = this.filter?.value;
|
|
9960
|
+
}
|
|
10007
9961
|
updateFilter(value) {
|
|
9962
|
+
this._value = value;
|
|
9963
|
+
}
|
|
9964
|
+
validateFilters() {
|
|
10008
9965
|
if (this.filter) {
|
|
10009
9966
|
this.filter.attributes.forEach((attribute) => {
|
|
10010
9967
|
this.store.dispatch(DashboardActions.updateFilterValue({
|
|
10011
9968
|
datasourceId: attribute.datasource,
|
|
10012
9969
|
id: this.filter?.id ?? '',
|
|
10013
|
-
value
|
|
9970
|
+
value: this._value
|
|
10014
9971
|
}));
|
|
10015
9972
|
});
|
|
10016
9973
|
}
|
|
@@ -10091,6 +10048,12 @@ class FilterInstanciatorComponent extends SubscriptionnerDirective {
|
|
|
10091
10048
|
set filter(filter) {
|
|
10092
10049
|
this.filter$.next(filter);
|
|
10093
10050
|
}
|
|
10051
|
+
set applyFilter$(applyFilter$) {
|
|
10052
|
+
this.applySub?.unsubscribe();
|
|
10053
|
+
this.applySub = applyFilter$.subscribe(() => {
|
|
10054
|
+
this.currentInstance?.validateFilters();
|
|
10055
|
+
});
|
|
10056
|
+
}
|
|
10094
10057
|
constructor(store, injector, filterFactoryService, changeDetector) {
|
|
10095
10058
|
super();
|
|
10096
10059
|
this.store = store;
|
|
@@ -10104,6 +10067,7 @@ class FilterInstanciatorComponent extends SubscriptionnerDirective {
|
|
|
10104
10067
|
if (filter) {
|
|
10105
10068
|
const component$ = this.filterFactoryService.generateFilter(filter.type, this.injector, this.filterContainerRef);
|
|
10106
10069
|
component$.subscribe((component) => {
|
|
10070
|
+
this.currentInstance = component.instance;
|
|
10107
10071
|
component.instance.filter = filter;
|
|
10108
10072
|
this.changeDetector.detectChanges();
|
|
10109
10073
|
});
|
|
@@ -10111,7 +10075,7 @@ class FilterInstanciatorComponent extends SubscriptionnerDirective {
|
|
|
10111
10075
|
}));
|
|
10112
10076
|
}
|
|
10113
10077
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: FilterInstanciatorComponent, deps: [{ token: i1.Store }, { token: i0.Injector }, { token: FilterFactoryService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10114
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: FilterInstanciatorComponent, selector: "pry-filter-instanciator", inputs: { filter: "filter" }, viewQueries: [{ propertyName: "filterContainerRef", first: true, predicate: ["filters"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<ng-template #filters></ng-template>\n" }); }
|
|
10078
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: FilterInstanciatorComponent, selector: "pry-filter-instanciator", inputs: { filter: "filter", applyFilter$: "applyFilter$" }, viewQueries: [{ propertyName: "filterContainerRef", first: true, predicate: ["filters"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<ng-template #filters></ng-template>\n" }); }
|
|
10115
10079
|
}
|
|
10116
10080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: FilterInstanciatorComponent, decorators: [{
|
|
10117
10081
|
type: Component,
|
|
@@ -10121,6 +10085,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
10121
10085
|
}], filterContainerRef: [{
|
|
10122
10086
|
type: ViewChild,
|
|
10123
10087
|
args: ['filters', { read: ViewContainerRef }]
|
|
10088
|
+
}], applyFilter$: [{
|
|
10089
|
+
type: Input
|
|
10124
10090
|
}] } });
|
|
10125
10091
|
|
|
10126
10092
|
class ManifestService {
|
|
@@ -10687,7 +10653,19 @@ class DashboardEffects {
|
|
|
10687
10653
|
this.relaunchAfterOrder$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.quickOrder), map$1((action) => SearchActions.getDatasourceItems({ id: action.datasourceId }))));
|
|
10688
10654
|
this.propagateGridLayout$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.windowManifest)), map$1(([action, rank, windowManifest]) => DashboardActions.propagateGridLayout({ manifest: windowManifest, rank }))));
|
|
10689
10655
|
this.toggleEditionModeIfNotManual$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), filter$1((action) => action.layout !== DashboardGridLayout.MANUAL), map$1(() => DashboardActions.toggleEditionMode({ force: false }))));
|
|
10690
|
-
this.
|
|
10656
|
+
this.dispatchFilters$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.dispatchFilters, DashboardActions.clearAllFilterValues), withLatestFrom(this.store.select(DashboardSelectors.filters), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.resultSetsParams), this.store.select(DashboardSelectors.quickOrder)), mergeMap$1(([action, filters, resultSets, resultSetsParams, quickOrder]) => {
|
|
10657
|
+
return [
|
|
10658
|
+
...new Set(filters
|
|
10659
|
+
.map((f) => f.attributes)
|
|
10660
|
+
.flat()
|
|
10661
|
+
.map((attribute) => attribute.datasource))
|
|
10662
|
+
]
|
|
10663
|
+
.filter((resultSet) => !!resultSet &&
|
|
10664
|
+
resultSet !== '' &&
|
|
10665
|
+
(!resultSets[resultSet] ||
|
|
10666
|
+
resultSetsParams[resultSet] !== this.searchService.getItemsSerializedParams(resultSet, quickOrder)))
|
|
10667
|
+
.map((ds) => SearchActions.getDatasourceItems({ id: ds }));
|
|
10668
|
+
})));
|
|
10691
10669
|
this.getCapability$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getCapability), debounceTime$1(100), withLatestFrom(this.store.select(DashboardSelectors.capabilities)), filter$1(([action, capabilities]) => (!!capabilities && !!action.url && !capabilities[action.url]) || !!action.force), mergeMap$1(([action, _]) => this.wmsService.getCapabilities(action.url).pipe(map$1((capability) => DashboardActions.updateCapability({ url: action.url, capability })), startWith(DashboardActions.updateCapability({ url: action.url, capability: null }))))));
|
|
10692
10670
|
this.getWmsFeatures = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getWmsFeatures), mergeMap$1((action) => combineLatest([of(action), this.wmsService.getWmsFeatures(action.url)])), map$1(([action, json]) => {
|
|
10693
10671
|
return DashboardActions.addWmsFeatures({
|
|
@@ -11317,6 +11295,17 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
|
|
|
11317
11295
|
}
|
|
11318
11296
|
}
|
|
11319
11297
|
};
|
|
11298
|
+
}), on(DashboardActions.clearAllFilterValues, (state, action) => {
|
|
11299
|
+
return {
|
|
11300
|
+
...state,
|
|
11301
|
+
manifests: {
|
|
11302
|
+
...state.manifests,
|
|
11303
|
+
manifest: {
|
|
11304
|
+
...state.manifests.manifest,
|
|
11305
|
+
filters: state.manifests.manifest.filters?.map((filter) => ({ ...filter, value: undefined }))
|
|
11306
|
+
}
|
|
11307
|
+
}
|
|
11308
|
+
};
|
|
11320
11309
|
}), on(DashboardActions.getWmsFeatures, DashboardActions.resetWmsFeatures, (state, action) => ({
|
|
11321
11310
|
...state,
|
|
11322
11311
|
wmsFeatures: []
|