@claudebernard/patient-profile-element 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +43 -66
- package/dist/patient-profile.d.ts +12 -0
- package/dist/patient-profile.es.js +16 -10
- package/package.json +15 -10
|
@@ -6,48 +6,22 @@
|
|
|
6
6
|
"kind": "javascript-module",
|
|
7
7
|
"path": "src/patient-profile/patient-profile.stories.ts",
|
|
8
8
|
"declarations": [
|
|
9
|
-
{
|
|
10
|
-
"kind": "variable",
|
|
11
|
-
"name": "meta",
|
|
12
|
-
"type": {
|
|
13
|
-
"text": "Meta<PatientProfile>"
|
|
14
|
-
},
|
|
15
|
-
"default": "{\n parameters: {\n deepControls: { enabled: true },\n docs: {\n story: {\n autoplay: false,\n },\n },\n },\n tags: [\"autodocs\"],\n render: (args: PatientProfileProps) => html`<bcb-patient-profile\n .patientProfile=${args.patientProfile}\n .editButtonVisible=${args.editButtonVisible}\n .apiUrl=${args.apiUrl}\n .apiKey=${args.apiKey}\n ></bcb-patient-profile>`,\n argTypes: {\n patientProfile: {\n control: { type: \"object\" },\n description: \"FHIR Patient resource with extensions for medical data\",\n },\n editButtonVisible: {\n control: { type: \"boolean\" },\n description: \"Flag to show or hide the edit button\",\n },\n apiUrl: {\n control: { type: \"text\" },\n description: \"The API URL used to perform pathologies and allergies searches.\",\n },\n apiKey: {\n control: { type: \"text\" },\n description: \"The API key to allow access to the resources of the API URL.\",\n },\n },\n args: {\n patientProfile: clonePatientProfile(),\n apiUrl: DEFAULT_API_URL,\n apiKey: DEFAULT_API_KEY,\n editButtonVisible: true,\n },\n}"
|
|
16
|
-
},
|
|
17
9
|
{
|
|
18
10
|
"kind": "variable",
|
|
19
11
|
"name": "Base",
|
|
20
12
|
"type": {
|
|
21
|
-
"text": "
|
|
22
|
-
}
|
|
23
|
-
"default": "{\n args: {\n patientProfile: clonePatientProfile(),\n },\n play: async({ canvasElement, step }) => {\n const component = canvasElement.querySelector(\"bcb-patient-profile\") as HTMLElement | null;\n\n await step(\"Verify the patient ID information\", () => {\n const divName = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"patient-name\\\"]\") as HTMLElement | null;\n expect(divName?.textContent).toContain(\"Marie Dupont\");\n\n const divGender = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"patient-gender\\\"]\") as HTMLElement | null;\n expect(divGender?.textContent).toContain(\"Femme\");\n\n const divAge = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"patient-age\\\"]\") as HTMLElement | null;\n expect(divAge?.textContent).toContain(\"42 ans\");\n });\n\n await step(\"Verify the patient physical information\", () => {\n const divHeight = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"patient-height\\\"]\") as HTMLElement | null;\n const textHeight = divHeight?.textContent ?? \"\";\n expect(textHeight).toContain(\"Taille\");\n expect(textHeight).toContain(\"170\");\n expect(textHeight).toContain(\"cm\");\n\n const divWeight = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"patient-weight\\\"]\") as HTMLElement | null;\n const textWeight = divWeight?.textContent ?? \"\";\n expect(textWeight).toContain(\"Poids\");\n expect(textWeight).toContain(\"84\");\n expect(textWeight).toContain(\"kg\");\n\n const divIMC = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"patient-IMC\\\"]\") as HTMLElement | null;\n expect(divIMC?.textContent).toContain(\"29.1\");\n });\n\n const divActions = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"action-buttons\\\"]\") as HTMLElement | null;\n const modifyButton = divActions?.querySelector(\"bcbd-button[data-test-id=\\\"modify-button\\\"]\") as HTMLElement | null;\n const visibleButton = divActions?.querySelector(\"bcbd-button[data-test-id=\\\"visible-button\\\"]\") as HTMLElement | null;\n\n await step(\"Verify the action buttons and more information section\", async() => {\n await expect(modifyButton).not.toBeNull();\n await expect(visibleButton).not.toBeNull();\n });\n\n const moreInfoDiv = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"more-information-section\\\"]\") as HTMLElement | null;\n\n await step(\"Verify the more information section is not visible\", () => {\n expect(moreInfoDiv?.className).not.toContain(\"active\");\n expect(moreInfoDiv).not.toBeVisible();\n });\n\n await step(\"Click on the more information button and verify the displayed information\", async() => {\n if (visibleButton) {\n await visibleButton.click();\n }\n expect(moreInfoDiv).toBeVisible();\n });\n\n // eslint-disable-next-line complexity\n await step(\"Verify the content of more information section\", () => {\n const pregnancyDiv = moreInfoDiv?.querySelector(\"div[data-test-id=\\\"pregnancy-section\\\"]\") as HTMLElement | null;\n expect(pregnancyDiv).toBeVisible();\n const textPregnancy = pregnancyDiv?.textContent ?? \"\";\n expect(textPregnancy).toContain(\"Oui - 20 semaine(s)\");\n\n const breastfeedingDiv = moreInfoDiv?.querySelector(\"div[data-test-id=\\\"breastfeeding-section\\\"]\") as HTMLElement | null;\n expect(breastfeedingDiv).toBeVisible();\n const textBreastfeeding = breastfeedingDiv?.textContent ?? \"\";\n expect(textBreastfeeding).toContain(\"Oui\");\n\n const pathologyDiv = moreInfoDiv?.querySelector(\"div[data-test-id=\\\"pathology-section\\\"]\") as HTMLElement | null;\n expect(pathologyDiv).toBeVisible();\n const textPathology = pathologyDiv?.textContent ?? \"\";\n expect(textPathology).toContain(\"Pathologies suivies\");\n expect(textPathology).toContain(\"Insuffisance hépatique\");\n expect(textPathology).toContain(\"Insuffisance rénale aigüe\");\n expect(textPathology).toContain(\"Insuffisance hépatique mo.\");\n expect(textPathology).toContain(\"Insuffisance cardiaque\");\n\n const allergyDiv = moreInfoDiv?.querySelector(\"div[data-test-id=\\\"allergy-section\\\"]\") as HTMLElement | null;\n expect(allergyDiv).toBeVisible();\n const textAllergy = allergyDiv?.textContent ?? \"\";\n expect(textAllergy).toContain(\"Allergies\");\n expect(textAllergy).toContain(\"Allergie au paracétamol\");\n\n const hepaticInsufficiencyDiv = moreInfoDiv?.querySelector(\"div[data-test-id=\\\"hepatic-insufficiency-section\\\"]\") as HTMLElement | null;\n expect(hepaticInsufficiencyDiv).toBeVisible();\n const textHepaticInsufficiency = hepaticInsufficiencyDiv?.textContent ?? \"\";\n expect(textHepaticInsufficiency).toContain(\"Insuffisance hépatique\");\n expect(textHepaticInsufficiency).toContain(\"Stade B\");\n\n const clairanceDiv = moreInfoDiv?.querySelector(\"div[data-test-id=\\\"clearance-section\\\"]\") as HTMLElement | null;\n expect(clairanceDiv).toBeVisible();\n const textClairance = clairanceDiv?.textContent ?? \"\";\n expect(textClairance).toContain(\"Clairance créatinine\");\n expect(textClairance).toContain(\"71 mL/min\");\n\n const dfgDiv = moreInfoDiv?.querySelector(\"div[data-test-id=\\\"dfg-section\\\"]\") as HTMLElement | null;\n expect(dfgDiv).toBeVisible();\n const textDfg = dfgDiv?.textContent ?? \"\";\n expect(textDfg).toContain(\"DFG\");\n expect(textDfg).toContain(\"45 mL/min\");\n });\n\n //Close the more information section at the end of the test\n if (visibleButton) {\n await visibleButton.click();\n }\n },\n}"
|
|
13
|
+
"text": "WebComponentsStory<any, any>"
|
|
14
|
+
}
|
|
24
15
|
},
|
|
25
16
|
{
|
|
26
17
|
"kind": "variable",
|
|
27
18
|
"name": "WithoutEditButton",
|
|
28
19
|
"type": {
|
|
29
|
-
"text": "
|
|
30
|
-
}
|
|
31
|
-
"default": "{\n args: {\n patientProfile: clonePatientProfile(),\n editButtonVisible: false,\n },\n play: async({ canvasElement, step }) => {\n const component = canvasElement.querySelector(\"bcb-patient-profile\") as HTMLElement | null;\n const divActions = component?.shadowRoot?.querySelector(\"div[data-test-id=\\\"action-buttons\\\"]\") as HTMLElement | null;\n const modifyButton = divActions?.querySelector(\"bcbd-button[data-test-id=\\\"modify-button\\\"]\") as HTMLElement | null;\n\n await step(\"Look at the visibility of Edit Button\", async() => {\n await expect(modifyButton).toBeNull();\n });\n },\n}"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"kind": "variable",
|
|
35
|
-
"name": "BaseTestStory",
|
|
36
|
-
"type": {
|
|
37
|
-
"text": "Story"
|
|
38
|
-
},
|
|
39
|
-
"default": "{\n args: {\n patientProfile: clonePatientProfile(),\n },\n play: async({ canvasElement, step }) => {\n const restoreFetch = installFetchMockForPathologies(mockPathologies);\n try {\n const component = canvasElement.querySelector(\"bcb-patient-profile\") as HTMLElement | null;\n\n if (component) {\n component.setAttribute(\"patientProfile\", JSON.stringify(clonePatientProfile()));\n // Ou si c'est une propriété :\n (component as any).patientProfile = clonePatientProfile();\n }\n \n const shadow = component?.shadowRoot;\n\n await step(\"Verify initial value\", () => {\n const heightDiv = shadow?.querySelector(\"div[data-test-id=\\\"patient-height\\\"]\") as HTMLElement | null;\n const weightDiv = shadow?.querySelector(\"div[data-test-id=\\\"patient-weight\\\"]\") as HTMLElement | null;\n const ageDiv = shadow?.querySelector(\"div[data-test-id=\\\"patient-age\\\"]\") as HTMLElement | null;\n\n expect(heightDiv?.textContent ?? \"\").toContain(\"170 cm\");\n expect(weightDiv?.textContent ?? \"\").toContain(\"84 kg\");\n expect(ageDiv?.textContent ?? \"\").toContain(\"42 ans\");\n });\n\n const editionComponent = component?.shadowRoot?.querySelector(\"bcb-patient-profile-edition\") as HTMLElement | null;\n const editionContent = editionComponent?.shadowRoot?.querySelector(\"div\") as HTMLElement | null;\n\n // eslint-disable-next-line complexity\n await step(\"Basculer en mode édition et modifier les champs\", async() => {\n const actionsDiv = shadow?.querySelector(\"div[data-test-id=\\\"action-buttons\\\"]\") as HTMLElement | null;\n const modifyButton = actionsDiv?.querySelector(\"bcbd-button[data-test-id=\\\"modify-button\\\"]\") as HTMLElement | null;\n await modifyButton?.click();\n\n const sizeInput = editionContent?.querySelector(\"[data-test-id=\\\"size-input\\\"]\") as HTMLInputElement | null;\n const ageInput = editionContent?.querySelector(\"[data-test-id=\\\"age-input\\\"]\") as HTMLInputElement | null;\n const weightInput = editionContent?.querySelector(\"[data-test-id=\\\"weight-input\\\"]\") as HTMLInputElement | null;\n\n if (sizeInput) {\n sizeInput.value = \"\";\n sizeInput.dispatchEvent(new InputEvent(\"input\", { bubbles: true, composed: true }));\n sizeInput.value = \"20\";\n sizeInput.dispatchEvent(new InputEvent(\"input\", { bubbles: true, composed: true }));\n }\n\n if (ageInput) {\n ageInput.value = \"\";\n ageInput.dispatchEvent(new InputEvent(\"input\", { bubbles: true, composed: true }));\n ageInput.value = \"50\";\n ageInput.dispatchEvent(new InputEvent(\"input\", { bubbles: true, composed: true }));\n }\n\n if (weightInput) {\n weightInput.value = \"\";\n weightInput.dispatchEvent(new InputEvent(\"input\", { bubbles: true, composed: true }));\n weightInput.value = \"90\";\n weightInput.dispatchEvent(new InputEvent(\"input\", { bubbles: true, composed: true }));\n }\n const pathologieSelect = editionContent?.querySelector(\"[data-test-id=\\\"pathologies-select\\\"]\");\n\n const pathologiesSearch = pathologieSelect?.shadowRoot?.querySelector(\"input[type=\\\"text\\\"]\") as HTMLInputElement | null;\n if (pathologiesSearch) {\n await pathologiesSearch.click();\n pathologiesSearch.value = \"tes\";\n pathologiesSearch.dispatchEvent(new InputEvent(\"input\", { bubbles: true, composed: true }));\n await pathologiesSearch.click();\n }\n const optionSelector = \"div[data-test-id=\\\"select-option-K63\\\\.0\\\"]\";\n if (pathologieSelect instanceof HTMLElement) {\n const optionPatho = await waitForOption(pathologieSelect, optionSelector, 4000);\n await optionPatho.click();\n }\n\n const hepaticSelect = editionContent?.querySelector(\"[data-test-id=\\\"hepatic-stade-select\\\"]\") as HTMLElement | null;\n if (hepaticSelect instanceof HTMLElement) {\n await hepaticSelect?.click();\n\n const optionA = \"div[data-test-id=\\\"select-option-A\\\"]\";\n const optionStade = await waitForOption(hepaticSelect, optionA, 4000);\n await optionStade?.click();\n }\n\n const validateButton = editionContent?.querySelector(\"[data-test-id=\\\"save-button\\\"]\") as HTMLButtonElement | null;\n await validateButton?.click();\n });\n\n await step(\"Vérifier les valeurs modifiées en mode visuel\", () => {\n const pathologyDiv = shadow?.querySelector(\"div[data-test-id=\\\"pathology-section\\\"]\") as HTMLElement | null;\n const heightDiv = shadow?.querySelector(\"div[data-test-id=\\\"patient-height\\\"]\") as HTMLElement | null;\n const weightDiv = shadow?.querySelector(\"div[data-test-id=\\\"patient-weight\\\"]\") as HTMLElement | null;\n const ageDiv = shadow?.querySelector(\"div[data-test-id=\\\"patient-age\\\"]\") as HTMLElement | null;\n\n expect(heightDiv?.textContent ?? \"\").toContain(\"20 cm\");\n expect(weightDiv?.textContent ?? \"\").toContain(\"90 kg\");\n expect(ageDiv?.textContent ?? \"\").toContain(\"50 ans\");\n\n const pathologyText = pathologyDiv?.textContent ?? \"\";\n expect(pathologyText).toContain(\"Abces de l'intestin\");\n });\n } finally {\n restoreFetch();\n }\n },\n}"
|
|
20
|
+
"text": "WebComponentsStory<any, any>"
|
|
21
|
+
}
|
|
40
22
|
}
|
|
41
23
|
],
|
|
42
24
|
"exports": [
|
|
43
|
-
{
|
|
44
|
-
"kind": "js",
|
|
45
|
-
"name": "default",
|
|
46
|
-
"declaration": {
|
|
47
|
-
"name": "meta",
|
|
48
|
-
"module": "src/patient-profile/patient-profile.stories.ts"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
25
|
{
|
|
52
26
|
"kind": "js",
|
|
53
27
|
"name": "Base",
|
|
@@ -63,14 +37,6 @@
|
|
|
63
37
|
"name": "WithoutEditButton",
|
|
64
38
|
"module": "src/patient-profile/patient-profile.stories.ts"
|
|
65
39
|
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"kind": "js",
|
|
69
|
-
"name": "BaseTestStory",
|
|
70
|
-
"declaration": {
|
|
71
|
-
"name": "BaseTestStory",
|
|
72
|
-
"module": "src/patient-profile/patient-profile.stories.ts"
|
|
73
|
-
}
|
|
74
40
|
}
|
|
75
41
|
]
|
|
76
42
|
},
|
|
@@ -117,6 +83,14 @@
|
|
|
117
83
|
},
|
|
118
84
|
"attribute": "api-key"
|
|
119
85
|
},
|
|
86
|
+
{
|
|
87
|
+
"kind": "field",
|
|
88
|
+
"name": "preferences",
|
|
89
|
+
"type": {
|
|
90
|
+
"text": "PatientProfilePreferences | undefined"
|
|
91
|
+
},
|
|
92
|
+
"attribute": "preferences"
|
|
93
|
+
},
|
|
120
94
|
{
|
|
121
95
|
"kind": "field",
|
|
122
96
|
"name": "moreInformationVisible",
|
|
@@ -274,6 +248,13 @@
|
|
|
274
248
|
"text": "string | undefined"
|
|
275
249
|
},
|
|
276
250
|
"fieldName": "apiKey"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "preferences",
|
|
254
|
+
"type": {
|
|
255
|
+
"text": "PatientProfilePreferences | undefined"
|
|
256
|
+
},
|
|
257
|
+
"fieldName": "preferences"
|
|
277
258
|
}
|
|
278
259
|
],
|
|
279
260
|
"superclass": {
|
|
@@ -307,32 +288,15 @@
|
|
|
307
288
|
"kind": "javascript-module",
|
|
308
289
|
"path": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts",
|
|
309
290
|
"declarations": [
|
|
310
|
-
{
|
|
311
|
-
"kind": "variable",
|
|
312
|
-
"name": "meta",
|
|
313
|
-
"type": {
|
|
314
|
-
"text": "Meta<PatientProfileEdition>"
|
|
315
|
-
},
|
|
316
|
-
"default": "{\n component: \"bcb-commentary-modal\",\n parameters: {\n deepControls: { enabled: true },\n },\n tags: [\"autodocs\"],\n render: (args: PatientProfileEdition) => html`\n <div style=\"height: 400px;\">\n <bcbd-button \n @click=${(event: Event) => {\n const button = event.target as HTMLElement;\n const modal = button.parentElement?.querySelector(\"bcb-patient-profile-edition\") as PatientProfileEdition;\n if (modal) {\n modal.open();\n }\n }}\n >\n Ouvrir la modal\n </bcbd-button>\n <bcb-patient-profile-edition .patientProfile=${args.patientProfile}\n .apiUrl=${args.apiUrl}\n .apiKey=${args.apiKey}></bcb-patient-profile-edition>\n </div>\n `,\n argTypes: {\n apiUrl: {\n description: \"URL de l'API pour récupérer et sauvegarder le profil patient\",\n control: { type: \"text\" },\n },\n apiKey: {\n description: \"Clé API pour authentifier les requêtes vers l'API\",\n control: { type: \"text\" },\n },\n patientProfile: {\n description: \"Profil du patient à éditer\",\n control: { type: \"object\" },\n },\n },\n}"
|
|
317
|
-
},
|
|
318
291
|
{
|
|
319
292
|
"kind": "variable",
|
|
320
293
|
"name": "Base",
|
|
321
294
|
"type": {
|
|
322
|
-
"text": "
|
|
323
|
-
}
|
|
324
|
-
"default": "{\n args: {\n patientProfile: patientComplete,\n apiUrl: \"https://api-dev.claudebernard.fr\",\n },\n play: async({ canvasElement, step }) => {\n const component = canvasElement.querySelector(\"bcb-patient-profile-edition\") as PatientProfileEdition | null;\n const modal = component?.shadowRoot?.querySelector(\"bcbd-modal\") as HTMLElement | null;\n const openButton = canvasElement.querySelector(\"bcbd-button\") as HTMLElement | null;\n openButton?.click();\n const modalTitle = modal?.shadowRoot?.querySelector(\"div.claudebernard-modal__header\") as HTMLElement | null;\n\n await step(\"Verify the modal is opened and well displayed\", () => {\n expect(modal).toBeVisible();\n expect(modalTitle?.textContent).toContain(\"Édition du profil patient\");\n expect(component?.shadowRoot?.querySelectorAll(\"bcbd-input\").length).toBe(10);\n expect(component?.shadowRoot?.querySelectorAll(\"bcbd-select\").length).toBe(6);\n expect(component?.shadowRoot?.querySelectorAll(\"bcbd-checkbox\").length).toBe(2);\n expect(component?.shadowRoot?.querySelectorAll(\".claudebernard-edition-modal-subtitle\")?.[0]?.textContent).toContain(\"Insuffisance rénale\");\n expect(component?.shadowRoot?.querySelectorAll(\".claudebernard-edition-modal-subtitle\")?.[1]?.textContent).toContain(\"Insuffisance hépatique\");\n const saveButton = component?.shadowRoot?.querySelector(\"bcbd-button[data-test-id=\\\"save-button\\\"]\");\n const cancelButton = component?.shadowRoot?.querySelector(\"bcbd-button[data-test-id=\\\"cancel-button\\\"]\");\n\n expect(saveButton).not.toBeNull();\n expect(cancelButton).not.toBeNull();\n });\n\n // eslint-disable-next-line complexity\n await step(\"Verify all the patient information is here\", () => {\n const nameSelect = component?.shadowRoot?.querySelector(\"bcbd-select[data-test-id=\\\"name-select\\\"]\") as HTMLElement | null;\n expect(nameSelect?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Marie Dupont\");\n\n const sexSelect = component?.shadowRoot?.querySelector(\"bcbd-select[data-test-id=\\\"sex-select\\\"]\") as HTMLElement | null;\n expect(sexSelect?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Féminin\");\n\n const sizeInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"size-input\\\"]\") as HTMLElement | null;\n expect(sizeInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"170\");\n\n const ageInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"age-input\\\"]\") as HTMLElement | null;\n expect(ageInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"42\");\n\n const ageUnitSelect = component?.shadowRoot?.querySelector(\"bcbd-select[data-test-id=\\\"age-unit-select\\\"]\") as HTMLElement | null;\n expect(ageUnitSelect?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Ans\");\n\n const weightInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"weight-input\\\"]\") as HTMLElement | null;\n expect(weightInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"84\");\n\n const pregnancyCheckbox = component?.shadowRoot?.querySelector(\"bcbd-checkbox[data-test-id=\\\"pregnancy-checkbox\\\"]\") as HTMLElement | null;\n expect(pregnancyCheckbox?.shadowRoot?.querySelector(\"input\")?.checked).toBe(true);\n\n const gestationalInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"gestational-input\\\"]\") as HTMLElement | null;\n expect(gestationalInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"20\");\n\n const breastfeedingCheckbox = component?.shadowRoot\n ?.querySelector(\"bcbd-checkbox[data-test-id=\\\"breastfeeding-checkbox\\\"]\") as HTMLElement | null;\n expect(breastfeedingCheckbox?.shadowRoot?.querySelector(\"input\")?.checked).toBe(true);\n\n const pathologiesSelect = component?.shadowRoot?.querySelector(\"bcbd-select[data-test-id=\\\"pathologies-select\\\"]\") as HTMLElement | null;\n const pathologiesValues = pathologiesSelect?.shadowRoot?.querySelectorAll(\"bcbd-badge\");\n expect(pathologiesValues?.length).toBe(4);\n expect(pathologiesValues?.[0]?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Insuffisance hépatique\");\n expect(pathologiesValues?.[1]?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Insuffisance rénale aigüe\");\n expect(pathologiesValues?.[2]?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Insuffisance hépatique modérée\");\n expect(pathologiesValues?.[3]?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Insuffisance cardiaque\");\n\n const allergiesSelect = component?.shadowRoot?.querySelector(\"bcbd-select[data-test-id=\\\"allergies-select\\\"]\") as HTMLElement | null;\n const allergiesValues = allergiesSelect?.shadowRoot?.querySelectorAll(\"bcbd-badge\");\n expect(allergiesValues?.length).toBe(1);\n expect(allergiesValues?.[0]?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Allergie au paracétamol\");\n\n const creatinineByUmolInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"creatinine-umol-input\\\"]\") as HTMLElement | null;\n expect(creatinineByUmolInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"121\");\n\n const creatinineBymglInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"creatinine-mgl-input\\\"]\") as HTMLElement | null;\n expect(creatinineBymglInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"14\");\n\n const clearanceInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"clearance-input\\\"]\") as HTMLElement | null;\n expect(clearanceInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"71\");\n\n const dfgInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"dfg-input\\\"]\") as HTMLElement | null;\n expect(dfgInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"45\");\n\n const hepaticStadeSelect = component?.shadowRoot?.querySelector(\"bcbd-select[data-test-id=\\\"hepatic-stade-select\\\"]\") as HTMLElement | null;\n expect(hepaticStadeSelect?.shadowRoot?.querySelector(\"span\")).toHaveTextContent(\"Stade B\");\n\n const hepaticScoreInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"hepatic-score-input\\\"]\") as HTMLElement | null;\n expect(hepaticScoreInput?.shadowRoot?.querySelector(\"input\")?.value).toBe(\"7\");\n });\n\n await step(\"Verify if error message goes well displayed on size input\", async() => {\n const sizeInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"size-input\\\"]\") as HTMLElement;\n const validateButton = component?.shadowRoot?.querySelector(\"bcbd-button[data-test-id=\\\"save-button\\\"]\") as HTMLElement;\n expect(validateButton.getAttribute(\"disabled\")).toBe(null);\n expect(sizeInput?.getAttribute(\"warning-msg\")).toBe(\"\");\n const sizeInputField = sizeInput?.shadowRoot?.querySelector(\"input\") as HTMLInputElement;\n //Test invalid size\n sizeInputField.value = \"0\";\n sizeInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(sizeInput?.getAttribute(\"warning-msg\")).toBe(\"La taille n'est pas valide\");\n\n await new Promise(requestAnimationFrame);\n await new Promise((resolve) => setTimeout(resolve, 0));\n\n sizeInputField.value = \"400\";\n sizeInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(sizeInput?.getAttribute(\"warning-msg\")).toBe(\"La taille n'est pas valide\");\n expect(validateButton.getAttribute(\"disabled\")).not.toBe(null);\n\n //Test valid size\n sizeInputField.value = \"170\";\n sizeInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(sizeInput?.getAttribute(\"warning-msg\")).toBe(\"\");\n await new Promise(requestAnimationFrame);\n await new Promise((resolve) => setTimeout(resolve, 0));\n expect(validateButton.getAttribute(\"disabled\")).toBe(null);\n });\n\n await step(\"Verify if error message goes well displayed on age input\", async() => {\n const ageInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"age-input\\\"]\") as HTMLElement;\n const validateButton = component?.shadowRoot?.querySelector(\"bcbd-button[data-test-id=\\\"save-button\\\"]\") as HTMLElement;\n expect(validateButton.getAttribute(\"disabled\")).toBe(null);\n expect(ageInput?.getAttribute(\"warning-msg\")).toBe(\"\");\n const ageInputField = ageInput?.shadowRoot?.querySelector(\"input\") as HTMLInputElement;\n //Test invalid age\n ageInputField.value = \"1\";\n ageInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(ageInput?.getAttribute(\"warning-msg\")).toBe(\"L'âge doit être exprimé en mois si inférieur à 2 ans\");\n await new Promise(requestAnimationFrame);\n await new Promise((resolve) => setTimeout(resolve, 0));\n expect(validateButton.getAttribute(\"disabled\")).not.toBe(null);\n\n ageInputField.value = \"300\";\n ageInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(ageInput?.getAttribute(\"warning-msg\")).toBe(\"L'âge ne doit pas dépasser 150 ans\");\n\n //Test valid age\n ageInputField.value = \"41\";\n ageInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(ageInput?.getAttribute(\"warning-msg\")).toBe(\"\");\n await new Promise(requestAnimationFrame);\n await new Promise((resolve) => setTimeout(resolve, 0));\n expect(validateButton.getAttribute(\"disabled\")).toBe(null);\n\n //Change unit to months and test invalid age\n const ageUnitSelect = component?.shadowRoot?.querySelector(\"bcbd-select[data-test-id=\\\"age-unit-select\\\"]\") as HTMLElement;\n expect(ageUnitSelect).not.toBeNull();\n ageUnitSelect!.click();\n let shadowRoot = (ageUnitSelect as any).shadowRoot as ShadowRoot;\n expect(shadowRoot).not.toBeNull();\n const optionMois = shadowRoot.querySelector<HTMLElement>(\"div[data-test-id=\\\"select-option-mois\\\"]\") as HTMLElement;\n optionMois.click();\n\n expect(ageInput?.getAttribute(\"warning-msg\")).toBe(\"L'âge en mois ne doit pas dépasser 23 mois, veuillez compter en années\");\n\n //Go back like initial state\n ageUnitSelect.click();\n await new Promise(requestAnimationFrame);\n await new Promise((resolve) => setTimeout(resolve, 0));\n shadowRoot = (ageUnitSelect as any).shadowRoot as ShadowRoot;\n const optionAns = shadowRoot.querySelector<HTMLElement>(\"div[data-test-id=\\\"select-option-ans\\\"]\") as HTMLElement;\n optionAns.click();\n });\n\n await step(\"Verify if error message goes well displayed on weight input\", async() => {\n const weightInput = component?.shadowRoot?.querySelector(\"bcbd-input[data-test-id=\\\"weight-input\\\"]\") as HTMLElement;\n const validateButton = component?.shadowRoot?.querySelector(\"bcbd-button[data-test-id=\\\"save-button\\\"]\") as HTMLElement;\n expect(validateButton.getAttribute(\"disabled\")).toBe(null);\n expect(weightInput?.getAttribute(\"warning-msg\")).toBe(\"\");\n const weightInputField = weightInput?.shadowRoot?.querySelector(\"input\") as HTMLInputElement;\n //Test invalid weight\n weightInputField.value = \"320\";\n weightInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(weightInput?.getAttribute(\"warning-msg\")).toBe(\"Le poids ne doit pas dépasser 300kg\");\n await new Promise(requestAnimationFrame);\n await new Promise((resolve) => setTimeout(resolve, 0));\n expect(validateButton.getAttribute(\"disabled\")).not.toBe(null);\n\n //Test valid weight\n weightInputField.value = \"84\";\n weightInputField.dispatchEvent(new Event(\"input\", { bubbles: true, composed: true }));\n expect(weightInput?.getAttribute(\"warning-msg\")).toBe(\"\");\n await new Promise(requestAnimationFrame);\n await new Promise((resolve) => setTimeout(resolve, 0));\n expect(validateButton.getAttribute(\"disabled\")).toBe(null);\n });\n },\n}"
|
|
295
|
+
"text": "WebComponentsStory<any, any>"
|
|
296
|
+
}
|
|
325
297
|
}
|
|
326
298
|
],
|
|
327
299
|
"exports": [
|
|
328
|
-
{
|
|
329
|
-
"kind": "js",
|
|
330
|
-
"name": "default",
|
|
331
|
-
"declaration": {
|
|
332
|
-
"name": "meta",
|
|
333
|
-
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts"
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
300
|
{
|
|
337
301
|
"kind": "js",
|
|
338
302
|
"name": "Base",
|
|
@@ -376,6 +340,14 @@
|
|
|
376
340
|
},
|
|
377
341
|
"attribute": "api-key"
|
|
378
342
|
},
|
|
343
|
+
{
|
|
344
|
+
"kind": "field",
|
|
345
|
+
"name": "preferences",
|
|
346
|
+
"type": {
|
|
347
|
+
"text": "PatientProfilePreferences | undefined"
|
|
348
|
+
},
|
|
349
|
+
"attribute": "preferences"
|
|
350
|
+
},
|
|
379
351
|
{
|
|
380
352
|
"kind": "field",
|
|
381
353
|
"name": "patientAge",
|
|
@@ -916,15 +888,7 @@
|
|
|
916
888
|
"type": {
|
|
917
889
|
"text": "void"
|
|
918
890
|
}
|
|
919
|
-
}
|
|
920
|
-
"parameters": [
|
|
921
|
-
{
|
|
922
|
-
"name": "event",
|
|
923
|
-
"type": {
|
|
924
|
-
"text": "CustomEvent"
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
]
|
|
891
|
+
}
|
|
928
892
|
},
|
|
929
893
|
{
|
|
930
894
|
"kind": "method",
|
|
@@ -976,6 +940,13 @@
|
|
|
976
940
|
"text": "string | undefined"
|
|
977
941
|
},
|
|
978
942
|
"fieldName": "apiKey"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"name": "preferences",
|
|
946
|
+
"type": {
|
|
947
|
+
"text": "PatientProfilePreferences | undefined"
|
|
948
|
+
},
|
|
949
|
+
"fieldName": "preferences"
|
|
979
950
|
}
|
|
980
951
|
],
|
|
981
952
|
"superclass": {
|
|
@@ -1239,6 +1210,12 @@
|
|
|
1239
1210
|
"text": "string"
|
|
1240
1211
|
}
|
|
1241
1212
|
},
|
|
1213
|
+
{
|
|
1214
|
+
"name": "typePathology",
|
|
1215
|
+
"type": {
|
|
1216
|
+
"text": "\"AMM\" | \"CIM10\" | \"\""
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1242
1219
|
{
|
|
1243
1220
|
"name": "params",
|
|
1244
1221
|
"type": {
|
|
@@ -8,6 +8,7 @@ export declare class PatientProfile extends LitElement {
|
|
|
8
8
|
editButtonVisible: boolean | undefined;
|
|
9
9
|
apiUrl: string;
|
|
10
10
|
apiKey: string | undefined;
|
|
11
|
+
preferences: PatientProfilePreferences | undefined;
|
|
11
12
|
moreInformationVisible: boolean;
|
|
12
13
|
patientAgeUnit: "ans" | "mois";
|
|
13
14
|
private editionModalElement;
|
|
@@ -27,11 +28,22 @@ export declare class PatientProfile extends LitElement {
|
|
|
27
28
|
static styles: CSSResult;
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
export declare interface PatientProfilePreferences {
|
|
32
|
+
/**
|
|
33
|
+
* Filtre le type de pathologie utilisé lors de l'appel fetchPathologiesByTerm.
|
|
34
|
+
* - "AMM" : pathologies avec Autorisation de Mise sur le Marché
|
|
35
|
+
* - "CIM10" : pathologies selon la classification CIM-10
|
|
36
|
+
* - "" : aucun filtre (toutes les pathologies)
|
|
37
|
+
*/
|
|
38
|
+
typePathology?: "AMM" | "CIM10" | "";
|
|
39
|
+
}
|
|
40
|
+
|
|
30
41
|
export declare interface PatientProfileProps {
|
|
31
42
|
patientProfile?: Bundle;
|
|
32
43
|
editButtonVisible?: boolean;
|
|
33
44
|
apiUrl: string;
|
|
34
45
|
apiKey?: string;
|
|
46
|
+
preferences?: PatientProfilePreferences;
|
|
35
47
|
}
|
|
36
48
|
|
|
37
49
|
export { }
|
|
@@ -1571,7 +1571,7 @@ function e(e2, r2) {
|
|
|
1571
1571
|
} });
|
|
1572
1572
|
};
|
|
1573
1573
|
}
|
|
1574
|
-
const patientProfileCSS = '@charset "UTF-8";\n.claudebernard-patient-profile {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n padding: 1rem;\n border-radius: 0.5rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__separator {\n border-right: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n}\n.claudebernard-patient-profile__first-info-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 0.5rem;\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__first-info-container {\n flex-direction: column;\n gap: 1rem;\n align-items: center;\n }\n}\n.claudebernard-patient-profile__id-info-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 0.5rem;\n}\n.claudebernard-patient-profile__name-info {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__id-info {\n width: fit-content;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n border-radius: 1rem;\n display: flex;\n flex-direction: row;\n padding: 0 0.8rem;\n gap: 0.5rem;\n}\n.claudebernard-patient-profile__id-info-info {\n padding: 0.2rem 0;\n white-space: nowrap;\n}\n.claudebernard-patient-profile__physical-info-container {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__physical-info-container {\n gap: 0.5rem;\n }\n}\n.claudebernard-patient-profile__physical-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n padding: 1rem 0;\n}\n.claudebernard-patient-profile__physical-info-result {\n white-space: nowrap;\n}\n.claudebernard-patient-profile__physical-info-label {\n color: var(--bcbd-gray-600-color, #475569);\n}\n.claudebernard-patient-profile__action-buttons-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-content: center;\n flex-wrap: wrap;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__action-buttons-container {\n gap: 0.5rem;\n }\n}\n.claudebernard-patient-profile__second-info-container {\n margin-top: 1rem;\n display: none;\n}\n.claudebernard-patient-profile__second-info-container.active {\n display: flex;\n flex-direction: column;\n}\n.claudebernard-patient-profile__second-info {\n margin-top: 1rem;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip {\n display: inline-block;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip > span {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__second-info-label {\n padding-right: 0.5rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__second-info-label {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__second-info-result.sep-dots > * + *::before {\n content: "•";\n margin: 0 0.5rem;\n}';
|
|
1574
|
+
const patientProfileCSS = '@charset "UTF-8";\n.claudebernard-patient-profile {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n padding: 1rem;\n border-radius: 0.5rem;\n background-color: var(--bcbd-white-color, #FFFFFF);\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__separator {\n border-right: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n}\n.claudebernard-patient-profile__first-info-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 0.5rem;\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__first-info-container {\n flex-direction: column;\n gap: 1rem;\n align-items: center;\n }\n}\n.claudebernard-patient-profile__id-info-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 0.5rem;\n}\n.claudebernard-patient-profile__name-info {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__id-info {\n width: fit-content;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n border-radius: 1rem;\n display: flex;\n flex-direction: row;\n padding: 0 0.8rem;\n gap: 0.5rem;\n}\n.claudebernard-patient-profile__id-info-info {\n padding: 0.2rem 0;\n white-space: nowrap;\n}\n.claudebernard-patient-profile__physical-info-container {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__physical-info-container {\n gap: 0.5rem;\n }\n}\n.claudebernard-patient-profile__physical-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n padding: 1rem 0;\n}\n.claudebernard-patient-profile__physical-info-result {\n white-space: nowrap;\n}\n.claudebernard-patient-profile__physical-info-label {\n color: var(--bcbd-gray-600-color, #475569);\n}\n.claudebernard-patient-profile__action-buttons-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-content: center;\n flex-wrap: wrap;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__action-buttons-container {\n gap: 0.5rem;\n }\n}\n.claudebernard-patient-profile__second-info-container {\n margin-top: 1rem;\n display: none;\n}\n.claudebernard-patient-profile__second-info-container.active {\n display: flex;\n flex-direction: column;\n}\n.claudebernard-patient-profile__second-info {\n margin-top: 1rem;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip {\n display: inline-block;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip > span {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__second-info-label {\n padding-right: 0.5rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__second-info-label {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__second-info-result.sep-dots > * + *::before {\n content: "•";\n margin: 0 0.5rem;\n}';
|
|
1575
1575
|
const sexOptions = [
|
|
1576
1576
|
{ value: "male", label: "Masculin" },
|
|
1577
1577
|
{ value: "female", label: "Féminin" },
|
|
@@ -1586,8 +1586,8 @@ const ageOptions = [
|
|
|
1586
1586
|
{ value: "ans", label: "Ans" },
|
|
1587
1587
|
{ value: "mois", label: "Mois" }
|
|
1588
1588
|
];
|
|
1589
|
-
const fetchPathologiesByTerm = async (term, params, apiUrl) => {
|
|
1590
|
-
const response = await fetch(`${apiUrl}/search/pathologies/?term=${term}`, {
|
|
1589
|
+
const fetchPathologiesByTerm = async (term, typePathology, params, apiUrl) => {
|
|
1590
|
+
const response = await fetch(`${apiUrl}/search/pathologies/?term=${term}&typePathology=${typePathology}`, {
|
|
1591
1591
|
method: "POST",
|
|
1592
1592
|
headers: {
|
|
1593
1593
|
"Content-Type": "application/json"
|
|
@@ -1868,7 +1868,8 @@ let PatientProfileEdition = class extends i {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
const valueSearch = event.detail.value;
|
|
1870
1870
|
if (valueSearch.length > 2) {
|
|
1871
|
-
|
|
1871
|
+
const typePathology = this.preferences?.typePathology ?? "";
|
|
1872
|
+
fetchPathologiesByTerm(valueSearch, typePathology, new SearchRequestBody({}), this.apiUrl).then((response) => {
|
|
1872
1873
|
this.pathologyOptions = [];
|
|
1873
1874
|
this.pathologyOptions = response.content.map((pathology) => this.apiReturntoSelectOption(pathology));
|
|
1874
1875
|
this.pathologiesApiErrorMessage = "";
|
|
@@ -1912,20 +1913,18 @@ let PatientProfileEdition = class extends i {
|
|
|
1912
1913
|
this.selectedAllergyOptions = [...updatedSelections, ...newSelections];
|
|
1913
1914
|
this.allergyOptions = [];
|
|
1914
1915
|
}
|
|
1915
|
-
handleHepaticStade(
|
|
1916
|
-
|
|
1917
|
-
this.childPughInput.value = "";
|
|
1918
|
-
}
|
|
1916
|
+
handleHepaticStade() {
|
|
1917
|
+
this.childPughInput.value = "";
|
|
1919
1918
|
}
|
|
1920
1919
|
handleHepaticScore() {
|
|
1921
1920
|
const childPughInputScore = Number(this.childPughInput?.value ?? "");
|
|
1922
1921
|
if (isNaN(childPughInputScore) || childPughInputScore <= 0) {
|
|
1923
|
-
this.
|
|
1922
|
+
this.defaultHepaticStade = {};
|
|
1924
1923
|
} else {
|
|
1925
1924
|
const stade = childPughScore(childPughInputScore);
|
|
1926
1925
|
const selectedOption = hepaticStadeOptions.find((option) => option.label === stade);
|
|
1927
1926
|
if (selectedOption) {
|
|
1928
|
-
this.
|
|
1927
|
+
this.defaultHepaticStade = { value: selectedOption.value, label: selectedOption.label };
|
|
1929
1928
|
}
|
|
1930
1929
|
}
|
|
1931
1930
|
}
|
|
@@ -2122,6 +2121,9 @@ __decorateClass$1([
|
|
|
2122
2121
|
__decorateClass$1([
|
|
2123
2122
|
n2({ type: String, attribute: "api-key" })
|
|
2124
2123
|
], PatientProfileEdition.prototype, "apiKey", 2);
|
|
2124
|
+
__decorateClass$1([
|
|
2125
|
+
n2({ type: Object })
|
|
2126
|
+
], PatientProfileEdition.prototype, "preferences", 2);
|
|
2125
2127
|
__decorateClass$1([
|
|
2126
2128
|
r()
|
|
2127
2129
|
], PatientProfileEdition.prototype, "patientAge", 2);
|
|
@@ -2486,6 +2488,7 @@ let PatientProfile = class extends i {
|
|
|
2486
2488
|
${this.displayHepaticInsufficiencySection()}
|
|
2487
2489
|
</div>
|
|
2488
2490
|
<bcb-patient-profile-edition .patientProfile=${this.patientProfile} .apiUrl=${this.apiUrl} .apiKey=${this.apiKey}
|
|
2491
|
+
.preferences=${this.preferences}
|
|
2489
2492
|
@editPatientProfile=${this.editProfilePatient}></bcb-patient-profile-edition>
|
|
2490
2493
|
</div>
|
|
2491
2494
|
`;
|
|
@@ -2504,6 +2507,9 @@ __decorateClass([
|
|
|
2504
2507
|
__decorateClass([
|
|
2505
2508
|
n2({ type: String, attribute: "api-key" })
|
|
2506
2509
|
], PatientProfile.prototype, "apiKey", 2);
|
|
2510
|
+
__decorateClass([
|
|
2511
|
+
n2({ type: Object })
|
|
2512
|
+
], PatientProfile.prototype, "preferences", 2);
|
|
2507
2513
|
__decorateClass([
|
|
2508
2514
|
r()
|
|
2509
2515
|
], PatientProfile.prototype, "moreInformationVisible", 2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudebernard/patient-profile-element",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"main": "dist/patient-profile.es.js",
|
|
5
5
|
"module": "dist/patient-profile.es.js",
|
|
6
6
|
"types": "dist/patient-profile.d.ts",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"vite-tsconfig-paths": "^5.1.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@chromatic-com/storybook": "^
|
|
47
|
+
"@chromatic-com/storybook": "^5.0.1",
|
|
48
48
|
"@custom-elements-manifest/analyzer": "^0.9.0",
|
|
49
49
|
"@hey-api/openapi-ts": "0.86.8",
|
|
50
50
|
"@lit/localize-tools": "^0.8.0",
|
|
51
51
|
"@playwright/test": "^1.58.1",
|
|
52
|
-
"@storybook/addon-a11y": "^10.
|
|
53
|
-
"@storybook/addon-links": "^10.
|
|
54
|
-
"@storybook/addon-vitest": "^10.
|
|
55
|
-
"@storybook/web-components": "^10.
|
|
56
|
-
"@storybook/web-components-vite": "^10.
|
|
52
|
+
"@storybook/addon-a11y": "^10.2.11",
|
|
53
|
+
"@storybook/addon-links": "^10.2.11",
|
|
54
|
+
"@storybook/addon-vitest": "^10.2.11",
|
|
55
|
+
"@storybook/web-components": "^10.2.11",
|
|
56
|
+
"@storybook/web-components-vite": "^10.2.11",
|
|
57
57
|
"@claudebernard/storybook-addon-theme-switcher": "0.1.0",
|
|
58
58
|
"@stylistic/eslint-plugin": "^5.5.0",
|
|
59
59
|
"@types/fhir": "^0.0.41",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"eslint": "^9.38.0",
|
|
68
68
|
"eslint-plugin-import": "2.32.0",
|
|
69
69
|
"eslint-plugin-lit": "^2.1.1",
|
|
70
|
-
"eslint-plugin-storybook": "^10.
|
|
70
|
+
"eslint-plugin-storybook": "^10.2.11",
|
|
71
71
|
"lit-analyzer": "^2.0.3",
|
|
72
72
|
"playwright": "^1.58.1",
|
|
73
73
|
"sass": "^1.79.4",
|
|
74
|
-
"storybook": "^10.
|
|
74
|
+
"storybook": "^10.2.11",
|
|
75
75
|
"ts-lit-plugin": "^2.0.2",
|
|
76
76
|
"ts-node": "^10.9.2",
|
|
77
77
|
"tslib": "^2.6.2",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vitest": "^4.0.7"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
-
"@claudebernard/design-system": "^2.
|
|
85
|
+
"@claudebernard/design-system": "^2.28.5",
|
|
86
86
|
"@claudebernard/types": "^0.34.0"
|
|
87
87
|
},
|
|
88
88
|
"customElements": "dist/custom-elements.json",
|
|
@@ -144,5 +144,10 @@
|
|
|
144
144
|
],
|
|
145
145
|
"@semantic-release/gitlab"
|
|
146
146
|
]
|
|
147
|
+
},
|
|
148
|
+
"overrides": {
|
|
149
|
+
"@microsoft/api-extractor": {
|
|
150
|
+
"minimatch": "^10.2.2"
|
|
151
|
+
}
|
|
147
152
|
}
|
|
148
153
|
}
|