@provoly/dashboard 0.18.5 → 0.18.7
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/dataset/style/_o-pry-dataset-card.scss +0 -1
- package/dataset/style/_o-pry-dataset-detail.scss +4 -0
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +3 -3
- 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 +2 -1
- package/esm2022/lib/core/i18n/fr.translations.mjs +2 -1
- package/esm2022/lib/core/store/search/search.effects.mjs +2 -2
- package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +12 -1
- package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +3 -2
- package/esm2022/lib/dashboard/filter/base-filter.component.mjs +4 -1
- package/esm2022/lib/dashboard/item-utils.mjs +1 -60
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +3 -4
- package/esm2022/presentation/components/presentation.component.mjs +1 -3
- 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-template/component/widget-template.component.mjs +13 -4
- package/esm2022/widgets/widget-template/i18n/en.translations.mjs +11 -0
- package/esm2022/widgets/widget-template/i18n/fr.translations.mjs +11 -0
- package/esm2022/widgets/widget-template/widget-template.module.mjs +19 -7
- package/fesm2022/provoly-dashboard-admin.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.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 +0 -2
- package/fesm2022/provoly-dashboard-presentation.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-template.mjs +48 -8
- package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +49 -91
- 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/filter/base-filter.component.d.ts +4 -2
- package/lib/dashboard/item-utils.d.ts +0 -8
- package/lib/dashboard/store/dashboard.effects.d.ts +0 -3
- package/package.json +1 -1
- package/styles/components/_a-form-field.scss +0 -1
- package/styles/components/_a-table.scss +1 -1
- package/styles/components/_m-filter.scss +23 -23
- package/styles/components/_m-form-label-field.scss +6 -0
- package/styles-theme/components-theme/_m-filter.theme.scss +19 -4
- package/widgets/widget-map/utils/widget-map.utils.d.ts +23 -17
- package/widgets/widget-template/component/widget-template.component.d.ts +2 -0
- package/widgets/widget-template/i18n/en.translations.d.ts +10 -0
- package/widgets/widget-template/i18n/fr.translations.d.ts +10 -0
- package/widgets/widget-template/widget-template.module.d.ts +4 -2
|
@@ -4,7 +4,8 @@ import { CommonModule } from '@angular/common';
|
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { Component, ViewEncapsulation, NgModule } from '@angular/core';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import
|
|
7
|
+
import * as i4 from '@provoly/dashboard';
|
|
8
|
+
import { DataWidgetComponent, BaseWidgetModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryI18nModule } from '@provoly/dashboard';
|
|
8
9
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
9
10
|
import { combineLatestWith } from 'rxjs';
|
|
10
11
|
import { map, filter } from 'rxjs/operators';
|
|
@@ -89,19 +90,55 @@ class WidgetTemplateComponent extends DataWidgetComponent {
|
|
|
89
90
|
const scoped = css.replace(/([},] ?)/g, `$1${scope} `).replace(new RegExp(scope + ' $'), '');
|
|
90
91
|
return scope + ' ' + scoped;
|
|
91
92
|
}
|
|
93
|
+
changeHtml($event) {
|
|
94
|
+
// @ts-ignore
|
|
95
|
+
this.optionsCopy.html = $event.currentTarget.value;
|
|
96
|
+
}
|
|
97
|
+
changeCss($event) {
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
this.optionsCopy.html = $event.currentTarget.value;
|
|
100
|
+
}
|
|
92
101
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetTemplateComponent, deps: [{ token: i1.Store }, { token: i0.ElementRef }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
93
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: WidgetTemplateComponent, selector: "pry-widget-table", usesInheritance: true, ngImport: i0, template: "<pry-widget-template-css></pry-widget-template-css>\n<div *ngIf=\"css$ | async as css\" [innerHtml]=\"css\"></div>\n<div *ngIf=\"template$ | async as template\" [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryWidgetTemplateCssComponent, selector: "pry-widget-template-css" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: WidgetTemplateComponent, selector: "pry-widget-table", usesInheritance: true, ngImport: i0, template: "<pry-widget-template-css></pry-widget-template-css>\n<pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n>\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"html_src\">{{ '@pry.widget.template.html' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"html_src\"\n [value]=\"optionsCopy.html\"\n (input)=\"changeHtml($event)\"\n ></textarea>\n </div>\n\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"css_src\">{{ '@pry.widget.template.css' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"css_src\"\n [value]=\"optionsCopy.css\"\n (input)=\"changeCss($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n</pry-widget-header>\n<div *ngIf=\"css$ | async as css\" [innerHtml]=\"css\"></div>\n<div *ngIf=\"template$ | async as template\" [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i4.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: PryWidgetTemplateCssComponent, selector: "pry-widget-template-css" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
94
103
|
}
|
|
95
104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetTemplateComponent, decorators: [{
|
|
96
105
|
type: Component,
|
|
97
|
-
args: [{ selector: 'pry-widget-table', template: "<pry-widget-template-css></pry-widget-template-css>\n<div *ngIf=\"css$ | async as css\" [innerHtml]=\"css\"></div>\n<div *ngIf=\"template$ | async as template\" [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n" }]
|
|
106
|
+
args: [{ selector: 'pry-widget-table', template: "<pry-widget-template-css></pry-widget-template-css>\n<pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n>\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"html_src\">{{ '@pry.widget.template.html' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"html_src\"\n [value]=\"optionsCopy.html\"\n (input)=\"changeHtml($event)\"\n ></textarea>\n </div>\n\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"css_src\">{{ '@pry.widget.template.css' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"css_src\"\n [value]=\"optionsCopy.css\"\n (input)=\"changeCss($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n</pry-widget-header>\n<div *ngIf=\"css$ | async as css\" [innerHtml]=\"css\"></div>\n<div *ngIf=\"template$ | async as template\" [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n" }]
|
|
98
107
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i0.ElementRef }, { type: i2.DomSanitizer }]; } });
|
|
99
108
|
|
|
109
|
+
const enTranslations = {
|
|
110
|
+
'@pry': {
|
|
111
|
+
widget: {
|
|
112
|
+
template: {
|
|
113
|
+
html: 'Html',
|
|
114
|
+
css: 'Css'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const frTranslations = {
|
|
121
|
+
'@pry': {
|
|
122
|
+
widget: {
|
|
123
|
+
template: {
|
|
124
|
+
html: 'Html',
|
|
125
|
+
css: 'Css'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
100
131
|
class WidgetTemplateModule extends BaseWidgetModule {
|
|
132
|
+
constructor(pryTranslateService) {
|
|
133
|
+
super();
|
|
134
|
+
this.pryTranslateService = pryTranslateService;
|
|
135
|
+
this.pryTranslateService.addLangObject('fr', 'widget-template', frTranslations);
|
|
136
|
+
this.pryTranslateService.addLangObject('en', 'widget-template', enTranslations);
|
|
137
|
+
}
|
|
101
138
|
getComponent() {
|
|
102
139
|
return WidgetTemplateComponent;
|
|
103
140
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetTemplateModule, deps:
|
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetTemplateModule, deps: [{ token: i4.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
105
142
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: WidgetTemplateModule, declarations: [WidgetTemplateComponent, PryWidgetTemplateCssComponent], imports: [CommonModule,
|
|
106
143
|
FormsModule,
|
|
107
144
|
OverlayModule,
|
|
@@ -110,7 +147,8 @@ class WidgetTemplateModule extends BaseWidgetModule {
|
|
|
110
147
|
PrySelectModule,
|
|
111
148
|
PryIconModule,
|
|
112
149
|
PryCheckboxModule,
|
|
113
|
-
PryToggleModule
|
|
150
|
+
PryToggleModule,
|
|
151
|
+
PryI18nModule], exports: [WidgetTemplateComponent] }); }
|
|
114
152
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetTemplateModule, imports: [CommonModule,
|
|
115
153
|
FormsModule,
|
|
116
154
|
OverlayModule,
|
|
@@ -119,7 +157,8 @@ class WidgetTemplateModule extends BaseWidgetModule {
|
|
|
119
157
|
PrySelectModule,
|
|
120
158
|
PryIconModule,
|
|
121
159
|
PryCheckboxModule,
|
|
122
|
-
PryToggleModule
|
|
160
|
+
PryToggleModule,
|
|
161
|
+
PryI18nModule] }); }
|
|
123
162
|
}
|
|
124
163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetTemplateModule, decorators: [{
|
|
125
164
|
type: NgModule,
|
|
@@ -134,11 +173,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
134
173
|
PrySelectModule,
|
|
135
174
|
PryIconModule,
|
|
136
175
|
PryCheckboxModule,
|
|
137
|
-
PryToggleModule
|
|
176
|
+
PryToggleModule,
|
|
177
|
+
PryI18nModule
|
|
138
178
|
],
|
|
139
179
|
exports: [WidgetTemplateComponent]
|
|
140
180
|
}]
|
|
141
|
-
}] });
|
|
181
|
+
}], ctorParameters: function () { return [{ type: i4.PryI18nService }]; } });
|
|
142
182
|
|
|
143
183
|
/**
|
|
144
184
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-widgets-widget-template.mjs","sources":["../../../../projects/provoly/dashboard/widgets/widget-template/style/css.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.html","../../../../projects/provoly/dashboard/widgets/widget-template/widget-template.module.ts","../../../../projects/provoly/dashboard/widgets/widget-template/provoly-dashboard-widgets-widget-template.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-widget-template-css',\n template: '',\n styleUrls: ['./_o-widget-template.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryWidgetTemplateCssComponent {}\n","import { Component, ElementRef } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { Store } from '@ngrx/store';\nimport { DataWidgetComponent, TemplateWidgetOptions } from '@provoly/dashboard';\nimport { combineLatestWith, Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\n@Component({\n selector: 'pry-widget-table',\n templateUrl: './widget-template.component.html'\n})\nexport class WidgetTemplateComponent extends DataWidgetComponent {\n options$: Observable<TemplateWidgetOptions>;\n optionsCopy: TemplateWidgetOptions = {};\n template$: Observable<SafeHtml>;\n css$: Observable<SafeHtml>;\n id: number;\n static idGenerator = 0;\n\n constructor(\n store: Store<any>,\n el: ElementRef,\n private sanitizer: DomSanitizer\n ) {\n super(store, el);\n this.id = WidgetTemplateComponent.idGenerator++;\n this.options$ = this.manifest$.pipe(map((manifest) => manifest.options as TemplateWidgetOptions));\n\n this.subscriptions.add(\n this.options$.pipe(filter((opt) => !!opt)).subscribe((options) => {\n this.optionsCopy = { ...(JSON.parse(JSON.stringify(options)) as TemplateWidgetOptions) };\n })\n );\n\n this.template$ = this.options$.pipe(\n map((options) => (!!options.svg ? options.svg : options.html ?? '')),\n combineLatestWith(this.resultSet$),\n map(([template, rs]) => this.evaluate(template, rs))\n );\n\n this.css$ = this.options$.pipe(\n map((options) => `<style>${this.limitScope(options.css ?? '')}</style>`),\n combineLatestWith(this.resultSet$),\n map(([template, rs]) => this.evaluate(template, rs))\n );\n }\n\n emitManifest() {\n this.manifestModified.emit({\n widgetIndex: this.widgetIndex,\n manifest: { ...this.manifest, options: this.optionsCopy }\n });\n }\n\n evaluate(template: string, rs: any): SafeHtml {\n const regexp = new RegExp('{{(.*?)}}', 'g');\n const toReplace = template.match(regexp);\n let result = template;\n\n if (!!toReplace) {\n toReplace.forEach((extracted) => {\n const expr = extracted.substring(2, extracted.length - 2);\n const splitted = expr.split(/[.\\]]/).filter((extr) => extr !== '');\n let evaluation: any = null;\n\n splitted.forEach((_splitPart) => {\n const splitPart = _splitPart.trim();\n if (splitPart.startsWith('rs')) {\n const classId = (expr.match(/rs\\['(.)*?'/) ?? ['no-class-id-detected'])[0]\n .replace(\"rs['\", '')\n .replace(\"'\", '');\n evaluation = rs.items[classId];\n } else if (splitPart.startsWith('[')) {\n if (!!evaluation) {\n evaluation = evaluation[parseInt(splitPart.substring(1), 10)];\n }\n } else {\n if (!!evaluation) {\n const indexOfCaret = splitPart.indexOf('[');\n if (indexOfCaret === -1) {\n evaluation = evaluation[splitPart];\n } else {\n const prop = splitPart.substring(0, indexOfCaret);\n const subProp = splitPart.substring(indexOfCaret + 1);\n evaluation = evaluation[prop].values[subProp];\n }\n if (!!evaluation && evaluation.type === 'VALUE') {\n evaluation = evaluation.value;\n }\n }\n }\n });\n\n result = result.replace(extracted, evaluation);\n });\n }\n\n return this.sanitizer.bypassSecurityTrustHtml(result);\n }\n\n private limitScope(css: string): string {\n const scope = `.pry-template-${this.id}`;\n\n const scoped = css.replace(/([},] ?)/g, `$1${scope} `).replace(new RegExp(scope + ' $'), '');\n\n return scope + ' ' + scoped;\n }\n}\n","<pry-widget-template-css></pry-widget-template-css>\n<div *ngIf=\"css$ | async as css\" [innerHtml]=\"css\"></div>\n<div *ngIf=\"template$ | async as template\" [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseWidgetComponent,\n BaseWidgetModule,\n PryCoreModule,\n PryDashboardModule,\n PryIconModule,\n PrySelectModule,\n PryToggleModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { WidgetTemplateComponent } from './component/widget-template.component';\nimport { PryWidgetTemplateCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [WidgetTemplateComponent, PryWidgetTemplateCssComponent],\n imports: [\n CommonModule,\n FormsModule,\n OverlayModule,\n PryCoreModule,\n PryDashboardModule,\n PrySelectModule,\n PryIconModule,\n PryCheckboxModule,\n PryToggleModule\n ],\n exports: [WidgetTemplateComponent]\n})\nexport class WidgetTemplateModule extends BaseWidgetModule {\n override getComponent() {\n return WidgetTemplateComponent as Type<BaseWidgetComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i4.PryWidgetTemplateCssComponent"],"mappings":";;;;;;;;;;;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EA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mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAdhB,YAAA,EAAA,CAAA,uBAAuB,EAAE,6BAA6B,aAEnE,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;AACjB,YAAA,eAAe,aAEP,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAZ7B,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIN,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAfhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,6BAA6B,CAAC;AACtE,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-widgets-widget-template.mjs","sources":["../../../../projects/provoly/dashboard/widgets/widget-template/style/css.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.ts","../../../../projects/provoly/dashboard/widgets/widget-template/component/widget-template.component.html","../../../../projects/provoly/dashboard/widgets/widget-template/i18n/en.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-template/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-template/widget-template.module.ts","../../../../projects/provoly/dashboard/widgets/widget-template/provoly-dashboard-widgets-widget-template.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-widget-template-css',\n template: '',\n styleUrls: ['./_o-widget-template.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryWidgetTemplateCssComponent {}\n","import { Component, ElementRef } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { Store } from '@ngrx/store';\nimport { DataWidgetComponent, TemplateWidgetOptions } from '@provoly/dashboard';\nimport { combineLatestWith, Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\n@Component({\n selector: 'pry-widget-table',\n templateUrl: './widget-template.component.html'\n})\nexport class WidgetTemplateComponent extends DataWidgetComponent {\n options$: Observable<TemplateWidgetOptions>;\n optionsCopy: TemplateWidgetOptions = {};\n template$: Observable<SafeHtml>;\n css$: Observable<SafeHtml>;\n id: number;\n static idGenerator = 0;\n\n constructor(store: Store<any>, el: ElementRef, private sanitizer: DomSanitizer) {\n super(store, el);\n this.id = WidgetTemplateComponent.idGenerator++;\n this.options$ = this.manifest$.pipe(map((manifest) => manifest.options as TemplateWidgetOptions));\n\n this.subscriptions.add(\n this.options$.pipe(filter((opt) => !!opt)).subscribe((options) => {\n this.optionsCopy = { ...(JSON.parse(JSON.stringify(options)) as TemplateWidgetOptions) };\n })\n );\n\n this.template$ = this.options$.pipe(\n map((options) => (!!options.svg ? options.svg : options.html ?? '')),\n combineLatestWith(this.resultSet$),\n map(([template, rs]) => this.evaluate(template, rs))\n );\n\n this.css$ = this.options$.pipe(\n map((options) => `<style>${this.limitScope(options.css ?? '')}</style>`),\n combineLatestWith(this.resultSet$),\n map(([template, rs]) => this.evaluate(template, rs))\n );\n }\n\n emitManifest() {\n this.manifestModified.emit({\n widgetIndex: this.widgetIndex,\n manifest: { ...this.manifest, options: this.optionsCopy }\n });\n }\n\n evaluate(template: string, rs: any): SafeHtml {\n const regexp = new RegExp('{{(.*?)}}', 'g');\n const toReplace = template.match(regexp);\n let result = template;\n\n if (!!toReplace) {\n toReplace.forEach((extracted) => {\n const expr = extracted.substring(2, extracted.length - 2);\n const splitted = expr.split(/[.\\]]/).filter((extr) => extr !== '');\n let evaluation: any = null;\n\n splitted.forEach((_splitPart) => {\n const splitPart = _splitPart.trim();\n if (splitPart.startsWith('rs')) {\n const classId = (expr.match(/rs\\['(.)*?'/) ?? ['no-class-id-detected'])[0]\n .replace(\"rs['\", '')\n .replace(\"'\", '');\n evaluation = rs.items[classId];\n } else if (splitPart.startsWith('[')) {\n if (!!evaluation) {\n evaluation = evaluation[parseInt(splitPart.substring(1), 10)];\n }\n } else {\n if (!!evaluation) {\n const indexOfCaret = splitPart.indexOf('[');\n if (indexOfCaret === -1) {\n evaluation = evaluation[splitPart];\n } else {\n const prop = splitPart.substring(0, indexOfCaret);\n const subProp = splitPart.substring(indexOfCaret + 1);\n evaluation = evaluation[prop].values[subProp];\n }\n if (!!evaluation && evaluation.type === 'VALUE') {\n evaluation = evaluation.value;\n }\n }\n }\n });\n\n result = result.replace(extracted, evaluation);\n });\n }\n\n return this.sanitizer.bypassSecurityTrustHtml(result);\n }\n\n private limitScope(css: string): string {\n const scope = `.pry-template-${this.id}`;\n\n const scoped = css.replace(/([},] ?)/g, `$1${scope} `).replace(new RegExp(scope + ' $'), '');\n\n return scope + ' ' + scoped;\n }\n\n changeHtml($event: Event) {\n // @ts-ignore\n this.optionsCopy.html = $event.currentTarget.value;\n }\n\n changeCss($event: Event) {\n // @ts-ignore\n this.optionsCopy.html = $event.currentTarget.value;\n }\n}\n","<pry-widget-template-css></pry-widget-template-css>\n<pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n>\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"html_src\">{{ '@pry.widget.template.html' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"html_src\"\n [value]=\"optionsCopy.html\"\n (input)=\"changeHtml($event)\"\n ></textarea>\n </div>\n\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"css_src\">{{ '@pry.widget.template.css' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area -overflow\"\n id=\"css_src\"\n [value]=\"optionsCopy.css\"\n (input)=\"changeCss($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n</pry-widget-header>\n<div *ngIf=\"css$ | async as css\" [innerHtml]=\"css\"></div>\n<div *ngIf=\"template$ | async as template\" [class]=\"'pry-template-' + id\" [innerHtml]=\"template\"></div>\n","export const enTranslations = {\n '@pry': {\n widget: {\n template: {\n html: 'Html',\n css: 'Css'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n widget: {\n template: {\n html: 'Html',\n css: 'Css'\n }\n }\n }\n};\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseWidgetComponent,\n BaseWidgetModule,\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PrySelectModule,\n PryToggleModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { WidgetTemplateComponent } from './component/widget-template.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryWidgetTemplateCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [WidgetTemplateComponent, PryWidgetTemplateCssComponent],\n imports: [\n CommonModule,\n FormsModule,\n OverlayModule,\n PryCoreModule,\n PryDashboardModule,\n PrySelectModule,\n PryIconModule,\n PryCheckboxModule,\n PryToggleModule,\n PryI18nModule\n ],\n exports: [WidgetTemplateComponent]\n})\nexport class WidgetTemplateModule extends BaseWidgetModule {\n constructor(private pryTranslateService: PryI18nService) {\n super();\n this.pryTranslateService.addLangObject('fr', 'widget-template', frTranslations);\n this.pryTranslateService.addLangObject('en', 'widget-template', enTranslations);\n }\n\n override getComponent() {\n return WidgetTemplateComponent as Type<BaseWidgetComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i5.PryWidgetTemplateCssComponent","i1"],"mappings":";;;;;;;;;;;;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,+DAJ9B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wCAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EACzB,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,wCAAA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ClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;AACf,YAAA,aAAa,aAEL,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAb7B,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIJ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAhBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,6BAA6B,CAAC;AACtE,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,iBAAiB;wBACjB,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACpCD;;AAEG;;;;"}
|
|
@@ -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';
|
|
@@ -320,6 +318,7 @@ const enTranslations$1 = {
|
|
|
320
318
|
other: 'Other'
|
|
321
319
|
},
|
|
322
320
|
tile: 'Tiles',
|
|
321
|
+
template: 'HTML Template',
|
|
323
322
|
now: 'Today',
|
|
324
323
|
since_day: '{{day}} day{{plural}} ago',
|
|
325
324
|
layout: {
|
|
@@ -669,6 +668,7 @@ const frTranslations$1 = {
|
|
|
669
668
|
other: 'Autre'
|
|
670
669
|
},
|
|
671
670
|
tile: 'Tuiles',
|
|
671
|
+
template: 'Template HTML',
|
|
672
672
|
now: "Aujourd'hui",
|
|
673
673
|
since_day: 'Il y a {{day}} jour{{plural}}',
|
|
674
674
|
layout: {
|
|
@@ -4357,93 +4357,8 @@ const ItemActions = {
|
|
|
4357
4357
|
createFailure: createAction('[Item] create failure', props())
|
|
4358
4358
|
};
|
|
4359
4359
|
|
|
4360
|
-
var FieldType;
|
|
4361
|
-
(function (FieldType) {
|
|
4362
|
-
FieldType["STRING"] = "string";
|
|
4363
|
-
FieldType["KEYWORD"] = "keyword";
|
|
4364
|
-
FieldType["INTEGER"] = "integer";
|
|
4365
|
-
FieldType["DECIMAL"] = "decimal";
|
|
4366
|
-
FieldType["INSTANT"] = "instant";
|
|
4367
|
-
FieldType["LONG"] = "long";
|
|
4368
|
-
FieldType["RAW"] = "raw";
|
|
4369
|
-
FieldType["POINT"] = "Point";
|
|
4370
|
-
FieldType["MULTIPOINT"] = "MultiPoint";
|
|
4371
|
-
FieldType["LINE"] = "LineString";
|
|
4372
|
-
FieldType["MULTILINE"] = "MultiLineString";
|
|
4373
|
-
FieldType["POLYGON"] = "Polygon";
|
|
4374
|
-
FieldType["MULTIPOLYGON"] = "MultiPolygon";
|
|
4375
|
-
FieldType["GEOMETRYCOLLECTION"] = "GeometryCollection";
|
|
4376
|
-
FieldType["OCLASS"] = "mod\u00E8le de donn\u00E9es";
|
|
4377
|
-
FieldType["DATASET"] = "test";
|
|
4378
|
-
})(FieldType || (FieldType = {}));
|
|
4379
|
-
const GeometricFieldTypes = [
|
|
4380
|
-
FieldType.POINT,
|
|
4381
|
-
FieldType.MULTIPOINT,
|
|
4382
|
-
FieldType.LINE,
|
|
4383
|
-
FieldType.MULTILINE,
|
|
4384
|
-
FieldType.POLYGON,
|
|
4385
|
-
FieldType.MULTIPOLYGON,
|
|
4386
|
-
FieldType.GEOMETRYCOLLECTION
|
|
4387
|
-
];
|
|
4388
|
-
|
|
4389
4360
|
const hiddenFieldText = '*********';
|
|
4390
4361
|
class ItemUtils {
|
|
4391
|
-
static readGeometry(item, type, attribute) {
|
|
4392
|
-
if (!attribute || !item.attributes[attribute.name]) {
|
|
4393
|
-
// @ts-ignore
|
|
4394
|
-
return null;
|
|
4395
|
-
}
|
|
4396
|
-
let value = item.attributes[attribute.name];
|
|
4397
|
-
if (value.type === 'MULTI') {
|
|
4398
|
-
value = value.values[0];
|
|
4399
|
-
}
|
|
4400
|
-
return new GeoJSON().readGeometry(this.projectGeometry(value.value));
|
|
4401
|
-
}
|
|
4402
|
-
static projectGeometry(geometry) {
|
|
4403
|
-
return {
|
|
4404
|
-
...geometry,
|
|
4405
|
-
coordinates: typeof geometry.coordinates[0] === 'number'
|
|
4406
|
-
? fromLonLat(geometry.coordinates)
|
|
4407
|
-
: geometry.coordinates.map((sub) => this.projectGeometry({ type: '', coordinates: sub }).coordinates)
|
|
4408
|
-
};
|
|
4409
|
-
}
|
|
4410
|
-
static readLocations(item, type) {
|
|
4411
|
-
const points = [];
|
|
4412
|
-
Object.entries(item.attributes).forEach(([key, value]) => {
|
|
4413
|
-
if (value.type === 'VALUE') {
|
|
4414
|
-
this.extractGeometries(value, points, type);
|
|
4415
|
-
}
|
|
4416
|
-
else {
|
|
4417
|
-
value.values.forEach((value) => {
|
|
4418
|
-
this.extractGeometries(value, points, type);
|
|
4419
|
-
});
|
|
4420
|
-
}
|
|
4421
|
-
});
|
|
4422
|
-
return points;
|
|
4423
|
-
}
|
|
4424
|
-
static extractGeometries(value, points, type) {
|
|
4425
|
-
const valueSimple = value.value;
|
|
4426
|
-
if (typeof valueSimple !== 'string' && typeof valueSimple !== 'number') {
|
|
4427
|
-
if (type === 'point' && valueSimple.type === FieldType.POINT) {
|
|
4428
|
-
points.push(valueSimple.coordinates);
|
|
4429
|
-
}
|
|
4430
|
-
if (type === 'point' && valueSimple.type === FieldType.MULTIPOINT) {
|
|
4431
|
-
points.push(...valueSimple.coordinates);
|
|
4432
|
-
}
|
|
4433
|
-
if (type === 'line' && valueSimple.type === FieldType.LINE) {
|
|
4434
|
-
points.push(valueSimple.coordinates);
|
|
4435
|
-
}
|
|
4436
|
-
if (type === 'line' && valueSimple.type === FieldType.MULTILINE) {
|
|
4437
|
-
points.push(...valueSimple.coordinates);
|
|
4438
|
-
}
|
|
4439
|
-
if (type === 'polygon' && valueSimple.type === FieldType.POLYGON) {
|
|
4440
|
-
points.push(valueSimple.coordinates);
|
|
4441
|
-
}
|
|
4442
|
-
if (type === 'polygon' && valueSimple.type === FieldType.MULTIPOLYGON) {
|
|
4443
|
-
points.push(...valueSimple.coordinates);
|
|
4444
|
-
}
|
|
4445
|
-
}
|
|
4446
|
-
}
|
|
4447
4362
|
static getAttributeValue(item, attribute) {
|
|
4448
4363
|
if (!attribute) {
|
|
4449
4364
|
return undefined;
|
|
@@ -4764,7 +4679,7 @@ class SearchEffects {
|
|
|
4764
4679
|
id: props.id,
|
|
4765
4680
|
params: this.searchService.getItemsSerializedParams(props.id, quickOrder)
|
|
4766
4681
|
})), catchError$1((error) => [SearchActions.searchFailure({ error, id: props.id })])))));
|
|
4767
|
-
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) =>
|
|
4682
|
+
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 });
|
|
4768
4683
|
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 })])))));
|
|
4769
4684
|
this.searchSuccess$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.searchSuccess), map((action) => DashboardActions.updateResultSet({
|
|
4770
4685
|
id: action.id ?? DEFAULT_NAMED_QUERY_ID,
|
|
@@ -5061,6 +4976,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
5061
4976
|
}]
|
|
5062
4977
|
}], ctorParameters: function () { return [{ type: PryI18nService }]; } });
|
|
5063
4978
|
|
|
4979
|
+
var FieldType;
|
|
4980
|
+
(function (FieldType) {
|
|
4981
|
+
FieldType["STRING"] = "string";
|
|
4982
|
+
FieldType["KEYWORD"] = "keyword";
|
|
4983
|
+
FieldType["INTEGER"] = "integer";
|
|
4984
|
+
FieldType["DECIMAL"] = "decimal";
|
|
4985
|
+
FieldType["INSTANT"] = "instant";
|
|
4986
|
+
FieldType["LONG"] = "long";
|
|
4987
|
+
FieldType["RAW"] = "raw";
|
|
4988
|
+
FieldType["POINT"] = "Point";
|
|
4989
|
+
FieldType["MULTIPOINT"] = "MultiPoint";
|
|
4990
|
+
FieldType["LINE"] = "LineString";
|
|
4991
|
+
FieldType["MULTILINE"] = "MultiLineString";
|
|
4992
|
+
FieldType["POLYGON"] = "Polygon";
|
|
4993
|
+
FieldType["MULTIPOLYGON"] = "MultiPolygon";
|
|
4994
|
+
FieldType["GEOMETRYCOLLECTION"] = "GeometryCollection";
|
|
4995
|
+
FieldType["OCLASS"] = "mod\u00E8le de donn\u00E9es";
|
|
4996
|
+
FieldType["DATASET"] = "test";
|
|
4997
|
+
})(FieldType || (FieldType = {}));
|
|
4998
|
+
const GeometricFieldTypes = [
|
|
4999
|
+
FieldType.POINT,
|
|
5000
|
+
FieldType.MULTIPOINT,
|
|
5001
|
+
FieldType.LINE,
|
|
5002
|
+
FieldType.MULTILINE,
|
|
5003
|
+
FieldType.POLYGON,
|
|
5004
|
+
FieldType.MULTIPOLYGON,
|
|
5005
|
+
FieldType.GEOMETRYCOLLECTION
|
|
5006
|
+
];
|
|
5007
|
+
|
|
5064
5008
|
const feature$2 = createFeatureSelector(searchFeatureKey);
|
|
5065
5009
|
const searchLoading = createSelector(feature$2, (state) => state.searchLoading);
|
|
5066
5010
|
const SearchSelectors = {
|
|
@@ -8656,6 +8600,17 @@ class ToolboxManifestService extends SubscriptionnerDirective {
|
|
|
8656
8600
|
options: {},
|
|
8657
8601
|
datasource: USE_CURRENT_RESULTSET
|
|
8658
8602
|
},
|
|
8603
|
+
template: {
|
|
8604
|
+
type: 'template',
|
|
8605
|
+
layout: {
|
|
8606
|
+
x: 1,
|
|
8607
|
+
y: 1,
|
|
8608
|
+
height: 2,
|
|
8609
|
+
width: 3
|
|
8610
|
+
},
|
|
8611
|
+
options: { html: '', css: '' },
|
|
8612
|
+
datasource: USE_CURRENT_RESULTSET
|
|
8613
|
+
},
|
|
8659
8614
|
vega: {
|
|
8660
8615
|
type: 'vega',
|
|
8661
8616
|
layout: {
|
|
@@ -8757,7 +8712,8 @@ const defaultMenuStructure = [
|
|
|
8757
8712
|
{ icon: 'toc', label: '@pry.toolbox.detail', type: 'detail' },
|
|
8758
8713
|
{ icon: 'graph', label: '@pry.toolbox.graph', type: 'graph' },
|
|
8759
8714
|
{ icon: 'settings_applications', label: '@pry.toolbox.iframe', type: 'iframe' },
|
|
8760
|
-
{ icon: 'tile', label: '@pry.toolbox.tile', type: 'tile' }
|
|
8715
|
+
{ icon: 'tile', label: '@pry.toolbox.tile', type: 'tile' },
|
|
8716
|
+
{ icon: 'code-box', label: '@pry.toolbox.template', type: 'template' }
|
|
8761
8717
|
]
|
|
8762
8718
|
}
|
|
8763
8719
|
];
|
|
@@ -10013,6 +9969,9 @@ class BaseFilterComponent extends SubscriptionnerDirective {
|
|
|
10013
9969
|
this.store = store;
|
|
10014
9970
|
this.type = 'base';
|
|
10015
9971
|
}
|
|
9972
|
+
ngOnInit() {
|
|
9973
|
+
this._value = this.filter?.value;
|
|
9974
|
+
}
|
|
10016
9975
|
updateFilter(value) {
|
|
10017
9976
|
this._value = value;
|
|
10018
9977
|
}
|
|
@@ -10708,8 +10667,7 @@ class DashboardEffects {
|
|
|
10708
10667
|
this.relaunchAfterOrder$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.quickOrder), map$1((action) => SearchActions.getDatasourceItems({ id: action.datasourceId }))));
|
|
10709
10668
|
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 }))));
|
|
10710
10669
|
this.toggleEditionModeIfNotManual$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), filter$1((action) => action.layout !== DashboardGridLayout.MANUAL), map$1(() => DashboardActions.toggleEditionMode({ force: false }))));
|
|
10711
|
-
this.
|
|
10712
|
-
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)), switchMap(([action, filters, resultSets, resultSetsParams, quickOrder]) => {
|
|
10670
|
+
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]) => {
|
|
10713
10671
|
return [
|
|
10714
10672
|
...new Set(filters
|
|
10715
10673
|
.map((f) => f.attributes)
|