@dsivd/prestations-ng 16.0.0-beta10 → 16.0.0-beta11

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.
@@ -2960,6 +2960,15 @@ class FoehnRecapSectionComponent {
2960
2960
  constructor() {
2961
2961
  this.acceptEmptyValues = false;
2962
2962
  }
2963
+ set data(data) {
2964
+ this.comment = data.elements.find(e => !!e.isComment);
2965
+ this._section = data;
2966
+ this._section.elements = this._section.elements.filter(e => !e.isComment);
2967
+ }
2968
+ // eslint-disable-next-line @typescript-eslint/member-ordering
2969
+ get data() {
2970
+ return this._section;
2971
+ }
2963
2972
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2964
2973
  cleanValue(element) {
2965
2974
  return this.fixLineBreaks(this.formatEmptyValue(element));
@@ -2968,7 +2977,8 @@ class FoehnRecapSectionComponent {
2968
2977
  if (!data) {
2969
2978
  return false;
2970
2979
  }
2971
- return data.elements.some(element => this.hasContent(element));
2980
+ return (data.elements.some(element => this.hasContent(element)) ||
2981
+ this.hasContent(this.comment));
2972
2982
  }
2973
2983
  hasContent(element) {
2974
2984
  return (!!element &&
@@ -3029,13 +3039,13 @@ class FoehnRecapSectionComponent {
3029
3039
  }
3030
3040
  }
3031
3041
  FoehnRecapSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FoehnRecapSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3032
- FoehnRecapSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: FoehnRecapSectionComponent, selector: "foehn-recap-section", inputs: { data: "data", acceptEmptyValues: "acceptEmptyValues" }, ngImport: i0, template: "<section class=\"mb-3 p-1 bg-light\" *ngIf=\"atLeastOneElementHasContent(data)\">\n <h2 class=\"h4 mb-3 pl-1\" [innerHTML]=\"data.titleKey | fromDictionary\"></h2>\n <dl class=\"medium row mr-0 ml-0 pl-3 pr-3\">\n <ng-container *ngFor=\"let element of data.elements\">\n <dt\n *ngIf=\"hasContent(element)\"\n class=\"col-md-4 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"element.key | fromDictionary\"\n ></dt>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"!isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"cleanValue(element)\"\n ></dd>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n >\n <foehn-display-address\n [address]=\"getAddressToDisplay(element)\"\n ></foehn-display-address>\n </dd>\n </ng-container>\n </dl>\n</section>\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: FoehnDisplayAddressComponent, selector: "foehn-display-address", inputs: ["address"] }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }] });
3042
+ FoehnRecapSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: FoehnRecapSectionComponent, selector: "foehn-recap-section", inputs: { acceptEmptyValues: "acceptEmptyValues", data: "data" }, ngImport: i0, template: "<section\n class=\"mb-3 p-1 bg-light\"\n *ngIf=\"atLeastOneElementHasContent(data)\"\n [id]=\"data.id || data.titleKey\"\n>\n <h2 class=\"h4 mb-3 pl-1\" [innerHTML]=\"data.titleKey | fromDictionary\"></h2>\n <dl class=\"medium row mr-0 ml-0 pl-3 pr-3\">\n <ng-container *ngFor=\"let element of data.elements\">\n <dt\n *ngIf=\"hasContent(element)\"\n class=\"col-md-4 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"element.key | fromDictionary\"\n ></dt>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"!isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"cleanValue(element)\"\n ></dd>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n >\n <foehn-display-address\n [address]=\"getAddressToDisplay(element)\"\n ></foehn-display-address>\n </dd>\n </ng-container>\n </dl>\n <div\n [id]=\"buildId(comment)\"\n class=\"medium mr-0 ml-0 pl-3 pr-3 text-break\"\n *ngIf=\"hasContent(comment)\"\n [innerHTML]=\"cleanValue(comment)\"\n ></div>\n</section>\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: FoehnDisplayAddressComponent, selector: "foehn-display-address", inputs: ["address"] }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }] });
3033
3043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FoehnRecapSectionComponent, decorators: [{
3034
3044
  type: Component,
3035
- args: [{ selector: 'foehn-recap-section', template: "<section class=\"mb-3 p-1 bg-light\" *ngIf=\"atLeastOneElementHasContent(data)\">\n <h2 class=\"h4 mb-3 pl-1\" [innerHTML]=\"data.titleKey | fromDictionary\"></h2>\n <dl class=\"medium row mr-0 ml-0 pl-3 pr-3\">\n <ng-container *ngFor=\"let element of data.elements\">\n <dt\n *ngIf=\"hasContent(element)\"\n class=\"col-md-4 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"element.key | fromDictionary\"\n ></dt>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"!isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"cleanValue(element)\"\n ></dd>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n >\n <foehn-display-address\n [address]=\"getAddressToDisplay(element)\"\n ></foehn-display-address>\n </dd>\n </ng-container>\n </dl>\n</section>\n" }]
3036
- }], propDecorators: { data: [{
3045
+ args: [{ selector: 'foehn-recap-section', template: "<section\n class=\"mb-3 p-1 bg-light\"\n *ngIf=\"atLeastOneElementHasContent(data)\"\n [id]=\"data.id || data.titleKey\"\n>\n <h2 class=\"h4 mb-3 pl-1\" [innerHTML]=\"data.titleKey | fromDictionary\"></h2>\n <dl class=\"medium row mr-0 ml-0 pl-3 pr-3\">\n <ng-container *ngFor=\"let element of data.elements\">\n <dt\n *ngIf=\"hasContent(element)\"\n class=\"col-md-4 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"element.key | fromDictionary\"\n ></dt>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"!isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n [innerHTML]=\"cleanValue(element)\"\n ></dd>\n <dd\n [id]=\"buildId(element)\"\n *ngIf=\"isAddress(element) && hasContent(element)\"\n class=\"col-md-8 font-weight-light border-top border-grey p-1 text-break\"\n >\n <foehn-display-address\n [address]=\"getAddressToDisplay(element)\"\n ></foehn-display-address>\n </dd>\n </ng-container>\n </dl>\n <div\n [id]=\"buildId(comment)\"\n class=\"medium mr-0 ml-0 pl-3 pr-3 text-break\"\n *ngIf=\"hasContent(comment)\"\n [innerHTML]=\"cleanValue(comment)\"\n ></div>\n</section>\n" }]
3046
+ }], propDecorators: { acceptEmptyValues: [{
3037
3047
  type: Input
3038
- }], acceptEmptyValues: [{
3048
+ }], data: [{
3039
3049
  type: Input
3040
3050
  }] } });
3041
3051
 
@@ -3055,23 +3065,36 @@ class FoehnDebugSummaryComponent {
3055
3065
  const debugInfos = [];
3056
3066
  if (!!routeParams.reference) {
3057
3067
  debugInfos.push({
3068
+ id: 'reference',
3058
3069
  key: 'Référence de la demande',
3059
- value: routeParams.reference
3070
+ value: routeParams.reference,
3071
+ isComment: false
3060
3072
  });
3061
3073
  }
3062
3074
  debugInfos.push({
3075
+ id: 'environment',
3063
3076
  key: 'Environnement',
3064
- value: appInfo.environment
3077
+ value: appInfo.environment,
3078
+ isComment: false
3079
+ });
3080
+ debugInfos.push({
3081
+ id: 'version',
3082
+ key: 'Version',
3083
+ value: appInfo.version,
3084
+ isComment: false
3065
3085
  });
3066
- debugInfos.push({ key: 'Version', value: appInfo.version });
3067
3086
  debugInfos.push({
3087
+ id: 'useragent',
3068
3088
  key: 'User-Agent',
3069
- value: navigator.userAgent
3089
+ value: navigator.userAgent,
3090
+ isComment: false
3070
3091
  });
3071
3092
  if (!!sessionInfo) {
3072
3093
  debugInfos.push({
3094
+ id: 'context',
3073
3095
  key: 'Context',
3074
- value: sessionInfo.context
3096
+ value: sessionInfo.context,
3097
+ isComment: false
3075
3098
  });
3076
3099
  }
3077
3100
  return debugInfos;
@@ -3080,8 +3103,10 @@ class FoehnDebugSummaryComponent {
3080
3103
  get elements() {
3081
3104
  return this.debugInfos.pipe(map(debugInfos => {
3082
3105
  debugInfos.unshift({
3106
+ id: 'initDate',
3083
3107
  key: 'Horodatage',
3084
- value: this.datePipe.transform(this.initDate, DATE_TIME_FORMAT)
3108
+ value: this.datePipe.transform(this.initDate, DATE_TIME_FORMAT),
3109
+ isComment: false
3085
3110
  });
3086
3111
  return debugInfos;
3087
3112
  }));
@@ -3091,7 +3116,7 @@ class FoehnDebugSummaryComponent {
3091
3116
  }
3092
3117
  }
3093
3118
  FoehnDebugSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FoehnDebugSummaryComponent, deps: [{ token: ApplicationInfoService }, { token: SessionInfo }, { token: i1$1.ActivatedRoute }, { token: i2.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
3094
- FoehnDebugSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: FoehnDebugSummaryComponent, selector: "foehn-debug-summary", ngImport: i0, template: "<foehn-recap-section\n *ngIf=\"elements | async as el\"\n [data]=\"{ titleKey: 'Informations pour le support', elements: el }\"\n></foehn-recap-section>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FoehnRecapSectionComponent, selector: "foehn-recap-section", inputs: ["data", "acceptEmptyValues"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
3119
+ FoehnDebugSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: FoehnDebugSummaryComponent, selector: "foehn-debug-summary", ngImport: i0, template: "<foehn-recap-section\n *ngIf=\"elements | async as el\"\n [data]=\"{ titleKey: 'Informations pour le support', elements: el }\"\n></foehn-recap-section>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FoehnRecapSectionComponent, selector: "foehn-recap-section", inputs: ["acceptEmptyValues", "data"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
3095
3120
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FoehnDebugSummaryComponent, decorators: [{
3096
3121
  type: Component,
3097
3122
  args: [{ selector: 'foehn-debug-summary', template: "<foehn-recap-section\n *ngIf=\"elements | async as el\"\n [data]=\"{ titleKey: 'Informations pour le support', elements: el }\"\n></foehn-recap-section>\n" }]