@claudebernard/therapeutic-alternative-element 2.4.0 → 2.5.0-beta.1

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.
@@ -12,7 +12,6 @@ import { TemplateResult } from 'lit-html';
12
12
  * @element bcb-therapeutic-alternative
13
13
  */
14
14
  export declare class TherapeuticAlternative extends LitElement {
15
- hasTitle: boolean;
16
15
  medication: Bundle | null;
17
16
  patientProfile: Bundle | null;
18
17
  apiUrl: string;
@@ -23,6 +22,8 @@ export declare class TherapeuticAlternative extends LitElement {
23
22
  * voir `@shared/utils/tracing`. N'inclut pas ce composant lui-même dans `ancestry`.
24
23
  */
25
24
  context: WebComponentContext | undefined;
25
+ /* Excluded from this release type: showBetaBadge */
26
+ private isBeta;
26
27
  private sourceProduct;
27
28
  private results;
28
29
  private totalElements;
@@ -100,7 +101,7 @@ export declare class TherapeuticAlternative extends LitElement {
100
101
  private renderSectionHeader;
101
102
  private matchReasonLabels;
102
103
  private renderResults;
103
- private renderTitle;
104
+ private renderBetaBadge;
104
105
  render(): TemplateResult<1>;
105
106
  static styles: CSSResult;
106
107
  }
@@ -809,7 +809,7 @@ function random(size) {
809
809
  }
810
810
  const COMPONENT_HEADERS = {
811
811
  "Bcb-Web-Component-Package": "@claudebernard/therapeutic-alternative-element",
812
- "Bcb-Web-Component-Version": "2.4"
812
+ "Bcb-Web-Component-Version": "2.5"
813
813
  };
814
814
  let activeContext;
815
815
  function setActiveContext(context) {
@@ -2368,15 +2368,17 @@ const EXCLUSION_GROUPS = [
2368
2368
  { key: "activeSubstances", idsField: "activeSubstanceIds", label: "Principes actifs" },
2369
2369
  { key: "notableExcipients", idsField: "notableExcipientIds", label: "Excipients à effet notoire" },
2370
2370
  { key: "excipients", idsField: "excipientIds", label: "Excipients" },
2371
- { key: "contraindications", idsField: "contraindicationIds", label: "Utilisation contre-indiquée" },
2372
- { key: "cautions", idsField: "cautionIds", label: "Utilisation déconseillée" },
2371
+ // Utilisation contre-indiquée + déconseillée : un seul groupe, le backend exclut un produit qui a
2372
+ // le mot-clé dans l'une ou l'autre liste.
2373
+ { key: "contraindications", idsField: "contraindicationIds", label: "Contre-indications" },
2373
2374
  { key: "precautions", idsField: "precautionIds", label: "Précaution d'emploi" },
2374
2375
  { key: "sideEffects", idsField: "sideEffectIds", label: "Effets indésirables" }
2375
2376
  ];
2376
2377
  const QUICK_FILTERS = [
2377
2378
  { key: "sameGalenicForm", label: "Même forme galénique" },
2378
2379
  { key: "sameDosage", label: "Même dosage" },
2379
- { key: "sameRouteOfAdministration", label: "Même voie d'administration" }
2380
+ { key: "sameRouteOfAdministration", label: "Même voie d'administration" },
2381
+ { key: "samePackaging", label: "Même conditionnement" }
2380
2382
  ];
2381
2383
  const INCLUDE_GROUPS = [
2382
2384
  { key: "activeSubstances", idsField: "activeSubstanceIds", label: "Principes actifs" },
@@ -2390,7 +2392,7 @@ const MATCH_REASON_VERB_BY_DIMENSION = {
2390
2392
  indication: "indiqué pour",
2391
2393
  activeSubstance: "contient"
2392
2394
  };
2393
- const therapeuticAlternativeCSS = '.claudebernard-therapeutic-alternative {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n padding: 1rem;\n}\n.claudebernard-therapeutic-alternative-without-title {\n padding-top: 0;\n max-width: 70vw;\n width: 60vw;\n max-height: 70vh;\n}\n.claudebernard-therapeutic-alternative-title {\n font-size: 0.75rem;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--bcbd-gray-500-color, #64748B);\n margin-bottom: 0.375rem;\n display: block;\n}\n.claudebernard-therapeutic-alternative__source {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.claudebernard-therapeutic-alternative__source .claudebernard-therapeutic-alternative-title {\n margin-bottom: 0;\n}\n.claudebernard-therapeutic-alternative__source-actions {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n.claudebernard-therapeutic-alternative__disclaimer {\n margin-bottom: 1rem;\n}\n.claudebernard-therapeutic-alternative__loading {\n width: 100%;\n height: 30%;\n padding-top: 2rem;\n display: flex;\n justify-content: center;\n}\n.claudebernard-therapeutic-alternative__section {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n border-radius: 0.625rem;\n padding: 0.75rem 0.875rem;\n margin-bottom: 1rem;\n}\n.claudebernard-therapeutic-alternative__section-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n cursor: pointer;\n background: none;\n border: none;\n padding: 0;\n margin-bottom: 0.625rem;\n font-family: inherit;\n line-height: 1;\n}\n.claudebernard-therapeutic-alternative__section-header span:first-child {\n font-size: 0.75rem;\n font-weight: 700;\n color: var(--bcbd-gray-500-color, #64748B);\n text-transform: uppercase;\n letter-spacing: 0.03em;\n}\n.claudebernard-therapeutic-alternative__chevron {\n font-size: 0.75rem;\n color: var(--bcbd-gray-400-color, #94A3B8);\n transition: transform 0.15s ease-out;\n display: inline-flex;\n}\n.claudebernard-therapeutic-alternative__chevron--expanded {\n transform: rotate(180deg);\n}\n.claudebernard-therapeutic-alternative__pills {\n display: flex;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n.claudebernard-therapeutic-alternative__pill {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n background: #fff;\n color: var(--bcbd-gray-600-color, #475569);\n border-radius: 6.25rem;\n padding: 0.375rem 0.75rem;\n font-size: 0.8125rem;\n font-family: inherit;\n font-weight: 400;\n white-space: nowrap;\n cursor: pointer;\n line-height: 1;\n}\n.claudebernard-therapeutic-alternative__pill--active {\n border-color: var(--bcbd-primary-color, #0C75AD);\n background: color-mix(in srgb, var(--bcbd-primary-color, #0C75AD) 10%, transparent);\n color: var(--bcbd-primary-color, #0C75AD);\n font-weight: 700;\n}\n.claudebernard-therapeutic-alternative__panel {\n border-top: 1px solid var(--bcbd-border-color-200, #E2E8F0);\n margin-top: 0.75rem;\n padding-top: 0.75rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__panel-rows {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-height: 16.25rem;\n overflow-y: auto;\n padding: 0.25rem 0.125rem;\n}\n.claudebernard-therapeutic-alternative__panel-empty {\n display: block;\n margin-top: 0.75rem;\n font-size: 0.875rem;\n color: var(--bcbd-gray-500-color, #64748B);\n}\n.claudebernard-therapeutic-alternative__panel-expand {\n align-self: flex-start;\n background: none;\n border: none;\n padding: 0.25rem 0 0;\n font-family: inherit;\n font-size: 0.8125rem;\n font-weight: 700;\n color: var(--bcbd-primary-color, #0C75AD);\n cursor: pointer;\n}\n.claudebernard-therapeutic-alternative__panel-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 0.375rem;\n --bcbd-checkbox-font-size: 0.875rem;\n --bcbd-checkbox-size: 0.9375rem;\n}\n.claudebernard-therapeutic-alternative__panel-row--pending {\n background: var(--bcbd-gray-100-color, #F1F5F9);\n padding: 0.25rem 0.375rem;\n margin: -0.25rem -0.375rem;\n}\n.claudebernard-therapeutic-alternative__panel-row--possessed {\n --bcbd-gray-900-color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-therapeutic-alternative__count-badge {\n font-size: 0.75rem;\n color: var(--bcbd-white-color, #fff);\n background: var(--bcbd-primary-color, #0C75AD);\n border-radius: 0.25rem;\n padding: 0.125rem 0.375rem;\n flex-shrink: 0;\n}\n.claudebernard-therapeutic-alternative__selected-chips {\n display: flex;\n gap: 0.375rem;\n flex-wrap: wrap;\n margin-top: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__results {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__results-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-bottom: 0.625rem;\n}\n.claudebernard-therapeutic-alternative__results-badge {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n background: color-mix(in srgb, var(--bcbd-primary-color, #0C75AD) 10%, transparent);\n color: var(--bcbd-primary-color, #0C75AD);\n border-radius: 6.25rem;\n padding: 0.3125rem 0.75rem;\n font-size: 0.8125rem;\n font-weight: 700;\n line-height: 1;\n}\n.claudebernard-therapeutic-alternative__results-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__no-results {\n text-align: center;\n padding: 1.5rem 1rem;\n color: var(--bcbd-gray-500-color, #64748B);\n font-size: 0.875rem;\n}\n.claudebernard-therapeutic-alternative__no-medication {\n padding: 1.25rem;\n}';
2395
+ const therapeuticAlternativeCSS = '.claudebernard-therapeutic-alternative {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n}\n.claudebernard-therapeutic-alternative__beta-badge {\n display: flex;\n justify-content: flex-start;\n line-height: 0;\n margin-bottom: 0.25rem;\n}\n.claudebernard-therapeutic-alternative__beta-badge bcbd-badge {\n display: inline-flex;\n padding: 0.1rem 0;\n border-radius: 50px;\n background-color: var(--bcbd-warning-color, #F59F00);\n}\n.claudebernard-therapeutic-alternative__source {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.claudebernard-therapeutic-alternative__source-actions {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n.claudebernard-therapeutic-alternative__disclaimer {\n margin-bottom: 1rem;\n}\n.claudebernard-therapeutic-alternative__loading {\n width: 100%;\n height: 30%;\n padding-top: 2rem;\n display: flex;\n justify-content: center;\n}\n.claudebernard-therapeutic-alternative__section {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n border-radius: 0.625rem;\n padding: 0.75rem 0.875rem;\n margin-bottom: 1rem;\n}\n.claudebernard-therapeutic-alternative__section-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n cursor: pointer;\n background: none;\n border: none;\n padding: 0;\n margin-bottom: 0.625rem;\n font-family: inherit;\n line-height: 1;\n}\n.claudebernard-therapeutic-alternative__section-header span:first-child {\n font-size: 0.75rem;\n font-weight: 700;\n color: var(--bcbd-gray-500-color, #64748B);\n text-transform: uppercase;\n letter-spacing: 0.03em;\n}\n.claudebernard-therapeutic-alternative__chevron {\n font-size: 0.75rem;\n color: var(--bcbd-gray-400-color, #94A3B8);\n transition: transform 0.15s ease-out;\n display: inline-flex;\n}\n.claudebernard-therapeutic-alternative__chevron--expanded {\n transform: rotate(180deg);\n}\n.claudebernard-therapeutic-alternative__pills {\n display: flex;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n.claudebernard-therapeutic-alternative__pill {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n background: #fff;\n color: var(--bcbd-gray-600-color, #475569);\n border-radius: 6.25rem;\n padding: 0.375rem 0.75rem;\n font-size: 0.8125rem;\n font-family: inherit;\n font-weight: 400;\n white-space: nowrap;\n cursor: pointer;\n line-height: 1;\n}\n.claudebernard-therapeutic-alternative__pill--active {\n border-color: var(--bcbd-primary-color, #0C75AD);\n background: color-mix(in srgb, var(--bcbd-primary-color, #0C75AD) 10%, transparent);\n color: var(--bcbd-primary-color, #0C75AD);\n font-weight: 700;\n}\n.claudebernard-therapeutic-alternative__panel {\n border-top: 1px solid var(--bcbd-border-color-200, #E2E8F0);\n margin-top: 0.75rem;\n padding-top: 0.75rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__panel-rows {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-height: 16.25rem;\n overflow-y: auto;\n padding: 0.25rem 0.125rem;\n}\n.claudebernard-therapeutic-alternative__panel-empty {\n display: block;\n margin-top: 0.75rem;\n font-size: 0.875rem;\n color: var(--bcbd-gray-500-color, #64748B);\n}\n.claudebernard-therapeutic-alternative__panel-expand {\n align-self: flex-start;\n background: none;\n border: none;\n padding: 0.25rem 0 0;\n font-family: inherit;\n font-size: 0.8125rem;\n font-weight: 700;\n color: var(--bcbd-primary-color, #0C75AD);\n cursor: pointer;\n}\n.claudebernard-therapeutic-alternative__panel-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 0.375rem;\n --bcbd-checkbox-font-size: 0.875rem;\n --bcbd-checkbox-size: 0.9375rem;\n}\n.claudebernard-therapeutic-alternative__panel-row--pending {\n background: var(--bcbd-gray-100-color, #F1F5F9);\n padding: 0.25rem 0.375rem;\n margin: -0.25rem -0.375rem;\n}\n.claudebernard-therapeutic-alternative__panel-row--possessed {\n --bcbd-gray-900-color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-therapeutic-alternative__count-badge {\n font-size: 0.75rem;\n color: var(--bcbd-white-color, #fff);\n background: var(--bcbd-primary-color, #0C75AD);\n border-radius: 0.25rem;\n padding: 0.125rem 0.375rem;\n flex-shrink: 0;\n}\n.claudebernard-therapeutic-alternative__selected-chips {\n display: flex;\n gap: 0.375rem;\n flex-wrap: wrap;\n margin-top: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__results {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__results-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-bottom: 0.625rem;\n}\n.claudebernard-therapeutic-alternative__results-badge {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n background: color-mix(in srgb, var(--bcbd-primary-color, #0C75AD) 10%, transparent);\n color: var(--bcbd-primary-color, #0C75AD);\n border-radius: 6.25rem;\n padding: 0.3125rem 0.75rem;\n font-size: 0.8125rem;\n font-weight: 700;\n line-height: 1;\n}\n.claudebernard-therapeutic-alternative__results-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n.claudebernard-therapeutic-alternative__no-results {\n text-align: center;\n padding: 1.5rem 1rem;\n color: var(--bcbd-gray-500-color, #64748B);\n font-size: 0.875rem;\n}\n.claudebernard-therapeutic-alternative__no-medication {\n padding: 1.25rem;\n}';
2394
2396
  function emptyScopeCriteria() {
2395
2397
  return { indicationIds: [], atcClassIds: [] };
2396
2398
  }
@@ -2403,13 +2405,12 @@ function emptyExcludeCriteria() {
2403
2405
  notableExcipientIds: [],
2404
2406
  excipientIds: [],
2405
2407
  contraindicationIds: [],
2406
- cautionIds: [],
2407
2408
  precautionIds: [],
2408
2409
  sideEffectIds: []
2409
2410
  };
2410
2411
  }
2411
2412
  function emptyQuickFilters() {
2412
- return { sameGalenicForm: false, sameDosage: false, sameRouteOfAdministration: false };
2413
+ return { sameGalenicForm: false, sameDosage: false, sameRouteOfAdministration: false, samePackaging: false };
2413
2414
  }
2414
2415
  function emptyScopeFacets() {
2415
2416
  return { indications: [], atcClasses: [] };
@@ -2423,7 +2424,6 @@ function emptyExcludeFacets() {
2423
2424
  notableExcipients: [],
2424
2425
  excipients: [],
2425
2426
  contraindications: [],
2426
- cautions: [],
2427
2427
  precautions: [],
2428
2428
  sideEffects: []
2429
2429
  };
@@ -2440,7 +2440,6 @@ function emptyExcludeLabels() {
2440
2440
  notableExcipients: {},
2441
2441
  excipients: {},
2442
2442
  contraindications: {},
2443
- cautions: {},
2444
2443
  precautions: {},
2445
2444
  sideEffects: {}
2446
2445
  };
@@ -2458,10 +2457,11 @@ var __decorateClass = (decorators, target, key, kind) => {
2458
2457
  let TherapeuticAlternative = class extends i$1 {
2459
2458
  constructor() {
2460
2459
  super(...arguments);
2461
- this.hasTitle = false;
2462
2460
  this.medication = null;
2463
2461
  this.patientProfile = null;
2464
2462
  this.apiUrl = "https://api-dev.claudebernard.fr";
2463
+ this.showBetaBadge = true;
2464
+ this.isBeta = true;
2465
2465
  this.sourceProduct = null;
2466
2466
  this.results = [];
2467
2467
  this.totalElements = 0;
@@ -2565,7 +2565,7 @@ let TherapeuticAlternative = class extends i$1 {
2565
2565
  const anyScope = this.scope.indicationIds.length > 0 || this.scope.atcClassIds.length > 0;
2566
2566
  const anyInclude = Object.values(this.include).some((ids) => ids.length > 0);
2567
2567
  const anyExclude = Object.values(this.exclude).some((ids) => ids.length > 0);
2568
- const anyQuickFilter = this.quickFilters.sameGalenicForm || this.quickFilters.sameDosage || this.quickFilters.sameRouteOfAdministration;
2568
+ const anyQuickFilter = this.quickFilters.sameGalenicForm || this.quickFilters.sameDosage || this.quickFilters.sameRouteOfAdministration || this.quickFilters.samePackaging;
2569
2569
  return !anyScope && !anyInclude && !anyExclude && !anyQuickFilter;
2570
2570
  }
2571
2571
  fetchAlternatives() {
@@ -2688,9 +2688,10 @@ let TherapeuticAlternative = class extends i$1 {
2688
2688
  case "excipients":
2689
2689
  return new Set(TherapeuticAlternative.codesOf(composition?.excipients));
2690
2690
  case "contraindications":
2691
- return new Set(TherapeuticAlternative.codesOf(keywords?.contraindicationsKeywords));
2692
- case "cautions":
2693
- return new Set(TherapeuticAlternative.codesOf(keywords?.contraindicationsNotRecommendedKeywords));
2691
+ return /* @__PURE__ */ new Set([
2692
+ ...TherapeuticAlternative.codesOf(keywords?.contraindicationsKeywords),
2693
+ ...TherapeuticAlternative.codesOf(keywords?.contraindicationsNotRecommendedKeywords)
2694
+ ]);
2694
2695
  case "precautions":
2695
2696
  return new Set(TherapeuticAlternative.codesOf(keywords?.precautionsForUseKeywords));
2696
2697
  case "sideEffects":
@@ -3277,21 +3278,20 @@ let TherapeuticAlternative = class extends i$1 {
3277
3278
  </bcbd-pagination>`}
3278
3279
  `;
3279
3280
  }
3280
- // The product name in the title replaces the "Produit sélectionné" line when has-title is on; without
3281
- // a title, that line (see render) is the only place the product name shows.
3282
- renderTitle(medicationTitle) {
3283
- return b`<span class="${PREFIX}-therapeutic-alternative-title" data-test-id="title">Alternative Thérapeutique pour ${medicationTitle !== "" ? decodeHtml(medicationTitle) : "ce produit"}</span>`;
3281
+ renderBetaBadge() {
3282
+ return this.isBeta && this.showBetaBadge ? b`
3283
+ <div class="${PREFIX}-therapeutic-alternative__beta-badge" data-test-id="beta-badge">
3284
+ <bcbd-tooltip content="Vous utilisez actuellement une version bêta" placement="bottom">
3285
+ <bcbd-badge label="bêta" background-color="warning" font-size="small" rounded></bcbd-badge>
3286
+ </bcbd-tooltip>
3287
+ </div>` : A;
3284
3288
  }
3285
3289
  render() {
3286
- const containerClasses = [
3287
- `${PREFIX}-therapeutic-alternative`,
3288
- this.hasTitle ? "" : `${PREFIX}-therapeutic-alternative-without-title`
3289
- ].join(" ");
3290
3290
  const medicationTitle = getMedicationTitle(this.currentMedication);
3291
3291
  if (this.currentMedication && this.isParaSource) {
3292
3292
  return b`
3293
- <div class=${containerClasses} data-test-id="therapeutic-alternative-container">
3294
- ${this.hasTitle ? this.renderTitle(medicationTitle) : ""}
3293
+ <div class="${PREFIX}-therapeutic-alternative" data-test-id="therapeutic-alternative-container">
3294
+ ${this.renderBetaBadge()}
3295
3295
  <div class="${PREFIX}-therapeutic-alternative__disclaimer">
3296
3296
  <bcbd-alert title-message="Alternative thérapeutique indisponible"
3297
3297
  description-message="La recherche d'alternative n'est pas disponible pour les produits de parapharmacie."
@@ -3302,13 +3302,13 @@ let TherapeuticAlternative = class extends i$1 {
3302
3302
  `;
3303
3303
  }
3304
3304
  return b`
3305
- <div class=${containerClasses} data-test-id="therapeutic-alternative-container">
3305
+ <div class="${PREFIX}-therapeutic-alternative" data-test-id="therapeutic-alternative-container">
3306
+ ${this.renderBetaBadge()}
3306
3307
  ${this.currentMedication ? b`
3307
3308
  <div class="${PREFIX}-therapeutic-alternative__source mb-3" data-test-id="source-product">
3308
- ${this.hasTitle ? this.renderTitle(medicationTitle) : b`
3309
- <span data-test-id="source-product-label">
3310
- Produit sélectionné : <span class="text-primary">${medicationTitle !== "" ? decodeHtml(medicationTitle) : "Inconnu"}</span>
3311
- </span>`}
3309
+ <span data-test-id="source-product-label">
3310
+ Produit sélectionné : <span class="text-primary">${medicationTitle !== "" ? decodeHtml(medicationTitle) : "Inconnu"}</span>
3311
+ </span>
3312
3312
  <div class="${PREFIX}-therapeutic-alternative__source-actions">
3313
3313
  <bcbd-button size="small" background-color="secondary" outlined
3314
3314
  ?disabled=${this.hasNoSelectedCriteria()}
@@ -3362,7 +3362,6 @@ let TherapeuticAlternative = class extends i$1 {
3362
3362
  <div class="${PREFIX}-therapeutic-alternative__results" data-test-id="results-container">
3363
3363
  ${this.renderResults()}
3364
3364
  </div>` : b`
3365
- ${this.hasTitle ? this.renderTitle(medicationTitle) : ""}
3366
3365
  <div class="${PREFIX}-therapeutic-alternative__no-medication" data-test-id="no-medication-container">
3367
3366
  <bcbd-alert title-message="Pas de médicament sélectionné"
3368
3367
  description-message="Un problème est survenu au moment de sélectionner le produit"
@@ -3374,9 +3373,6 @@ let TherapeuticAlternative = class extends i$1 {
3374
3373
  }
3375
3374
  };
3376
3375
  TherapeuticAlternative.styles = i$4`${r$4([therapeuticAlternativeCSS, designSystemCSS])}`;
3377
- __decorateClass([
3378
- n2({ type: Boolean, attribute: "has-title" })
3379
- ], TherapeuticAlternative.prototype, "hasTitle", 2);
3380
3376
  __decorateClass([
3381
3377
  n2({ type: Object })
3382
3378
  ], TherapeuticAlternative.prototype, "medication", 2);
@@ -3392,6 +3388,16 @@ __decorateClass([
3392
3388
  __decorateClass([
3393
3389
  n2({ type: Object })
3394
3390
  ], TherapeuticAlternative.prototype, "context", 2);
3391
+ __decorateClass([
3392
+ n2({
3393
+ type: Boolean,
3394
+ attribute: "show-beta-badge",
3395
+ converter: (value) => value !== "false"
3396
+ })
3397
+ ], TherapeuticAlternative.prototype, "showBetaBadge", 2);
3398
+ __decorateClass([
3399
+ r()
3400
+ ], TherapeuticAlternative.prototype, "isBeta", 2);
3395
3401
  __decorateClass([
3396
3402
  r()
3397
3403
  ], TherapeuticAlternative.prototype, "sourceProduct", 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudebernard/therapeutic-alternative-element",
3
- "version": "2.4.0",
3
+ "version": "2.5.0-beta.1",
4
4
  "main": "dist/therapeutic-alternative.es.js",
5
5
  "module": "dist/therapeutic-alternative.es.js",
6
6
  "types": "dist/therapeutic-alternative.d.ts",
@@ -23,6 +23,7 @@
23
23
  "generate": "openapi-ts --file src/shared/api/search/search.openapi-config.ts && openapi-ts --file src/shared/api/info/info.openapi-config.ts && openapi-ts --file src/shared/api/prescription/prescription.openapi-config.ts",
24
24
  "storybook": "storybook dev -p 6006",
25
25
  "build-storybook": "storybook build",
26
+ "no-effect": "",
26
27
  "write-test": "npx playwright codegen",
27
28
  "test": "npx vitest",
28
29
  "e2e-test": "npx playwright test",
@@ -54,6 +55,7 @@
54
55
  "@storybook/addon-vitest": "^10.2.11",
55
56
  "@storybook/web-components": "^10.2.11",
56
57
  "@storybook/web-components-vite": "^10.2.11",
58
+ "@claudebernard/storybook-addon-json-editor-panel": "^0.3.0",
57
59
  "@claudebernard/storybook-addon-theme-switcher": "0.1.0",
58
60
  "@stylistic/eslint-plugin": "^5.9.0",
59
61
  "@types/fhir": "^0.0.41",
@@ -75,7 +77,7 @@
75
77
  "ts-node": "^10.9.2",
76
78
  "tslib": "^2.8.1",
77
79
  "typescript": "~5.9.3",
78
- "vite": "^7.3.1",
80
+ "vite": "^7.3.7",
79
81
  "vite-plugin-dts": "4.5.4",
80
82
  "vite-svg-sprite-wrapper": "1.5.0",
81
83
  "vitest": "^4.1.8"
@@ -98,53 +100,6 @@
98
100
  "customElements": "custom-elements.json",
99
101
  "publishConfig": {
100
102
  "access": "public"
101
- },
102
- "release": {
103
- "tagFormat": "v${version}",
104
- "branches": [
105
- "master"
106
- ],
107
- "plugins": [
108
- "@semantic-release/commit-analyzer",
109
- "@semantic-release/release-notes-generator",
110
- "@semantic-release/changelog",
111
- [
112
- "semantic-release-replace-plugin",
113
- {
114
- "replacements": [
115
- {
116
- "files": [
117
- "package.json"
118
- ],
119
- "from": "\"version\": \"\\d+\\.\\d+\\.\\d+\"",
120
- "to": "\"version\": \"${nextRelease.version}\"",
121
- "results": [
122
- {
123
- "file": "package.json",
124
- "hasChanged": true
125
- }
126
- ]
127
- }
128
- ]
129
- }
130
- ],
131
- [
132
- "@semantic-release/git",
133
- {
134
- "message": "chore(release): ${nextRelease.version} [skip ci on prod]",
135
- "assets": [
136
- "package.json",
137
- "CHANGELOG.md"
138
- ]
139
- }
140
- ],
141
- [
142
- "@semantic-release/exec",
143
- {
144
- "publishCmd": "sh -c 'set -e; V=$(echo ${nextRelease.version} | cut -d. -f1,2); sed -i \"s/^version: .*/version: $V.x/\" antora.yml; git add antora.yml; git commit -m \"docs(antora): set version to $V.x\"; git tag -f v$V-latest; git push https://gitlab-ci-token:$GITLAB_TOKEN@gitlab.cegedim-sante.com/resip/pim/web-components/therapeutic-alternative.git -f v$V-latest; git reset --hard HEAD~1'"
145
- }
146
- ],
147
- "@semantic-release/gitlab"
148
- ]
149
103
  }
150
104
  }
105
+