@provoly/dashboard 0.18.6 → 0.18.8

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.
Files changed (26) hide show
  1. package/esm2022/lib/core/i18n/en.translations.mjs +2 -1
  2. package/esm2022/lib/core/i18n/fr.translations.mjs +2 -1
  3. package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +12 -1
  4. package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +3 -2
  5. package/esm2022/lib/dashboard/filter/components/filter-instanciator/filter-instanciator.component.mjs +5 -1
  6. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +3 -3
  7. package/esm2022/widgets/widget-template/component/widget-template.component.mjs +13 -4
  8. package/esm2022/widgets/widget-template/i18n/en.translations.mjs +11 -0
  9. package/esm2022/widgets/widget-template/i18n/fr.translations.mjs +11 -0
  10. package/esm2022/widgets/widget-template/widget-template.module.mjs +19 -7
  11. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +2 -2
  12. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  13. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs +48 -8
  14. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
  15. package/fesm2022/provoly-dashboard.mjs +19 -1
  16. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  17. package/lib/core/i18n/en.translations.d.ts +1 -0
  18. package/lib/core/i18n/fr.translations.d.ts +1 -0
  19. package/lib/dashboard/filter/components/filter-instanciator/filter-instanciator.component.d.ts +3 -2
  20. package/package.json +37 -37
  21. package/styles/components/_a-form-field.scss +0 -1
  22. package/styles/components/_m-filter.scss +7 -3
  23. package/widgets/widget-template/component/widget-template.component.d.ts +2 -0
  24. package/widgets/widget-template/i18n/en.translations.d.ts +10 -0
  25. package/widgets/widget-template/i18n/fr.translations.d.ts +10 -0
  26. 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 { DataWidgetComponent, BaseWidgetModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule } from '@provoly/dashboard';
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: null, target: i0.ɵɵFactoryTarget.NgModule }); }
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], exports: [WidgetTemplateComponent] }); }
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,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,CAAA,EAAA,CAAA;;;ACKjC,MAAO,uBAAwB,SAAQ,mBAAmB,CAAA;aAMvD,IAAW,CAAA,WAAA,GAAG,CAAC,CAAC,EAAA;AAEvB,IAAA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AA,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,eA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B;wBACjB,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACpCD;;AAEG;;;;"}
@@ -318,6 +318,7 @@ const enTranslations$1 = {
318
318
  other: 'Other'
319
319
  },
320
320
  tile: 'Tiles',
321
+ template: 'HTML Template',
321
322
  now: 'Today',
322
323
  since_day: '{{day}} day{{plural}} ago',
323
324
  layout: {
@@ -667,6 +668,7 @@ const frTranslations$1 = {
667
668
  other: 'Autre'
668
669
  },
669
670
  tile: 'Tuiles',
671
+ template: 'Template HTML',
670
672
  now: "Aujourd'hui",
671
673
  since_day: 'Il y a {{day}} jour{{plural}}',
672
674
  layout: {
@@ -8598,6 +8600,17 @@ class ToolboxManifestService extends SubscriptionnerDirective {
8598
8600
  options: {},
8599
8601
  datasource: USE_CURRENT_RESULTSET
8600
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
+ },
8601
8614
  vega: {
8602
8615
  type: 'vega',
8603
8616
  layout: {
@@ -8699,7 +8712,8 @@ const defaultMenuStructure = [
8699
8712
  { icon: 'toc', label: '@pry.toolbox.detail', type: 'detail' },
8700
8713
  { icon: 'graph', label: '@pry.toolbox.graph', type: 'graph' },
8701
8714
  { icon: 'settings_applications', label: '@pry.toolbox.iframe', type: 'iframe' },
8702
- { 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' }
8703
8717
  ]
8704
8718
  }
8705
8719
  ];
@@ -10074,6 +10088,10 @@ class FilterInstanciatorComponent extends SubscriptionnerDirective {
10074
10088
  }
10075
10089
  }));
10076
10090
  }
10091
+ ngOnDestroy() {
10092
+ super.ngOnDestroy();
10093
+ this.applySub?.unsubscribe();
10094
+ }
10077
10095
  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 }); }
10078
10096
  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" }); }
10079
10097
  }