@provoly/dashboard 0.24.10 → 0.24.12

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 (27) hide show
  1. package/esm2022/filters/autocomplete/autocomplete.component.mjs +2 -2
  2. package/esm2022/lib/core/components/edit-input/edit-input.component.mjs +3 -3
  3. package/esm2022/lib/core/store/search/search.actions.mjs +1 -1
  4. package/esm2022/lib/core/store/search/search.service.mjs +1 -1
  5. package/esm2022/lib/dashboard/components/dashboard.component.mjs +6 -3
  6. package/esm2022/search/i18n/en.translations.mjs +5 -4
  7. package/esm2022/search/i18n/fr.translations.mjs +3 -2
  8. package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +8 -4
  9. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +4 -4
  10. package/esm2022/widgets/widget-template/component/widget-template.component.mjs +2 -2
  11. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs +1 -1
  12. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs.map +1 -1
  13. package/fesm2022/provoly-dashboard-search.mjs +6 -4
  14. package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
  15. package/fesm2022/provoly-dashboard-toolbox.mjs +7 -3
  16. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  17. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +3 -3
  18. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  19. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs +1 -1
  20. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
  21. package/fesm2022/provoly-dashboard.mjs +6 -4
  22. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  23. package/lib/core/store/search/search.actions.d.ts +0 -4
  24. package/lib/core/store/search/search.service.d.ts +0 -2
  25. package/package.json +7 -7
  26. package/search/i18n/en.translations.d.ts +1 -0
  27. package/search/i18n/fr.translations.d.ts +1 -0
@@ -96,7 +96,7 @@ class WidgetTemplateComponent extends DataWidgetComponent {
96
96
  }
97
97
  changeCss($event) {
98
98
  // @ts-ignore
99
- this.optionsCopy.html = $event.currentTarget.value;
99
+ this.optionsCopy.css = $event.currentTarget.value;
100
100
  }
101
101
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WidgetTemplateComponent, deps: [{ token: i1.Store }, { token: i0.ElementRef }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
102
102
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", 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" }] }); }
@@ -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/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,CAAA,EAAA,CAAA;;;ACKjC,MAAO,uBAAwB,SAAQ,mBAAmB,CAAA;aAMvD,IAAW,CAAA,WAAA,GAAG,CAAH,CAAK,EAAA;AAEvB,IAAA,WAAA,CAAY,KAAiB,EAAE,EAAc,EAAU,SAAuB,EAAA;AAC5E,QAAA,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QADoC,IAAS,CAAA,SAAA,GAAT,SAAS,CAAc;QAN9E,IAAW,CAAA,WAAA,GAA0B,EAAE,CAAC;AAQtC,QAAA,IAAI,CAAC,EAAE,GAAG,uBAAuB,CAAC,WAAW,EAAE,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CA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AAA,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;;;;"}
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.css = $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,EA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AA;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACpCD;;AAEG;;;;"}
@@ -6371,7 +6371,7 @@ class PryEditInputComponent {
6371
6371
  useExisting: forwardRef(() => PryEditInputComponent),
6372
6372
  multi: true
6373
6373
  }
6374
- ], ngImport: i0, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <label id=\"edit-input-label-{{ id }}\" for=\"edit-input-{{ id }}\" class=\"a-label\">\n {{ label | i18n }}\n <span class=\"u-visually-hidden\">({{ label | i18n }})</span>\n </label>\n <div class=\"m-form-label-field__edit-inline\" (mouseenter)=\"showButton = true\" (mouseleave)=\"showButton = false\">\n <p class=\"m-form-label-field__edit-inline__txtvalue\" *ngIf=\"!editMode\">\n {{ value }}\n </p>\n <input\n *ngIf=\"editMode\"\n id=\"edit-input-{{ id }}\"\n type=\"text\"\n class=\"a-form-field\"\n [ngModel]=\"value\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <button\n [class.-button-visible]=\"showButton || editMode\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only -size-xs a-tooltip\"\n (click)=\"toggle()\"\n [attr.data-tooltip]=\"editMode ? confirmButtonTooltip : (editButtonTooltip | i18n)\"\n data-tooltip-position=\"left\"\n >\n <pry-icon [width]=\"16\" [height]=\"16\" [iconSvg]=\"editMode ? 'check' : 'edit'\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.theme.editInput.toggle' | i18n }}</span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6374
+ ], ngImport: i0, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <label id=\"edit-input-label-{{ id }}\" for=\"edit-input-{{ id }}\" class=\"a-label\">\n {{ label | i18n }}\n <span class=\"u-visually-hidden\">({{ label | i18n }})</span>\n </label>\n <div class=\"m-form-label-field__edit-inline\" (mouseenter)=\"showButton = true\" (mouseleave)=\"showButton = false\">\n <p class=\"m-form-label-field__edit-inline__txtvalue\" *ngIf=\"!editMode\">\n {{ value }}\n </p>\n <input\n *ngIf=\"editMode\"\n id=\"edit-input-{{ id }}\"\n type=\"text\"\n class=\"a-form-field\"\n [ngModel]=\"value\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <button\n [class.-button-visible]=\"showButton || editMode\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only -size-xs a-tooltip\"\n (click)=\"toggle()\"\n [attr.data-tooltip]=\"(editMode ? confirmButtonTooltip : editButtonTooltip) | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon [width]=\"16\" [height]=\"16\" [iconSvg]=\"editMode ? 'check' : 'edit'\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.theme.editInput.toggle' | i18n }}</span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6375
6375
  }
6376
6376
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryEditInputComponent, decorators: [{
6377
6377
  type: Component,
@@ -6381,7 +6381,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
6381
6381
  useExisting: forwardRef(() => PryEditInputComponent),
6382
6382
  multi: true
6383
6383
  }
6384
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <label id=\"edit-input-label-{{ id }}\" for=\"edit-input-{{ id }}\" class=\"a-label\">\n {{ label | i18n }}\n <span class=\"u-visually-hidden\">({{ label | i18n }})</span>\n </label>\n <div class=\"m-form-label-field__edit-inline\" (mouseenter)=\"showButton = true\" (mouseleave)=\"showButton = false\">\n <p class=\"m-form-label-field__edit-inline__txtvalue\" *ngIf=\"!editMode\">\n {{ value }}\n </p>\n <input\n *ngIf=\"editMode\"\n id=\"edit-input-{{ id }}\"\n type=\"text\"\n class=\"a-form-field\"\n [ngModel]=\"value\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <button\n [class.-button-visible]=\"showButton || editMode\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only -size-xs a-tooltip\"\n (click)=\"toggle()\"\n [attr.data-tooltip]=\"editMode ? confirmButtonTooltip : (editButtonTooltip | i18n)\"\n data-tooltip-position=\"left\"\n >\n <pry-icon [width]=\"16\" [height]=\"16\" [iconSvg]=\"editMode ? 'check' : 'edit'\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.theme.editInput.toggle' | i18n }}</span>\n </button>\n </div>\n</div>\n" }]
6384
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <label id=\"edit-input-label-{{ id }}\" for=\"edit-input-{{ id }}\" class=\"a-label\">\n {{ label | i18n }}\n <span class=\"u-visually-hidden\">({{ label | i18n }})</span>\n </label>\n <div class=\"m-form-label-field__edit-inline\" (mouseenter)=\"showButton = true\" (mouseleave)=\"showButton = false\">\n <p class=\"m-form-label-field__edit-inline__txtvalue\" *ngIf=\"!editMode\">\n {{ value }}\n </p>\n <input\n *ngIf=\"editMode\"\n id=\"edit-input-{{ id }}\"\n type=\"text\"\n class=\"a-form-field\"\n [ngModel]=\"value\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <button\n [class.-button-visible]=\"showButton || editMode\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only -size-xs a-tooltip\"\n (click)=\"toggle()\"\n [attr.data-tooltip]=\"(editMode ? confirmButtonTooltip : editButtonTooltip) | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon [width]=\"16\" [height]=\"16\" [iconSvg]=\"editMode ? 'check' : 'edit'\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.theme.editInput.toggle' | i18n }}</span>\n </button>\n </div>\n</div>\n" }]
6385
6385
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { label: [{
6386
6386
  type: Input
6387
6387
  }], editButtonTooltip: [{
@@ -8532,8 +8532,10 @@ class DashboardComponent extends SubscriptionnerDirective {
8532
8532
  getDataActions.forEach((action) => this.store.dispatch(action));
8533
8533
  }
8534
8534
  }));
8535
- this.subscriptions.add(this.windowManifest$.subscribe(() => {
8536
- this.store.dispatch(DashboardActions.assertResultSets({}));
8535
+ this.subscriptions.add(combineLatest([this.windowManifest$, this.store.select(DataSourceSelectors.getDataSources)]).subscribe(([manifest, datasets]) => {
8536
+ if (datasets.length > 0) {
8537
+ this.store.dispatch(DashboardActions.assertResultSets({}));
8538
+ }
8537
8539
  }));
8538
8540
  this.store.dispatch(FieldActions.load());
8539
8541
  this.store.dispatch(ClassActions.load());