@provoly/dashboard 0.25.7 → 0.25.9

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 (78) hide show
  1. package/components/page-loader/index.d.ts +5 -0
  2. package/components/page-loader/page-loader.component.d.ts +7 -0
  3. package/components/page-loader/page-loader.module.d.ts +7 -0
  4. package/components/page-loader/public-api.d.ts +2 -0
  5. package/components/text-editor/text-editor.module.d.ts +1 -2
  6. package/dataset/components/dataset-detail/dataset-detail.component.d.ts +3 -2
  7. package/dataset/i18n/en.translations.d.ts +6 -0
  8. package/dataset/i18n/fr.translations.d.ts +6 -0
  9. package/dataset/style/_o-pry-dataset-detail.scss +5 -4
  10. package/dataset/style/_o-pry-dataset.scss +0 -1
  11. package/esm2022/components/page-loader/page-loader.component.mjs +15 -0
  12. package/esm2022/components/page-loader/page-loader.module.mjs +16 -0
  13. package/esm2022/components/page-loader/provoly-dashboard-components-page-loader.mjs +5 -0
  14. package/esm2022/components/page-loader/public-api.mjs +3 -0
  15. package/esm2022/components/text-editor/text-editor.module.mjs +25 -5
  16. package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +14 -5
  17. package/esm2022/dataset/i18n/en.translations.mjs +9 -3
  18. package/esm2022/dataset/i18n/fr.translations.mjs +9 -3
  19. package/esm2022/dataset/style/css.component.mjs +2 -2
  20. package/esm2022/lib/core/components/edit-input/edit-input.component.mjs +12 -4
  21. package/esm2022/lib/core/i18n/en.translations.mjs +3 -3
  22. package/esm2022/lib/core/i18n/fr.translations.mjs +3 -3
  23. package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
  24. package/esm2022/lib/core/model/widget-aggregated-chart-manifest.interface.mjs +1 -1
  25. package/esm2022/lib/core/store/data-source/data-source.actions.mjs +4 -1
  26. package/esm2022/lib/core/store/data-source/data-source.effects.mjs +24 -2
  27. package/esm2022/lib/core/store/data-source/data-source.service.mjs +6 -1
  28. package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -1
  29. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +2 -2
  30. package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +4 -4
  31. package/esm2022/lib/dashboard/store/manifest.service.mjs +4 -3
  32. package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +8 -5
  33. package/esm2022/presentation/presentation.module.mjs +8 -4
  34. package/esm2022/presentation/style/css.component.mjs +2 -2
  35. package/esm2022/toolbox/components/dashboard-details/dashboard-details.component.mjs +6 -4
  36. package/esm2022/toolbox/toolbox.module.mjs +8 -4
  37. package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +21 -5
  38. package/esm2022/widgets/widget-aggregated-chart/i18n/en.translations.mjs +2 -2
  39. package/esm2022/widgets/widget-aggregated-chart/i18n/fr.translations.mjs +2 -2
  40. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +37 -10
  41. package/fesm2022/provoly-dashboard-components-page-loader.mjs +35 -0
  42. package/fesm2022/provoly-dashboard-components-page-loader.mjs.map +1 -0
  43. package/fesm2022/provoly-dashboard-components-text-editor.mjs +24 -4
  44. package/fesm2022/provoly-dashboard-components-text-editor.mjs.map +1 -1
  45. package/fesm2022/provoly-dashboard-dataset.mjs +31 -10
  46. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  47. package/fesm2022/provoly-dashboard-presentation.mjs +16 -9
  48. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  49. package/fesm2022/provoly-dashboard-toolbox.mjs +11 -6
  50. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  51. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +22 -6
  52. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
  53. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +36 -9
  54. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  55. package/fesm2022/provoly-dashboard.mjs +68 -17
  56. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  57. package/lib/core/components/edit-input/edit-input.component.d.ts +2 -1
  58. package/lib/core/model/manifest.interface.d.ts +1 -1
  59. package/lib/core/model/widget-aggregated-chart-manifest.interface.d.ts +1 -1
  60. package/lib/core/store/data-source/data-source.actions.d.ts +15 -0
  61. package/lib/core/store/data-source/data-source.effects.d.ts +14 -6
  62. package/lib/core/store/data-source/data-source.service.d.ts +1 -0
  63. package/lib/dashboard/store/dashboard.actions.d.ts +4 -5
  64. package/lib/dashboard/store/dashboard.effects.d.ts +0 -1
  65. package/lib/dashboard/store/dashboard.selectors.d.ts +0 -8
  66. package/lib/dashboard/store/manifest.service.d.ts +1 -1
  67. package/package.json +25 -19
  68. package/presentation/presentation.module.d.ts +2 -1
  69. package/presentation/style/_o-pry-new-presentation.scss +9 -1
  70. package/styles/components/_m-form-label-field.scss +0 -11
  71. package/styles/components/_o-page-loader.scss +34 -0
  72. package/styles/components/_o-pry-edit.scss +17 -16
  73. package/styles/components/_o-text-panel.scss +0 -2
  74. package/styles/main.scss +1 -0
  75. package/styles-theme/abstracts-theme/variables/_variables-decoration.scss +13 -0
  76. package/toolbox/components/dashboard-details/dashboard-details.component.d.ts +2 -2
  77. package/toolbox/toolbox.module.d.ts +2 -1
  78. package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +2 -1
@@ -0,0 +1,35 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Input, NgModule } from '@angular/core';
3
+
4
+ class PryPageLoaderComponent {
5
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryPageLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryPageLoaderComponent, selector: "pry-page-loader", inputs: { image: "image", imageAltText: "imageAltText" }, ngImport: i0, template: "<div class=\"o-page-loader\">\n <div class=\"o-page-loader__shapes\"></div>\n @if (image) {\n <img class=\"o-page-loader__image\" [src]=\"image\" [alt]=\"imageAltText\" />\n }\n</div>\n" }); }
7
+ }
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryPageLoaderComponent, decorators: [{
9
+ type: Component,
10
+ args: [{ selector: 'pry-page-loader', template: "<div class=\"o-page-loader\">\n <div class=\"o-page-loader__shapes\"></div>\n @if (image) {\n <img class=\"o-page-loader__image\" [src]=\"image\" [alt]=\"imageAltText\" />\n }\n</div>\n" }]
11
+ }], propDecorators: { image: [{
12
+ type: Input
13
+ }], imageAltText: [{
14
+ type: Input
15
+ }] } });
16
+
17
+ class PryPageLoaderModule {
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryPageLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
19
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PryPageLoaderModule, declarations: [PryPageLoaderComponent], exports: [PryPageLoaderComponent] }); }
20
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryPageLoaderModule }); }
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryPageLoaderModule, decorators: [{
23
+ type: NgModule,
24
+ args: [{
25
+ declarations: [PryPageLoaderComponent],
26
+ exports: [PryPageLoaderComponent]
27
+ }]
28
+ }] });
29
+
30
+ /**
31
+ * Generated bundle index. Do not edit.
32
+ */
33
+
34
+ export { PryPageLoaderComponent, PryPageLoaderModule };
35
+ //# sourceMappingURL=provoly-dashboard-components-page-loader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provoly-dashboard-components-page-loader.mjs","sources":["../../../../projects/provoly/dashboard/components/page-loader/page-loader.component.ts","../../../../projects/provoly/dashboard/components/page-loader/page-loader.component.html","../../../../projects/provoly/dashboard/components/page-loader/page-loader.module.ts","../../../../projects/provoly/dashboard/components/page-loader/provoly-dashboard-components-page-loader.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'pry-page-loader',\n templateUrl: 'page-loader.component.html'\n})\nexport class PryPageLoaderComponent {\n @Input() image?: string;\n @Input() imageAltText?: string;\n}\n","<div class=\"o-page-loader\">\n <div class=\"o-page-loader__shapes\"></div>\n @if (image) {\n <img class=\"o-page-loader__image\" [src]=\"image\" [alt]=\"imageAltText\" />\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { PryPageLoaderComponent } from './page-loader.component';\n\n@NgModule({\n declarations: [PryPageLoaderComponent],\n exports: [PryPageLoaderComponent]\n})\nexport class PryPageLoaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,iHCNnC,iMAMA,EAAA,CAAA,CAAA,EAAA;;2FDAa,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;+BACE,iBAAiB,EAAA,QAAA,EAAA,iMAAA,EAAA,CAAA;8BAIlB,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;;;MEDK,mBAAmB,CAAA;8GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAnB,mBAAmB,EAAA,YAAA,EAAA,CAHf,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAC3B,sBAAsB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAErB,mBAAmB,EAAA,CAAA,CAAA,EAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
@@ -9,7 +9,6 @@ import { Subject, distinctUntilChanged } from 'rxjs';
9
9
  import { debounceTime } from 'rxjs/operators';
10
10
  import { marked } from 'marked';
11
11
  import { CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
12
- import { PryToolboxModule } from '@provoly/dashboard/toolbox';
13
12
 
14
13
  class PryTextEditorCssComponent {
15
14
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryTextEditorCssComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -336,15 +335,36 @@ class PryTextEditorModule {
336
335
  this.pryTranslateService.addLangObject('en', 'textEditor', enTranslations);
337
336
  }
338
337
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryTextEditorModule, deps: [{ token: i3.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
339
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PryTextEditorModule, declarations: [PryTextEditorComponent, PryTextEditorCssComponent, MdToHtmlPipe], imports: [CommonModule, FormsModule, ReactiveFormsModule, PryCoreModule, PryIconModule, PryI18nModule, CdkOverlayOrigin, CdkConnectedOverlay, PryToolboxModule], exports: [PryTextEditorComponent, MdToHtmlPipe] }); }
340
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryTextEditorModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, PryCoreModule, PryIconModule, PryI18nModule, PryToolboxModule] }); }
338
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PryTextEditorModule, declarations: [PryTextEditorComponent, PryTextEditorCssComponent, MdToHtmlPipe], imports: [CommonModule,
339
+ FormsModule,
340
+ ReactiveFormsModule,
341
+ PryCoreModule,
342
+ PryIconModule,
343
+ PryI18nModule,
344
+ CdkOverlayOrigin,
345
+ CdkConnectedOverlay], exports: [PryTextEditorComponent, MdToHtmlPipe] }); }
346
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryTextEditorModule, imports: [CommonModule,
347
+ FormsModule,
348
+ ReactiveFormsModule,
349
+ PryCoreModule,
350
+ PryIconModule,
351
+ PryI18nModule] }); }
341
352
  }
342
353
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryTextEditorModule, decorators: [{
343
354
  type: NgModule,
344
355
  args: [{
345
356
  declarations: [PryTextEditorComponent, PryTextEditorCssComponent, MdToHtmlPipe],
346
357
  exports: [PryTextEditorComponent, MdToHtmlPipe],
347
- imports: [CommonModule, FormsModule, ReactiveFormsModule, PryCoreModule, PryIconModule, PryI18nModule, CdkOverlayOrigin, CdkConnectedOverlay, PryToolboxModule]
358
+ imports: [
359
+ CommonModule,
360
+ FormsModule,
361
+ ReactiveFormsModule,
362
+ PryCoreModule,
363
+ PryIconModule,
364
+ PryI18nModule,
365
+ CdkOverlayOrigin,
366
+ CdkConnectedOverlay
367
+ ]
348
368
  }]
349
369
  }], ctorParameters: () => [{ type: i3.PryI18nService }] });
350
370
 
@@ -1 +1 @@
1
- {"version":3,"file":"provoly-dashboard-components-text-editor.mjs","sources":["../../../../projects/provoly/dashboard/components/text-editor/style/css.component.ts","../../../../projects/provoly/dashboard/components/text-editor/service/text-editor.service.ts","../../../../projects/provoly/dashboard/components/text-editor/mdToHtml.pipe.ts","../../../../projects/provoly/dashboard/components/text-editor/component/text-editor.component.ts","../../../../projects/provoly/dashboard/components/text-editor/component/text-editor.component.html","../../../../projects/provoly/dashboard/components/text-editor/i18n/en.translations.ts","../../../../projects/provoly/dashboard/components/text-editor/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/components/text-editor/text-editor.module.ts","../../../../projects/provoly/dashboard/components/text-editor/provoly-dashboard-components-text-editor.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-text-editor-css',\n template: '',\n styleUrls: ['./_o-text-editor.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryTextEditorCssComponent {}\n","import { Injectable } from '@angular/core';\n\nexport const mdStyles = {\n h1: '# ',\n h2: '## ',\n h3: '### ',\n h4: '#### ',\n h5: '##### ',\n h6: '###### ',\n bold: '**',\n italic: '*',\n underline: '<u>',\n strikeThrough: '~~',\n code: '`',\n blockquote: '> ',\n list: '- ',\n orderedList: '\\\\d+\\\\. ',\n table: '| | |\\n| --- | --- |\\n| | |',\n details: '<details>\\n<summary></summary>\\n'\n};\n\nexport type MdStyle = keyof typeof mdStyles;\n\nexport const wrapperStyles: MdStyle[] = ['bold', 'italic', 'underline', 'strikeThrough', 'code'];\nexport const selfClosingStyles: MdStyle[] = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\nexport const listStyles: MdStyle[] = ['blockquote', 'list', 'orderedList'];\nexport const otherStyles: MdStyle[] = ['table', 'details'];\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TextEditorService {\n constructor() {}\n\n getClosingTag(style: MdStyle) {\n switch (style) {\n case 'underline':\n return '</u>';\n case 'details':\n return '\\n</details>';\n case 'bold':\n case 'italic':\n case 'strikeThrough':\n case 'code':\n return mdStyles[style];\n default:\n return '';\n }\n }\n\n addMarkdown(text: string, style: MdStyle) {\n if (wrapperStyles.includes(style)) {\n return this.toggleWrapperStyle(text, style);\n }\n if (selfClosingStyles.includes(style)) {\n return this.toggleSelfClosingStyle(text, style);\n }\n if (listStyles.includes(style)) {\n return this.toggleListStyle(text, style);\n }\n if (otherStyles.includes(style)) {\n return this.insertOtherStyle(text, style);\n }\n console.error(`Markdown style ${style} not supported`);\n return text;\n }\n\n toggleWrapperStyle(text: string, style: MdStyle) {\n if (text.startsWith(mdStyles[style])) {\n const startRegex = new RegExp(`^${this.escapeRegExp(mdStyles[style])}`);\n const endRegex = new RegExp(`${this.escapeRegExp(this.getClosingTag(style))}$`);\n return text.replace(startRegex, '').replace(endRegex, '');\n }\n return `${mdStyles[style]}${text}${this.getClosingTag(style)}`;\n }\n\n toggleSelfClosingStyle(text: string, style: MdStyle) {\n if (text.startsWith(mdStyles[style])) {\n const startRegex = new RegExp(`^${this.escapeRegExp(mdStyles[style])}`);\n return text.replace(startRegex, '');\n }\n return `${mdStyles[style]}${text}`;\n }\n\n toggleListStyle(text: string, style: MdStyle) {\n const listStyle = mdStyles[style];\n const lines = text.split('\\n');\n const startRegex = new RegExp(`^${style === 'orderedList' ? listStyle : this.escapeRegExp(listStyle)}`);\n const isListAlready = lines.every((line) => startRegex.test(line));\n const newLines = lines.map((line, index) => {\n if (isListAlready) {\n return line.replace(startRegex, '');\n }\n return `${style === 'orderedList' ? (index + 1).toString() + '. ' : listStyle}${line}`;\n });\n return newLines.join('\\n');\n }\n\n insertOtherStyle(text: string, style: MdStyle) {\n return `${mdStyles[style]}${text}${this.getClosingTag(style)}`;\n }\n\n escapeRegExp(text: string): string {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n isListLine(line: string) {\n return /^(\\d+\\.|- |\\* |\\> )/.test(line);\n }\n\n isOrderedListLine(text: string) {\n return /^\\d+\\./.test(text);\n }\n\n getListCharacter(previousLine: string) {\n if (this.isOrderedListLine(previousLine)) {\n const match = previousLine.match(/^\\d+/)?.[0];\n return (parseInt(match ?? '1') + 1).toString() + '. ';\n }\n if (/^- /.test(previousLine)) {\n return '- ';\n }\n if (/^\\* /.test(previousLine)) {\n return '* ';\n }\n if (/^\\> /.test(previousLine)) {\n return '> ';\n }\n return 'list';\n }\n\n updateOrderedListLines(text: string) {\n let order = 1;\n return text\n .split('\\n')\n .map((line) => {\n if (/^\\d+\\./.test(line)) {\n return line.replace(/^\\d+\\. /, `${order++}. `);\n }\n order = 1;\n return line;\n })\n .join('\\n');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { marked } from 'marked';\n\n@Pipe({\n name: 'mdToHtml'\n})\nexport class MdToHtmlPipe implements PipeTransform {\n transform(value?: string): string | Promise<string> {\n return marked.parse(value ?? '');\n }\n}\n","import { Component, ElementRef, Input, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { listStyles, MdStyle, TextEditorService } from '../service/text-editor.service';\nimport { distinctUntilChanged, Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\n@Component({\n selector: 'pry-text-editor',\n templateUrl: 'text-editor.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: PryTextEditorComponent\n }\n ]\n})\nexport class PryTextEditorComponent implements ControlValueAccessor {\n value = '';\n onChange = (value: string) => {};\n onTouched = () => {};\n touched = false;\n disabled = false;\n valueChanged$ = new Subject<string>();\n\n @Input() tabView = true;\n tabs = ['write', 'preview'];\n activeTab = 'write';\n\n @ViewChild('textarea') textareaRef?: ElementRef<HTMLTextAreaElement>;\n buttons: { style: MdStyle; icon: string }[] = [\n { style: 'h3', icon: 'format_title' },\n { style: 'bold', icon: 'format_bold' },\n { style: 'italic', icon: 'format_italic' },\n { style: 'underline', icon: 'format_underlined' },\n { style: 'strikeThrough', icon: 'format_strikethrough' },\n { style: 'blockquote', icon: 'format_quote' },\n { style: 'list', icon: 'format_list_bulleted' },\n { style: 'orderedList', icon: 'format_list_numbered' },\n { style: 'table', icon: 'format_table' },\n { style: 'details', icon: 'format_details' }\n ];\n\n constructor(private service: TextEditorService) {\n this.valueChanged$.pipe(debounceTime(500), distinctUntilChanged()).subscribe((value) => {\n this.onChange(value);\n });\n }\n\n writeValue(value: string) {\n this.value = value;\n }\n\n registerOnChange(onChange: any) {\n this.onChange = onChange;\n }\n\n registerOnTouched(onTouched: any) {\n this.onTouched = onTouched;\n }\n\n markAsTouched() {\n if (!this.touched) {\n this.onTouched();\n this.touched = true;\n }\n }\n\n setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n onValueChange($event: string) {\n this.valueChanged$.next($event);\n }\n\n get textarea(): HTMLTextAreaElement {\n return this.textareaRef!.nativeElement;\n }\n\n getActiveTabIndex(): number {\n return this.tabs.findIndex((t) => t === this.activeTab);\n }\n\n formatText(style: MdStyle) {\n const start = listStyles.includes(style) ? this.getSelectionLineIndex() : this.textarea.selectionStart,\n selection = this.value.substring(start, this.textarea.selectionEnd);\n\n this.writeValue(this.getUpdatedValue(this.service.addMarkdown(selection, style), start));\n this.onChange(this.value);\n\n this.focusSelection(start, start + this.service.addMarkdown(selection, style).length);\n }\n\n getUpdatedValue(value: string, lineStart?: number) {\n const len = this.value.length,\n start = lineStart ?? this.textarea.selectionStart;\n return this.value.substring(0, start) + value + this.value.substring(this.textarea.selectionEnd, len);\n }\n\n getSelectionLineIndex() {\n const previousNewlineIndex = this.value.substring(0, this.textarea.selectionStart).lastIndexOf('\\n');\n return previousNewlineIndex ? previousNewlineIndex + 1 : 0;\n }\n\n focusSelection(start: number, end: number) {\n setTimeout(() => {\n this.textarea.focus();\n this.textarea.setSelectionRange(start, end);\n });\n }\n\n insertListStyleCharacter() {\n setTimeout(() => {\n const start = 0;\n const end = this.textarea.selectionStart;\n const text = this.value.substring(start, end);\n const previousLine = text?.split('\\n')[text?.split('\\n').length - 2];\n if (previousLine && this.service.isListLine(previousLine)) {\n const updatedValue = this.getUpdatedValue(this.service.getListCharacter(previousLine));\n this.writeValue(\n this.service.isOrderedListLine(previousLine)\n ? this.service.updateOrderedListLines(updatedValue)\n : updatedValue\n );\n this.onChange(this.value);\n }\n });\n }\n}\n","<pry-text-editor-css></pry-text-editor-css>\n<div class=\"o-text-editor\">\n <div class=\"o-text-editor__header\">\n <div class=\"o-text-editor__buttons\">\n @for (button of buttons; track button.style) {\n <button\n type=\"button\"\n class=\"o-text-editor__button a-tooltip\"\n (click)=\"formatText(button.style)\"\n [attr.data-tooltip]=\"'@pry.component.textEditor.' + button.style | i18n\"\n data-tooltip-position=\"bottom\"\n [attr.aria-label]=\"'@pry.component.textEditor.' + button.style | i18n\"\n >\n <pry-icon [height]=\"16\" [width]=\"16\" [iconSvg]=\"button.icon\"></pry-icon>\n </button>\n }\n </div>\n </div>\n <div class=\"o-text-editor__content\">\n @if (tabView) {\n <div\n class=\"o-text-editor__tab-panel\"\n [id]=\"'text-editor-panel-' + activeTab\"\n [attr.aria-labelledby]=\"'text-editor-tab-' + getActiveTabIndex()\"\n >\n @if (activeTab === 'write') {\n <textarea\n class=\"o-text-editor__textarea a-form-field -full-width -remove-corner-radius\"\n cols=\"64\"\n rows=\"10\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [attr.aria-label]=\"'@pry.component.textEditor.textAreaLabel' | i18n\"\n (keydown.enter)=\"insertListStyleCharacter()\"\n #textarea\n >\n </textarea>\n } @else {\n <div class=\"o-text-editor__preview\" [innerHTML]=\"value | mdToHtml\"></div>\n }\n </div>\n } @else {\n <textarea\n class=\"o-text-editor__textarea a-form-field -half-width\"\n cols=\"64\"\n rows=\"10\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [attr.aria-label]=\"'@pry.component.textEditor.textAreaLabel' | i18n\"\n (keydown.enter)=\"insertListStyleCharacter()\"\n #textarea\n >\n </textarea>\n <div class=\"o-text-editor__preview\" [innerHTML]=\"value | mdToHtml\"></div>\n }\n </div>\n @if (tabView) {\n <div class=\"o-text-editor__tabs\">\n @for (tab of tabs; track tab; let i = $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"o-text-editor__tab\"\n [id]=\"'text-editor-tab-' + i\"\n [class.-active]=\"tab === activeTab\"\n [attr.aria-selected]=\"tab === activeTab\"\n [attr.aria-controls]=\"'text-editor-panel-' + activeTab\"\n (click)=\"activeTab = tab\"\n >\n {{ '@pry.component.textEditor.' + tab | i18n }}\n </button>\n }\n </div>\n }\n</div>\n","export const enTranslations = {\n '@pry': {\n component: {\n textEditor: {\n textAreaLabel: 'Text editor',\n preview: 'Preview',\n write: 'Write',\n h3: 'Title',\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n strikeThrough: 'Strikethrough',\n blockquote: 'Quote',\n list: 'List',\n orderedList: 'Ordered list',\n table: 'Table',\n details: 'Details',\n more: 'More'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n component: {\n textEditor: {\n textAreaLabel: 'Éditeur de texte',\n preview: 'Aperçu',\n write: 'Écrire',\n h3: 'Titre',\n bold: 'Gras',\n italic: 'Italique',\n underline: 'Souligné',\n strikeThrough: 'Barré',\n blockquote: 'Citation',\n list: 'Liste',\n orderedList: 'Liste ordonnée',\n table: 'Tableau',\n details: 'Détails',\n more: 'Voir plus'\n }\n }\n }\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { PryCoreModule, PryI18nModule, PryI18nService, PryIconModule } from '@provoly/dashboard';\nimport { PryTextEditorCssComponent } from './style/css.component';\nimport { PryTextEditorComponent } from './component/text-editor.component';\nimport { MdToHtmlPipe } from './mdToHtml.pipe';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { PryToolboxModule } from '@provoly/dashboard/toolbox';\n\n@NgModule({\n declarations: [PryTextEditorComponent, PryTextEditorCssComponent, MdToHtmlPipe],\n exports: [PryTextEditorComponent, MdToHtmlPipe],\n imports: [CommonModule, FormsModule, ReactiveFormsModule, PryCoreModule, PryIconModule, PryI18nModule, CdkOverlayOrigin, CdkConnectedOverlay, PryToolboxModule]\n})\nexport class PryTextEditorModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'textEditor', frTranslations);\n this.pryTranslateService.addLangObject('en', 'textEditor', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TextEditorService","i4.PryTextEditorCssComponent","i5.MdToHtmlPipe","i1"],"mappings":";;;;;;;;;;;;;MAQa,yBAAyB,CAAA;8GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,2DAJ1B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,4qIAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EACrB,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,4qIAAA,CAAA,EAAA,CAAA;;;ACJ1B,MAAA,QAAQ,GAAG;AACtB,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,EAAE,EAAE,KAAK;AACT,IAAA,EAAE,EAAE,MAAM;AACV,IAAA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AmB,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,CAAA,EAAA,OAAA,EAAA,CADpJ,sBAAsB,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAGnC,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,mBAAmB,EAFpB,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAyC,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEnJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,yBAAyB,EAAE,YAAY,CAAC;AAC/E,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,YAAY,CAAC;AAC/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;AAChK,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"provoly-dashboard-components-text-editor.mjs","sources":["../../../../projects/provoly/dashboard/components/text-editor/style/css.component.ts","../../../../projects/provoly/dashboard/components/text-editor/service/text-editor.service.ts","../../../../projects/provoly/dashboard/components/text-editor/mdToHtml.pipe.ts","../../../../projects/provoly/dashboard/components/text-editor/component/text-editor.component.ts","../../../../projects/provoly/dashboard/components/text-editor/component/text-editor.component.html","../../../../projects/provoly/dashboard/components/text-editor/i18n/en.translations.ts","../../../../projects/provoly/dashboard/components/text-editor/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/components/text-editor/text-editor.module.ts","../../../../projects/provoly/dashboard/components/text-editor/provoly-dashboard-components-text-editor.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-text-editor-css',\n template: '',\n styleUrls: ['./_o-text-editor.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryTextEditorCssComponent {}\n","import { Injectable } from '@angular/core';\n\nexport const mdStyles = {\n h1: '# ',\n h2: '## ',\n h3: '### ',\n h4: '#### ',\n h5: '##### ',\n h6: '###### ',\n bold: '**',\n italic: '*',\n underline: '<u>',\n strikeThrough: '~~',\n code: '`',\n blockquote: '> ',\n list: '- ',\n orderedList: '\\\\d+\\\\. ',\n table: '| | |\\n| --- | --- |\\n| | |',\n details: '<details>\\n<summary></summary>\\n'\n};\n\nexport type MdStyle = keyof typeof mdStyles;\n\nexport const wrapperStyles: MdStyle[] = ['bold', 'italic', 'underline', 'strikeThrough', 'code'];\nexport const selfClosingStyles: MdStyle[] = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\nexport const listStyles: MdStyle[] = ['blockquote', 'list', 'orderedList'];\nexport const otherStyles: MdStyle[] = ['table', 'details'];\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TextEditorService {\n constructor() {}\n\n getClosingTag(style: MdStyle) {\n switch (style) {\n case 'underline':\n return '</u>';\n case 'details':\n return '\\n</details>';\n case 'bold':\n case 'italic':\n case 'strikeThrough':\n case 'code':\n return mdStyles[style];\n default:\n return '';\n }\n }\n\n addMarkdown(text: string, style: MdStyle) {\n if (wrapperStyles.includes(style)) {\n return this.toggleWrapperStyle(text, style);\n }\n if (selfClosingStyles.includes(style)) {\n return this.toggleSelfClosingStyle(text, style);\n }\n if (listStyles.includes(style)) {\n return this.toggleListStyle(text, style);\n }\n if (otherStyles.includes(style)) {\n return this.insertOtherStyle(text, style);\n }\n console.error(`Markdown style ${style} not supported`);\n return text;\n }\n\n toggleWrapperStyle(text: string, style: MdStyle) {\n if (text.startsWith(mdStyles[style])) {\n const startRegex = new RegExp(`^${this.escapeRegExp(mdStyles[style])}`);\n const endRegex = new RegExp(`${this.escapeRegExp(this.getClosingTag(style))}$`);\n return text.replace(startRegex, '').replace(endRegex, '');\n }\n return `${mdStyles[style]}${text}${this.getClosingTag(style)}`;\n }\n\n toggleSelfClosingStyle(text: string, style: MdStyle) {\n if (text.startsWith(mdStyles[style])) {\n const startRegex = new RegExp(`^${this.escapeRegExp(mdStyles[style])}`);\n return text.replace(startRegex, '');\n }\n return `${mdStyles[style]}${text}`;\n }\n\n toggleListStyle(text: string, style: MdStyle) {\n const listStyle = mdStyles[style];\n const lines = text.split('\\n');\n const startRegex = new RegExp(`^${style === 'orderedList' ? listStyle : this.escapeRegExp(listStyle)}`);\n const isListAlready = lines.every((line) => startRegex.test(line));\n const newLines = lines.map((line, index) => {\n if (isListAlready) {\n return line.replace(startRegex, '');\n }\n return `${style === 'orderedList' ? (index + 1).toString() + '. ' : listStyle}${line}`;\n });\n return newLines.join('\\n');\n }\n\n insertOtherStyle(text: string, style: MdStyle) {\n return `${mdStyles[style]}${text}${this.getClosingTag(style)}`;\n }\n\n escapeRegExp(text: string): string {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n isListLine(line: string) {\n return /^(\\d+\\.|- |\\* |\\> )/.test(line);\n }\n\n isOrderedListLine(text: string) {\n return /^\\d+\\./.test(text);\n }\n\n getListCharacter(previousLine: string) {\n if (this.isOrderedListLine(previousLine)) {\n const match = previousLine.match(/^\\d+/)?.[0];\n return (parseInt(match ?? '1') + 1).toString() + '. ';\n }\n if (/^- /.test(previousLine)) {\n return '- ';\n }\n if (/^\\* /.test(previousLine)) {\n return '* ';\n }\n if (/^\\> /.test(previousLine)) {\n return '> ';\n }\n return 'list';\n }\n\n updateOrderedListLines(text: string) {\n let order = 1;\n return text\n .split('\\n')\n .map((line) => {\n if (/^\\d+\\./.test(line)) {\n return line.replace(/^\\d+\\. /, `${order++}. `);\n }\n order = 1;\n return line;\n })\n .join('\\n');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { marked } from 'marked';\n\n@Pipe({\n name: 'mdToHtml'\n})\nexport class MdToHtmlPipe implements PipeTransform {\n transform(value?: string): string | Promise<string> {\n return marked.parse(value ?? '');\n }\n}\n","import { Component, ElementRef, Input, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { listStyles, MdStyle, TextEditorService } from '../service/text-editor.service';\nimport { distinctUntilChanged, Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\n@Component({\n selector: 'pry-text-editor',\n templateUrl: 'text-editor.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: PryTextEditorComponent\n }\n ]\n})\nexport class PryTextEditorComponent implements ControlValueAccessor {\n value = '';\n onChange = (value: string) => {};\n onTouched = () => {};\n touched = false;\n disabled = false;\n valueChanged$ = new Subject<string>();\n\n @Input() tabView = true;\n tabs = ['write', 'preview'];\n activeTab = 'write';\n\n @ViewChild('textarea') textareaRef?: ElementRef<HTMLTextAreaElement>;\n buttons: { style: MdStyle; icon: string }[] = [\n { style: 'h3', icon: 'format_title' },\n { style: 'bold', icon: 'format_bold' },\n { style: 'italic', icon: 'format_italic' },\n { style: 'underline', icon: 'format_underlined' },\n { style: 'strikeThrough', icon: 'format_strikethrough' },\n { style: 'blockquote', icon: 'format_quote' },\n { style: 'list', icon: 'format_list_bulleted' },\n { style: 'orderedList', icon: 'format_list_numbered' },\n { style: 'table', icon: 'format_table' },\n { style: 'details', icon: 'format_details' }\n ];\n\n constructor(private service: TextEditorService) {\n this.valueChanged$.pipe(debounceTime(500), distinctUntilChanged()).subscribe((value) => {\n this.onChange(value);\n });\n }\n\n writeValue(value: string) {\n this.value = value;\n }\n\n registerOnChange(onChange: any) {\n this.onChange = onChange;\n }\n\n registerOnTouched(onTouched: any) {\n this.onTouched = onTouched;\n }\n\n markAsTouched() {\n if (!this.touched) {\n this.onTouched();\n this.touched = true;\n }\n }\n\n setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n onValueChange($event: string) {\n this.valueChanged$.next($event);\n }\n\n get textarea(): HTMLTextAreaElement {\n return this.textareaRef!.nativeElement;\n }\n\n getActiveTabIndex(): number {\n return this.tabs.findIndex((t) => t === this.activeTab);\n }\n\n formatText(style: MdStyle) {\n const start = listStyles.includes(style) ? this.getSelectionLineIndex() : this.textarea.selectionStart,\n selection = this.value.substring(start, this.textarea.selectionEnd);\n\n this.writeValue(this.getUpdatedValue(this.service.addMarkdown(selection, style), start));\n this.onChange(this.value);\n\n this.focusSelection(start, start + this.service.addMarkdown(selection, style).length);\n }\n\n getUpdatedValue(value: string, lineStart?: number) {\n const len = this.value.length,\n start = lineStart ?? this.textarea.selectionStart;\n return this.value.substring(0, start) + value + this.value.substring(this.textarea.selectionEnd, len);\n }\n\n getSelectionLineIndex() {\n const previousNewlineIndex = this.value.substring(0, this.textarea.selectionStart).lastIndexOf('\\n');\n return previousNewlineIndex ? previousNewlineIndex + 1 : 0;\n }\n\n focusSelection(start: number, end: number) {\n setTimeout(() => {\n this.textarea.focus();\n this.textarea.setSelectionRange(start, end);\n });\n }\n\n insertListStyleCharacter() {\n setTimeout(() => {\n const start = 0;\n const end = this.textarea.selectionStart;\n const text = this.value.substring(start, end);\n const previousLine = text?.split('\\n')[text?.split('\\n').length - 2];\n if (previousLine && this.service.isListLine(previousLine)) {\n const updatedValue = this.getUpdatedValue(this.service.getListCharacter(previousLine));\n this.writeValue(\n this.service.isOrderedListLine(previousLine)\n ? this.service.updateOrderedListLines(updatedValue)\n : updatedValue\n );\n this.onChange(this.value);\n }\n });\n }\n}\n","<pry-text-editor-css></pry-text-editor-css>\n<div class=\"o-text-editor\">\n <div class=\"o-text-editor__header\">\n <div class=\"o-text-editor__buttons\">\n @for (button of buttons; track button.style) {\n <button\n type=\"button\"\n class=\"o-text-editor__button a-tooltip\"\n (click)=\"formatText(button.style)\"\n [attr.data-tooltip]=\"'@pry.component.textEditor.' + button.style | i18n\"\n data-tooltip-position=\"bottom\"\n [attr.aria-label]=\"'@pry.component.textEditor.' + button.style | i18n\"\n >\n <pry-icon [height]=\"16\" [width]=\"16\" [iconSvg]=\"button.icon\"></pry-icon>\n </button>\n }\n </div>\n </div>\n <div class=\"o-text-editor__content\">\n @if (tabView) {\n <div\n class=\"o-text-editor__tab-panel\"\n [id]=\"'text-editor-panel-' + activeTab\"\n [attr.aria-labelledby]=\"'text-editor-tab-' + getActiveTabIndex()\"\n >\n @if (activeTab === 'write') {\n <textarea\n class=\"o-text-editor__textarea a-form-field -full-width -remove-corner-radius\"\n cols=\"64\"\n rows=\"10\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [attr.aria-label]=\"'@pry.component.textEditor.textAreaLabel' | i18n\"\n (keydown.enter)=\"insertListStyleCharacter()\"\n #textarea\n >\n </textarea>\n } @else {\n <div class=\"o-text-editor__preview\" [innerHTML]=\"value | mdToHtml\"></div>\n }\n </div>\n } @else {\n <textarea\n class=\"o-text-editor__textarea a-form-field -half-width\"\n cols=\"64\"\n rows=\"10\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [attr.aria-label]=\"'@pry.component.textEditor.textAreaLabel' | i18n\"\n (keydown.enter)=\"insertListStyleCharacter()\"\n #textarea\n >\n </textarea>\n <div class=\"o-text-editor__preview\" [innerHTML]=\"value | mdToHtml\"></div>\n }\n </div>\n @if (tabView) {\n <div class=\"o-text-editor__tabs\">\n @for (tab of tabs; track tab; let i = $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"o-text-editor__tab\"\n [id]=\"'text-editor-tab-' + i\"\n [class.-active]=\"tab === activeTab\"\n [attr.aria-selected]=\"tab === activeTab\"\n [attr.aria-controls]=\"'text-editor-panel-' + activeTab\"\n (click)=\"activeTab = tab\"\n >\n {{ '@pry.component.textEditor.' + tab | i18n }}\n </button>\n }\n </div>\n }\n</div>\n","export const enTranslations = {\n '@pry': {\n component: {\n textEditor: {\n textAreaLabel: 'Text editor',\n preview: 'Preview',\n write: 'Write',\n h3: 'Title',\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n strikeThrough: 'Strikethrough',\n blockquote: 'Quote',\n list: 'List',\n orderedList: 'Ordered list',\n table: 'Table',\n details: 'Details',\n more: 'More'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n component: {\n textEditor: {\n textAreaLabel: 'Éditeur de texte',\n preview: 'Aperçu',\n write: 'Écrire',\n h3: 'Titre',\n bold: 'Gras',\n italic: 'Italique',\n underline: 'Souligné',\n strikeThrough: 'Barré',\n blockquote: 'Citation',\n list: 'Liste',\n orderedList: 'Liste ordonnée',\n table: 'Tableau',\n details: 'Détails',\n more: 'Voir plus'\n }\n }\n }\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { PryCoreModule, PryI18nModule, PryI18nService, PryIconModule } from '@provoly/dashboard';\nimport { PryTextEditorCssComponent } from './style/css.component';\nimport { PryTextEditorComponent } from './component/text-editor.component';\nimport { MdToHtmlPipe } from './mdToHtml.pipe';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\n\n@NgModule({\n declarations: [PryTextEditorComponent, PryTextEditorCssComponent, MdToHtmlPipe],\n exports: [PryTextEditorComponent, MdToHtmlPipe],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n PryCoreModule,\n PryIconModule,\n PryI18nModule,\n CdkOverlayOrigin,\n CdkConnectedOverlay\n ]\n})\nexport class PryTextEditorModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'textEditor', frTranslations);\n this.pryTranslateService.addLangObject('en', 'textEditor', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TextEditorService","i4.PryTextEditorCssComponent","i5.MdToHtmlPipe","i1"],"mappings":";;;;;;;;;;;;MAQa,yBAAyB,CAAA;8GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,2DAJ1B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,4qIAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EACrB,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,4qIAAA,CAAA,EAAA,CAAA;;;ACJ1B,MAAA,QAAQ,GAAG;AACtB,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,EAAE,EAAE,KAAK;AACT,IAAA,EAAE,EAAE,MAAM;AACV,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,MAAM,EAAE,GAAG;AACX,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,WAAW,EAAE,UAAU;AAC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CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAV5B,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,aAAa;YACb,aAAa;YACb,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAd/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,yBAAyB,EAAE,YAAY,CAAC;AAC/E,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,YAAY,CAAC;AAC/C,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,gBAAgB;wBAChB,mBAAmB;AACpB,qBAAA;AACF,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
@@ -15,11 +15,11 @@ import { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';
15
15
 
16
16
  class PryDatasetCssComponent {
17
17
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetCssComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryDatasetCssComponent, selector: "pry-dataset-css", ngImport: i0, template: '', isInline: true, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.dataset-layout{display:flex;flex-direction:column;align-items:center}.dataset-layout__content{width:100%;padding:.625rem 1.25rem 3.125rem;height:100%;overflow:auto}.o-pry-dataset{display:grid;grid-template-columns:repeat(auto-fill,minmax(20.625rem,0fr));grid-gap:.625rem;column-gap:1.5rem;row-gap:2rem;padding-bottom:9.375rem}.o-pry-dataset__search{position:relative}.o-pry-dataset__search .a-icon{position:absolute;right:.6875rem;bottom:.5625rem;opacity:.5;pointer-events:none}.o-pry-dataset__item{display:flex;flex-direction:column;align-items:stretch}.o-dataset-layout{position:relative;z-index:1;overflow:hidden;height:100%}\n", ".o-pry-dataset-card{display:flex;flex-direction:column;align-items:stretch;position:relative;margin:0 auto;border-collapse:collapse;font-size:.875rem;min-width:20.625rem;height:9.375rem}.o-pry-dataset-card:hover{cursor:pointer}.o-pry-dataset-card:hover .o-pry-dataset-card__footer pry-icon{visibility:visible;opacity:1}.o-pry-dataset-card__header{display:flex;gap:.9375rem;padding:.625rem;max-width:20.625rem}.o-pry-dataset-card__description-container{position:relative;width:100%}.o-pry-dataset-card__description-container.a-tooltip[data-tooltip]:after{width:100%}.o-pry-dataset-card__txt{flex-grow:1;padding:.625rem .9375rem}.o-pry-dataset-card__txt .a-h3{font-size:.875rem}.o-pry-dataset-card__txt .a-p{font-size:.8125rem}.o-pry-dataset-card__txt .a-p.-date{margin-bottom:0}.o-pry-dataset-card__footer{display:flex;align-items:center;justify-content:center}.o-pry-dataset-card__footer .a-btn{margin-left:1.25rem}.o-pry-dataset-card__footer pry-icon{visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear;margin-left:.1875rem}.o-pry-dataset-card .dataset-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n", "pry-dataset-detail .o-dataset-layout__panel .version-information h1,pry-dataset-detail .o-dataset-layout__panel .version-information h2,pry-dataset-detail .o-dataset-layout__panel .version-information h3,pry-dataset-detail .o-dataset-layout__panel .version-information h4,pry-dataset-detail .o-dataset-layout__panel .version-information h5,pry-dataset-detail .o-dataset-layout__panel .version-information h6{padding:0;margin:0;color:#253043}pry-dataset-detail .o-dataset-layout__panel .version-information h5{font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information span,pry-dataset-detail .o-dataset-layout__panel .version-information p{font-size:.875rem;color:#263340;white-space:pre-wrap}pry-dataset-detail .o-dataset-layout__panel .version-information div{padding-bottom:10px}pry-dataset-detail .o-dataset-layout__panel .version-information ul,pry-dataset-detail .o-dataset-layout__panel .version-information ol{margin:0;line-height:1rem}pry-dataset-detail .o-dataset-layout__panel .version-information li{color:#253043;font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information table{border-collapse:collapse}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr th{padding-top:.75rem;padding-bottom:.75rem;text-align:left}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr td{padding:.75rem .5rem;text-align:left}pry-dataset-detail{height:100%;width:100%}pry-dataset-detail .o-dataset-layout{display:flex}pry-dataset-detail .o-dataset-layout__content{overflow:hidden;height:100%;padding-left:2rem;padding-top:1.25rem;flex:1}pry-dataset-detail .o-dataset-layout__panel{width:20.625rem;border-left:solid 1px #D8E7F7;padding:.625rem;font-size:.875rem;color:#263340}pry-dataset-detail .o-dataset-layout__panel .a-label{font-weight:700}pry-dataset-detail .o-dataset-layout .panel__content{gap:.9375rem}pry-dataset-detail .dashboard-container{height:100%}pry-dataset-detail .table-container{flex:1 1}pry-dataset-detail .table-container pry-icon{position:relative;top:.3125rem}pry-dataset-detail .state-button{text-decoration:underline}pry-dataset-detail .m-info-icon{margin:0 .5rem}.o-dataset-detail{height:80%}.o-dataset-detail__information{padding:.625rem;font-size:.875rem;color:#263340;background:#fff;border-radius:4px;gap:.9375rem}.o-dataset-detail__information .a-label{font-weight:700}.o-dataset-detail pry-tab-group{height:100%}.o-dataset-detail pry-tab-group .o-tabs{padding-left:2rem;padding-right:2rem;height:100%}.o-dataset-detail pry-tab-group .o-tabs__panel__content{height:100%}.o-dataset-detail tr{height:1.875rem}.o-dataset-detail tr.-selected{background-color:#f5f7f9}.o-dataset-detail td .a-btn+.a-btn{margin-left:.625rem}\n", ".o-dataset-version-form .a-label{font-weight:700}\n"], encapsulation: i0.ViewEncapsulation.None }); }
18
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryDatasetCssComponent, selector: "pry-dataset-css", ngImport: i0, template: '', isInline: true, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.dataset-layout{display:flex;flex-direction:column;align-items:center}.dataset-layout__content{width:100%;padding:.625rem 1.25rem 3.125rem;height:100%;overflow:auto}.o-pry-dataset{display:grid;grid-template-columns:repeat(auto-fill,minmax(20.625rem,0fr));grid-gap:.625rem;column-gap:1.5rem;row-gap:2rem;padding-bottom:9.375rem}.o-pry-dataset__search{position:relative}.o-pry-dataset__search .a-icon{position:absolute;right:.6875rem;bottom:.5625rem;opacity:.5;pointer-events:none}.o-pry-dataset__item{display:flex;flex-direction:column;align-items:stretch}.o-dataset-layout{position:relative;overflow:hidden;height:100%}\n", ".o-pry-dataset-card{display:flex;flex-direction:column;align-items:stretch;position:relative;margin:0 auto;border-collapse:collapse;font-size:.875rem;min-width:20.625rem;height:9.375rem}.o-pry-dataset-card:hover{cursor:pointer}.o-pry-dataset-card:hover .o-pry-dataset-card__footer pry-icon{visibility:visible;opacity:1}.o-pry-dataset-card__header{display:flex;gap:.9375rem;padding:.625rem;max-width:20.625rem}.o-pry-dataset-card__description-container{position:relative;width:100%}.o-pry-dataset-card__description-container.a-tooltip[data-tooltip]:after{width:100%}.o-pry-dataset-card__txt{flex-grow:1;padding:.625rem .9375rem}.o-pry-dataset-card__txt .a-h3{font-size:.875rem}.o-pry-dataset-card__txt .a-p{font-size:.8125rem}.o-pry-dataset-card__txt .a-p.-date{margin-bottom:0}.o-pry-dataset-card__footer{display:flex;align-items:center;justify-content:center}.o-pry-dataset-card__footer .a-btn{margin-left:1.25rem}.o-pry-dataset-card__footer pry-icon{visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear;margin-left:.1875rem}.o-pry-dataset-card .dataset-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n", "pry-dataset-detail .o-dataset-layout__panel .version-information h1,pry-dataset-detail .o-dataset-layout__panel .version-information h2,pry-dataset-detail .o-dataset-layout__panel .version-information h3,pry-dataset-detail .o-dataset-layout__panel .version-information h4,pry-dataset-detail .o-dataset-layout__panel .version-information h5,pry-dataset-detail .o-dataset-layout__panel .version-information h6{padding:0;margin:0;color:#253043}pry-dataset-detail .o-dataset-layout__panel .version-information h5{font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information span,pry-dataset-detail .o-dataset-layout__panel .version-information p{font-size:.875rem;color:#263340;white-space:pre-wrap}pry-dataset-detail .o-dataset-layout__panel .version-information div{padding-bottom:10px}pry-dataset-detail .o-dataset-layout__panel .version-information ul,pry-dataset-detail .o-dataset-layout__panel .version-information ol{margin:0;line-height:1rem}pry-dataset-detail .o-dataset-layout__panel .version-information li{color:#253043;font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information table{border-collapse:collapse}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr th{padding-top:.75rem;padding-bottom:.75rem;text-align:left}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr td{padding:.75rem .5rem;text-align:left}pry-dataset-detail{height:100%;width:100%}pry-dataset-detail .o-dataset-layout{display:flex}pry-dataset-detail .o-dataset-layout__content{overflow:hidden;height:100%;padding-left:2rem;padding-top:1.25rem;flex:1}pry-dataset-detail .o-dataset-layout__panel{width:20.625rem;border-left:solid 1px #D8E7F7;padding:.625rem;font-size:.875rem;color:#263340}pry-dataset-detail .o-dataset-layout__panel .a-label{font-weight:700}pry-dataset-detail .o-dataset-layout .panel__content{gap:.9375rem}pry-dataset-detail .dashboard-container{height:100%}pry-dataset-detail .table-container{flex:1 1}pry-dataset-detail .table-container pry-icon{position:relative;top:.3125rem}pry-dataset-detail .state-button{text-decoration:underline}pry-dataset-detail .m-info-icon{margin:0 .5rem}.o-dataset-detail{height:80%}.o-dataset-detail__content{height:100%;margin:0 2rem}.o-dataset-detail__information{padding:.625rem;font-size:.875rem;color:#263340;background:#fff;border-radius:4px;gap:.9375rem}.o-dataset-detail__information .a-label{font-weight:700}.o-dataset-detail pry-tab-group .o-tabs{height:100%}.o-dataset-detail pry-tab-group .o-tabs__panel__content{height:100%}.o-dataset-detail tr{height:1.875rem}.o-dataset-detail tr.-selected{background-color:#f5f7f9}.o-dataset-detail td .a-btn+.a-btn{margin-left:.625rem}\n", ".o-dataset-version-form .a-label{font-weight:700}\n"], encapsulation: i0.ViewEncapsulation.None }); }
19
19
  }
20
20
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetCssComponent, decorators: [{
21
21
  type: Component,
22
- args: [{ selector: 'pry-dataset-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.dataset-layout{display:flex;flex-direction:column;align-items:center}.dataset-layout__content{width:100%;padding:.625rem 1.25rem 3.125rem;height:100%;overflow:auto}.o-pry-dataset{display:grid;grid-template-columns:repeat(auto-fill,minmax(20.625rem,0fr));grid-gap:.625rem;column-gap:1.5rem;row-gap:2rem;padding-bottom:9.375rem}.o-pry-dataset__search{position:relative}.o-pry-dataset__search .a-icon{position:absolute;right:.6875rem;bottom:.5625rem;opacity:.5;pointer-events:none}.o-pry-dataset__item{display:flex;flex-direction:column;align-items:stretch}.o-dataset-layout{position:relative;z-index:1;overflow:hidden;height:100%}\n", ".o-pry-dataset-card{display:flex;flex-direction:column;align-items:stretch;position:relative;margin:0 auto;border-collapse:collapse;font-size:.875rem;min-width:20.625rem;height:9.375rem}.o-pry-dataset-card:hover{cursor:pointer}.o-pry-dataset-card:hover .o-pry-dataset-card__footer pry-icon{visibility:visible;opacity:1}.o-pry-dataset-card__header{display:flex;gap:.9375rem;padding:.625rem;max-width:20.625rem}.o-pry-dataset-card__description-container{position:relative;width:100%}.o-pry-dataset-card__description-container.a-tooltip[data-tooltip]:after{width:100%}.o-pry-dataset-card__txt{flex-grow:1;padding:.625rem .9375rem}.o-pry-dataset-card__txt .a-h3{font-size:.875rem}.o-pry-dataset-card__txt .a-p{font-size:.8125rem}.o-pry-dataset-card__txt .a-p.-date{margin-bottom:0}.o-pry-dataset-card__footer{display:flex;align-items:center;justify-content:center}.o-pry-dataset-card__footer .a-btn{margin-left:1.25rem}.o-pry-dataset-card__footer pry-icon{visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear;margin-left:.1875rem}.o-pry-dataset-card .dataset-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n", "pry-dataset-detail .o-dataset-layout__panel .version-information h1,pry-dataset-detail .o-dataset-layout__panel .version-information h2,pry-dataset-detail .o-dataset-layout__panel .version-information h3,pry-dataset-detail .o-dataset-layout__panel .version-information h4,pry-dataset-detail .o-dataset-layout__panel .version-information h5,pry-dataset-detail .o-dataset-layout__panel .version-information h6{padding:0;margin:0;color:#253043}pry-dataset-detail .o-dataset-layout__panel .version-information h5{font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information span,pry-dataset-detail .o-dataset-layout__panel .version-information p{font-size:.875rem;color:#263340;white-space:pre-wrap}pry-dataset-detail .o-dataset-layout__panel .version-information div{padding-bottom:10px}pry-dataset-detail .o-dataset-layout__panel .version-information ul,pry-dataset-detail .o-dataset-layout__panel .version-information ol{margin:0;line-height:1rem}pry-dataset-detail .o-dataset-layout__panel .version-information li{color:#253043;font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information table{border-collapse:collapse}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr th{padding-top:.75rem;padding-bottom:.75rem;text-align:left}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr td{padding:.75rem .5rem;text-align:left}pry-dataset-detail{height:100%;width:100%}pry-dataset-detail .o-dataset-layout{display:flex}pry-dataset-detail .o-dataset-layout__content{overflow:hidden;height:100%;padding-left:2rem;padding-top:1.25rem;flex:1}pry-dataset-detail .o-dataset-layout__panel{width:20.625rem;border-left:solid 1px #D8E7F7;padding:.625rem;font-size:.875rem;color:#263340}pry-dataset-detail .o-dataset-layout__panel .a-label{font-weight:700}pry-dataset-detail .o-dataset-layout .panel__content{gap:.9375rem}pry-dataset-detail .dashboard-container{height:100%}pry-dataset-detail .table-container{flex:1 1}pry-dataset-detail .table-container pry-icon{position:relative;top:.3125rem}pry-dataset-detail .state-button{text-decoration:underline}pry-dataset-detail .m-info-icon{margin:0 .5rem}.o-dataset-detail{height:80%}.o-dataset-detail__information{padding:.625rem;font-size:.875rem;color:#263340;background:#fff;border-radius:4px;gap:.9375rem}.o-dataset-detail__information .a-label{font-weight:700}.o-dataset-detail pry-tab-group{height:100%}.o-dataset-detail pry-tab-group .o-tabs{padding-left:2rem;padding-right:2rem;height:100%}.o-dataset-detail pry-tab-group .o-tabs__panel__content{height:100%}.o-dataset-detail tr{height:1.875rem}.o-dataset-detail tr.-selected{background-color:#f5f7f9}.o-dataset-detail td .a-btn+.a-btn{margin-left:.625rem}\n", ".o-dataset-version-form .a-label{font-weight:700}\n"] }]
22
+ args: [{ selector: 'pry-dataset-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-pry-dataset{margin:0;padding:0}.o-pry-dataset li{list-style:none}.dataset-layout{display:flex;flex-direction:column;align-items:center}.dataset-layout__content{width:100%;padding:.625rem 1.25rem 3.125rem;height:100%;overflow:auto}.o-pry-dataset{display:grid;grid-template-columns:repeat(auto-fill,minmax(20.625rem,0fr));grid-gap:.625rem;column-gap:1.5rem;row-gap:2rem;padding-bottom:9.375rem}.o-pry-dataset__search{position:relative}.o-pry-dataset__search .a-icon{position:absolute;right:.6875rem;bottom:.5625rem;opacity:.5;pointer-events:none}.o-pry-dataset__item{display:flex;flex-direction:column;align-items:stretch}.o-dataset-layout{position:relative;overflow:hidden;height:100%}\n", ".o-pry-dataset-card{display:flex;flex-direction:column;align-items:stretch;position:relative;margin:0 auto;border-collapse:collapse;font-size:.875rem;min-width:20.625rem;height:9.375rem}.o-pry-dataset-card:hover{cursor:pointer}.o-pry-dataset-card:hover .o-pry-dataset-card__footer pry-icon{visibility:visible;opacity:1}.o-pry-dataset-card__header{display:flex;gap:.9375rem;padding:.625rem;max-width:20.625rem}.o-pry-dataset-card__description-container{position:relative;width:100%}.o-pry-dataset-card__description-container.a-tooltip[data-tooltip]:after{width:100%}.o-pry-dataset-card__txt{flex-grow:1;padding:.625rem .9375rem}.o-pry-dataset-card__txt .a-h3{font-size:.875rem}.o-pry-dataset-card__txt .a-p{font-size:.8125rem}.o-pry-dataset-card__txt .a-p.-date{margin-bottom:0}.o-pry-dataset-card__footer{display:flex;align-items:center;justify-content:center}.o-pry-dataset-card__footer .a-btn{margin-left:1.25rem}.o-pry-dataset-card__footer pry-icon{visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear;margin-left:.1875rem}.o-pry-dataset-card .dataset-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n", "pry-dataset-detail .o-dataset-layout__panel .version-information h1,pry-dataset-detail .o-dataset-layout__panel .version-information h2,pry-dataset-detail .o-dataset-layout__panel .version-information h3,pry-dataset-detail .o-dataset-layout__panel .version-information h4,pry-dataset-detail .o-dataset-layout__panel .version-information h5,pry-dataset-detail .o-dataset-layout__panel .version-information h6{padding:0;margin:0;color:#253043}pry-dataset-detail .o-dataset-layout__panel .version-information h5{font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information span,pry-dataset-detail .o-dataset-layout__panel .version-information p{font-size:.875rem;color:#263340;white-space:pre-wrap}pry-dataset-detail .o-dataset-layout__panel .version-information div{padding-bottom:10px}pry-dataset-detail .o-dataset-layout__panel .version-information ul,pry-dataset-detail .o-dataset-layout__panel .version-information ol{margin:0;line-height:1rem}pry-dataset-detail .o-dataset-layout__panel .version-information li{color:#253043;font-size:.875rem}pry-dataset-detail .o-dataset-layout__panel .version-information table{border-collapse:collapse}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table thead tr th{padding-top:.75rem;padding-bottom:.75rem;text-align:left}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr{border-bottom-width:.0625rem;border-bottom-style:solid}pry-dataset-detail .o-dataset-layout__panel .version-information table tbody tr td{padding:.75rem .5rem;text-align:left}pry-dataset-detail{height:100%;width:100%}pry-dataset-detail .o-dataset-layout{display:flex}pry-dataset-detail .o-dataset-layout__content{overflow:hidden;height:100%;padding-left:2rem;padding-top:1.25rem;flex:1}pry-dataset-detail .o-dataset-layout__panel{width:20.625rem;border-left:solid 1px #D8E7F7;padding:.625rem;font-size:.875rem;color:#263340}pry-dataset-detail .o-dataset-layout__panel .a-label{font-weight:700}pry-dataset-detail .o-dataset-layout .panel__content{gap:.9375rem}pry-dataset-detail .dashboard-container{height:100%}pry-dataset-detail .table-container{flex:1 1}pry-dataset-detail .table-container pry-icon{position:relative;top:.3125rem}pry-dataset-detail .state-button{text-decoration:underline}pry-dataset-detail .m-info-icon{margin:0 .5rem}.o-dataset-detail{height:80%}.o-dataset-detail__content{height:100%;margin:0 2rem}.o-dataset-detail__information{padding:.625rem;font-size:.875rem;color:#263340;background:#fff;border-radius:4px;gap:.9375rem}.o-dataset-detail__information .a-label{font-weight:700}.o-dataset-detail pry-tab-group .o-tabs{height:100%}.o-dataset-detail pry-tab-group .o-tabs__panel__content{height:100%}.o-dataset-detail tr{height:1.875rem}.o-dataset-detail tr.-selected{background-color:#f5f7f9}.o-dataset-detail td .a-btn+.a-btn{margin-left:.625rem}\n", ".o-dataset-version-form .a-label{font-weight:700}\n"] }]
23
23
  }] });
24
24
 
25
25
  class PryDatasetCardComponent {
@@ -193,7 +193,9 @@ class PryDatasetDetailComponent extends SubscriptionnerDirective {
193
193
  switch(number) {
194
194
  this.tab = number;
195
195
  }
196
- handleButtonAction(version) {
196
+ handleButtonAction($event, version) {
197
+ $event.preventDefault();
198
+ $event.stopPropagation();
197
199
  this.selectedDatasetVersion = version;
198
200
  switch (version.state) {
199
201
  case 'ACTIVE':
@@ -206,7 +208,9 @@ class PryDatasetDetailComponent extends SubscriptionnerDirective {
206
208
  break;
207
209
  }
208
210
  }
209
- consultErrors(version) {
211
+ consultErrors($event, version) {
212
+ $event.preventDefault();
213
+ $event.stopPropagation();
210
214
  this.selectedDatasetVersion = version;
211
215
  this.showModalStatus = true;
212
216
  }
@@ -250,6 +254,7 @@ class PryDatasetDetailComponent extends SubscriptionnerDirective {
250
254
  }
251
255
  else {
252
256
  this.isPanelOpen = !this.isPanelOpen;
257
+ this.selectedVersion = undefined;
253
258
  }
254
259
  }
255
260
  editVersion() {
@@ -258,12 +263,16 @@ class PryDatasetDetailComponent extends SubscriptionnerDirective {
258
263
  formValidated($event) {
259
264
  this.isEditingVersion = false;
260
265
  }
266
+ askDelete(version, $event) {
267
+ this.store.dispatch(DataSourceActions.dataset.confirmDeleteVersion({ version }));
268
+ $event?.stopPropagation();
269
+ }
261
270
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetDetailComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
262
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: { dataset: "dataset" }, outputs: { goToCatalog: "goToCatalog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersion$ | async as activeVersion\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersion.id === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersion.id === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersion.id) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"version.state !== 'LOADING' && version.state !== 'INDEXING' && version.state !== 'ERROR'\"\n >\n <ng-container *ngIf=\"dataset.owner && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\">\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction(version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors(version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"], outputs: ["clickedTabIdx"] }, { kind: "component", type: i3.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i3.DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: i3.PryModalStatusComponent, selector: "pry-modal-status", inputs: ["version"], outputs: ["gotoConsult"] }, { kind: "component", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: ["version"], outputs: ["formValidated"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i5.PrySinceDatePipe, name: "sinceDate" }, { kind: "pipe", type: i4.MdToHtmlPipe, name: "mdToHtml" }] }); }
271
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryDatasetDetailComponent, selector: "pry-dataset-detail", inputs: { dataset: "dataset" }, outputs: { goToCatalog: "goToCatalog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersion$ | async as activeVersion\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersion.id === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersion.id === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersion.id) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"version.state !== 'LOADING' && version.state !== 'INDEXING' && version.state !== 'ERROR'\"\n >\n <ng-container *ngIf=\"dataset.owner && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\">\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE'\"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"], outputs: ["clickedTabIdx"] }, { kind: "component", type: i3.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i3.DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: i3.PryModalStatusComponent, selector: "pry-modal-status", inputs: ["version"], outputs: ["gotoConsult"] }, { kind: "component", type: PryDatasetVersionFormComponent, selector: "pry-dataset-version-form", inputs: ["version"], outputs: ["formValidated"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i5.PrySinceDatePipe, name: "sinceDate" }, { kind: "pipe", type: i4.MdToHtmlPipe, name: "mdToHtml" }] }); }
263
272
  }
264
273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryDatasetDetailComponent, decorators: [{
265
274
  type: Component,
266
- args: [{ selector: 'pry-dataset-detail', template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersion$ | async as activeVersion\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersion.id === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersion.id === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersion.id) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"version.state !== 'LOADING' && version.state !== 'INDEXING' && version.state !== 'ERROR'\"\n >\n <ng-container *ngIf=\"dataset.owner && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\">\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction(version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors(version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n" }]
275
+ args: [{ selector: 'pry-dataset-detail', template: "<div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--primary\" (click)=\"goBack()\">{{ '@pry.dataset.returnToList' | i18n }}</button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"refresh()\">\n {{ '@pry.dataset.refresh' | i18n }}\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<div class=\"o-dataset-layout\">\n <div class=\"o-dataset-layout__content\">\n <div class=\"a-p\">\n <h2 class=\"a-h1\">{{ dataset.name }}</h2>\n </div>\n\n <div class=\"o-dataset-detail\">\n <div class=\"o-dataset-detail__content\">\n <pry-tab-group translationStringBase=\"@pry.dataset.\" (clickedTabIdx)=\"onTabSwitch($event)\">\n <pry-tab [templateRef]=\"information\" name=\"information\"></pry-tab>\n <pry-tab [templateRef]=\"table\" name=\"data\"></pry-tab>\n <pry-tab [templateRef]=\"map\" name=\"map\"></pry-tab>\n <pry-tab [templateRef]=\"datasetVersions\" name=\"versionHistory\"></pry-tab>\n </pry-tab-group>\n </div>\n </div>\n </div>\n @if (isPanelOpen) {\n <div class=\"o-dataset-layout__panel\">\n <div class=\"panel__header u-display-flex -justify-space-between\">\n <h3>{{ '@pry.dataset.information' | i18n }}</h3>\n <button role=\"button\" (click)=\"togglePanel()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div class=\"panel__content u-display-flex -column\">\n @if (!isEditingVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (selectedVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ??\n ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ selectedVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"\n selectedVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\n \"\n ></div>\n </div>\n <button\n *pryAccess=\"{ module: 'admin', page: 'list-dataset', action: 'edit_version' }\"\n role=\"button\"\n class=\"a-btn a-btn--primary u-self-end\"\n (click)=\"editVersion()\"\n >\n {{ '@pry.action.edit' | i18n }}\n </button>\n } @else {\n <pry-dataset-version-form\n [version]=\"selectedVersion\"\n (formValidated)=\"formValidated($event)\"\n ></pry-dataset-version-form>\n }\n </div>\n </div>\n }\n</div>\n\n<ng-template #information>\n <div class=\"u-display-flex -column o-dataset-detail__information\">\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.description' | i18n }}</span>\n <span>{{ dataset.description ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n @if (activeVersion$ | async; as activeVersion) {\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.productionDate' | i18n }}</span>\n <span>{{\n (activeVersion?.productionDate | date: 'dd-MM-yyyy, HH:mm') ?? ('@pry.dataset.version.notProvided' | i18n)\n }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.producer' | i18n }}</span>\n <span>{{ activeVersion?.producer ?? ('@pry.dataset.version.notProvided' | i18n) }}</span>\n </div>\n <div>\n <span class=\"a-label\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</span>\n <div\n class=\"version-information\"\n [innerHTML]=\"activeVersion?.additionalInformation ?? ('@pry.dataset.version.notProvided' | i18n) | mdToHtml\"\n ></div>\n </div>\n } @else {\n <div class=\"a-p\">\n <p>{{ '@pry.dataset.noActiveVersion' | i18n }}</p>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #table>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['table']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #map>\n <div class=\"dashboard-container\">\n <pry-dashboard [staticDashboard]=\"{ widgets: [widgetManifest['map']] }\"></pry-dashboard>\n </div>\n</ng-template>\n<ng-template #datasetVersions>\n <div *ngIf=\"activeVersion$ | async as activeVersion\" class=\"dataset-detail__table table-container\">\n <table class=\"a-table\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>{{ '@pry.dataset.version.title' | i18n }}</th>\n <th>{{ '@pry.dataset.date' | i18n }}</th>\n <th>{{ '@pry.dataset.status' | i18n }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let version of datasetVersions$ | async\"\n (click)=\"togglePanel(version)\"\n [class.-selected]=\"version.id === selectedVersion?.id\"\n >\n <td>\n {{ version.version }}\n <pry-icon *ngIf=\"activeVersion.id === version.id\" iconSvg=\"check\" class=\"check\"></pry-icon>\n </td>\n <td>\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"version.lastModified | sinceDate: { onlyLocale: true }\"\n data-tooltip-position=\"right\"\n >\n {{ version.lastModified | sinceDate: { onlyLocale: true } }}\n </div>\n </td>\n <td>\n {{\n (activeVersion.id === version.id\n ? '@pry.dataset.version.currentlyActive'\n : '@pry.dataset.version.' + version.state\n ) | i18n\n }}\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-md\"\n [attr.data-tooltip]=\"'@pry.dataset.tooltip.' + getVersionTooltipContent(version, activeVersion.id) | i18n\"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </td>\n <td>\n <ng-container\n *ngIf=\"version.state !== 'LOADING' && version.state !== 'INDEXING' && version.state !== 'ERROR'\"\n >\n <ng-container *ngIf=\"dataset.owner && (version.state === 'ACTIVE' || version.state === 'INACTIVE')\">\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'list-dataset', action: 'activate' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary a-btn--icon-text ng-star-inserted\"\n (click)=\"handleButtonAction($event, version)\"\n >\n {{ '@pry.dataset.buttonAction.' + version.state | i18n }}\n </button>\n <ng-container *ngIf=\"version.state === 'ACTIVE' || version.state === 'INACTIVE'\">\n <div\n class=\"m-info-icon a-tooltip -tooltip-width-lg\"\n [attr.data-tooltip]=\"\n (version.state === 'ACTIVE'\n ? '@pry.dataset.tooltip.invalidateButton'\n : '@pry.dataset.tooltip.validateButton'\n ) | i18n\n \"\n data-tooltip-position=\"right\"\n >\n <span>i</span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"version.hasWarnings || version.state === 'ERROR'\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"consultErrors($event, version)\"\n >\n {{\n (version.state === 'ERROR' ? '@pry.dataset.buttonAction.ERROR' : '@pry.dataset.buttonAction.WARNING')\n | i18n\n }}\n </button>\n </ng-container>\n </td>\n <td>\n <ng-container\n *ngIf=\"version.state === 'ACTIVE' || version.state === 'ERROR' || version.state === 'INACTIVE'\"\n >\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary a-btn--icon-text ng-star-inserted\"\n (click)=\"askDelete(version, $event)\"\n >\n {{ '@pry.dataset.buttonAction.delete' | i18n }}\n </button>\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"showModalStatus\">\n <pry-modal-status [version]=\"selectedDatasetVersion\" (gotoConsult)=\"goToConsult($event)\"></pry-modal-status>\n</ng-container>\n" }]
267
276
  }], ctorParameters: () => [{ type: i1.Store }], propDecorators: { dataset: [{
268
277
  type: Input
269
278
  }], goToCatalog: [{
@@ -332,7 +341,11 @@ const enTranslations = {
332
341
  INACTIVE: 'Invalid',
333
342
  ERROR: 'Error',
334
343
  ACTIVE: 'Available',
335
- currentlyActive: 'Active'
344
+ currentlyActive: 'Active',
345
+ delete: {
346
+ title: 'Delete version',
347
+ message: 'Deleting this version will remove associated data. Are you sure you want to delete it?'
348
+ }
336
349
  },
337
350
  form: {
338
351
  obligatory: 'Obligatory field',
@@ -344,7 +357,9 @@ const enTranslations = {
344
357
  ERROR: 'Consult errors',
345
358
  WARNING: 'Consult warnings',
346
359
  LOADING: '',
347
- INDEXING: ''
360
+ INDEXING: '',
361
+ delete: 'Delete',
362
+ cancel: 'Cancel'
348
363
  },
349
364
  error: {
350
365
  type: 'Type',
@@ -413,7 +428,11 @@ const frTranslations = {
413
428
  INACTIVE: 'Invalide',
414
429
  ERROR: 'En erreur',
415
430
  ACTIVE: 'Disponible',
416
- currentlyActive: 'Actif'
431
+ currentlyActive: 'Actif',
432
+ delete: {
433
+ title: 'Supprimer une version',
434
+ message: 'La suppression de cette version entraînera la suppression des données associées. Confirmez-vous la suppression ?'
435
+ }
417
436
  },
418
437
  form: {
419
438
  obligatory: 'Champ obligatoire',
@@ -425,7 +444,9 @@ const frTranslations = {
425
444
  ERROR: 'Consulter erreurs',
426
445
  WARNING: 'Consulter warnings',
427
446
  LOADING: '',
428
- INDEXING: ''
447
+ INDEXING: '',
448
+ delete: 'Supprimer',
449
+ cancel: 'Annuler'
429
450
  },
430
451
  error: {
431
452
  ERROR: 'Erreur',