@provoly/dashboard 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/core/store/aggregation/backend-aggregation.service.mjs +2 -2
- package/esm2022/lib/dashboard/store/manifest.service.mjs +3 -3
- package/esm2022/presentation/components/presentation.component.mjs +2 -2
- package/esm2022/toolbox/components/share/share.component.mjs +4 -2
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +1 -5
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +4 -1
- package/esm2022/widgets/widget-template/component/widget-template.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-presentation.mjs +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +3 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +0 -4
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +3 -0
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-template.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +3 -3
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/dashboard/store/manifest.service.d.ts +1 -1
- package/package.json +7 -7
- package/widgets/widget-template/component/widget-template.component.d.ts +1 -1
|
@@ -99,11 +99,11 @@ class WidgetTemplateComponent extends DataWidgetComponent {
|
|
|
99
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
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: WidgetTemplateComponent, selector: "pry-widget-
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: WidgetTemplateComponent, selector: "pry-widget-template", 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" }] }); }
|
|
103
103
|
}
|
|
104
104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WidgetTemplateComponent, decorators: [{
|
|
105
105
|
type: Component,
|
|
106
|
-
args: [{ selector: 'pry-widget-
|
|
106
|
+
args: [{ selector: 'pry-widget-template', 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" }]
|
|
107
107
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ElementRef }, { type: i2.DomSanitizer }] });
|
|
108
108
|
|
|
109
109
|
const enTranslations = {
|
|
@@ -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.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"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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-template',\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 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,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,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ationService extends PryAggregationService {
|
|
|
5702
5702
|
if (options.graph && options.graph.sort) {
|
|
5703
5703
|
params = params.set('order', `${options.graph.sort.direction},${(options.graph.sort.value ?? '').toUpperCase()}`);
|
|
5704
5704
|
}
|
|
5705
|
-
if (
|
|
5705
|
+
if (options.abscissa && options.abscissa.limit) {
|
|
5706
5706
|
params = params.set('limit', `${options.abscissa.limit}`);
|
|
5707
5707
|
}
|
|
5708
5708
|
params = this.searchService.getItemsFilter(targetDatasource, params, false);
|
|
@@ -11044,7 +11044,7 @@ class ManifestService {
|
|
|
11044
11044
|
.select(ConfigSelectors.refUrl)
|
|
11045
11045
|
.pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/users/me/dashboards/id/${id}/manifest`))));
|
|
11046
11046
|
}
|
|
11047
|
-
save(name, manifest, id, description, image, metadata,
|
|
11047
|
+
save(name, manifest, id, description, image, metadata, accessRightsByGroup, additionalInformation) {
|
|
11048
11048
|
return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => {
|
|
11049
11049
|
return this.httpClient.post(encodeURI(`${url}/users/me/dashboards`), {
|
|
11050
11050
|
id,
|
|
@@ -11055,7 +11055,7 @@ class ManifestService {
|
|
|
11055
11055
|
cover: true,
|
|
11056
11056
|
metadata,
|
|
11057
11057
|
datasource: ManifestUtils.getDatasourcesUsedByManifest(manifest).map((ds) => ds.datasetId),
|
|
11058
|
-
|
|
11058
|
+
accessRightsByGroup,
|
|
11059
11059
|
additionalInformation
|
|
11060
11060
|
});
|
|
11061
11061
|
}));
|