@myhealth-belgium/webcomponent-therapeutic-relations 0.1.3 → 1.0.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/CHANGELOG.md +17 -0
- package/README.md +42 -16
- package/index.d.ts +3 -0
- package/lib/components/therapeutic-relations-web.component.d.ts +11 -0
- package/lib/main.d.ts +4 -0
- package/lib/mock/healthcare-party-mock.d.ts +3 -0
- package/lib/mock/therapeutic-relations-mock.d.ts +2 -0
- package/lib/services/healthcare-party/healthcare-party-webcomponent.service.d.ts +19 -0
- package/lib/services/therapeutic-relations/therapeutic-relations-webcomponent.service.d.ts +16 -0
- package/main.mjs +94403 -0
- package/main.umd.js +3485 -0
- package/package.json +8 -8
- package/styles.css +1 -1
- package/assets/main-Bhu-EXC9.js +0 -1381
- package/assets/polyfills-C4iAblqc.js +0 -2
- package/main.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# 1.0.0
|
|
2
|
+
|
|
3
|
+
**Bug fixes:**
|
|
4
|
+
|
|
5
|
+
- Updated README.md
|
|
6
|
+
- Added cards on small screen.
|
|
7
|
+
- Updated to be compliant with [integration library](https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration) 5.0.0.
|
|
8
|
+
- Reworked build process to export TypeScript declartion (`index.d.ts`) file.
|
|
9
|
+
- Renamed the package & webcomponent from `mh-webcomponent-therapeutic-relations` to `mh-web-component-therapeutic-relations` to be compliant with requirements.
|
|
10
|
+
- Added `cdk-scroll-view-height` input parameter, and added docs for it.
|
|
11
|
+
|
|
12
|
+
# 0.1.5
|
|
13
|
+
|
|
14
|
+
**Bug fixes:**
|
|
15
|
+
|
|
16
|
+
- Fix issue with Authorizatiion header showing incorrectly.
|
|
17
|
+
|
|
1
18
|
# 0.1.3
|
|
2
19
|
|
|
3
20
|
**Bug fixes:**
|
package/README.md
CHANGED
|
@@ -6,39 +6,58 @@ All MyHealth webcomponents implement the [MyHealth - Web Component Integration](
|
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
9
|
-
To use the MyHealth Webcomponent Therapeutic Relations,
|
|
9
|
+
To use the MyHealth Webcomponent Therapeutic Relations, import and call the package's boostrap into your application:
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
-
import '@myhealth-belgium/
|
|
13
|
-
```
|
|
12
|
+
import { manifest, bootstrap } from '@myhealth-belgium/web-component-therapeutic-relations';
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
// Call bootstrap function with your HostSettings & HostServices
|
|
15
|
+
bootstrap({ settings: SETTINGS, services: SERVICES });
|
|
16
|
+
|
|
17
|
+
// Place the webcomponent in your HTML for it to render
|
|
18
|
+
return <mh-web-component-therapeutic-relations></mh-web-component-therapeutic-relations>;
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
To integrate the design-kit, also import the webcomponent's styles in your code. For more information, see **Design kit integration**.
|
|
20
22
|
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
version="${hostSpecVersion}"
|
|
24
|
-
language="${Language.EN}"
|
|
25
|
-
config-name="${Configuration.DEMO}"
|
|
26
|
-
services="${services}"
|
|
27
|
-
></mh-webcomponent-therapeutic-relations>
|
|
23
|
+
```ts
|
|
24
|
+
import '@myhealth-belgium/web-component-therapeutic-relations/styles.css';
|
|
28
25
|
```
|
|
29
26
|
|
|
27
|
+
### Bootstrap settings and services
|
|
28
|
+
|
|
29
|
+
The `bootstrap()` function is called with 2 objects, `HostSettings` and `HostServices`. These follow the guidelines provided by the [MyHealth - Web Component Integration](https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration).
|
|
30
|
+
|
|
31
|
+
The `HostSettings` will define the component's inputs, however these can be overriden by passing these settings as attributes to the component's HTML implementation.
|
|
32
|
+
|
|
33
|
+
### Manifest, inputs & outputs
|
|
34
|
+
|
|
35
|
+
Each MyHealth webcomponent provides a `manifest` constant that is compliant with the guidelines provided by the [MyHealth - Web Component Integration](https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration).
|
|
36
|
+
|
|
37
|
+
The manifest can be viewed to see the component(s) inside the package, as well as required additional inputs and outputs that the component may emit.
|
|
38
|
+
|
|
39
|
+
#### Therapeutic Relations component
|
|
40
|
+
|
|
41
|
+
`tagName`: `<mh-web-component-therapeutic-relations />`
|
|
42
|
+
|
|
43
|
+
| Property | Type | Required | Description |
|
|
44
|
+
| ------------------------ | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| `user-language` | `UserLanguage` | No | The language for the webcomponent interface. Automatically updates the translation service when changed. |
|
|
46
|
+
| `config-name` | `ConfigName` | No | The configuration name that determines the environment and API endpoints. Set to `"demo"` to use mock data instead of API calls. |
|
|
47
|
+
| `cdk-scroll-view-height` | `string` | No | The height of the CDK scroll with cards that is displayed on mobile. Injected as CSS and should thus be a number followed by any [CSS size unit](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Values_and_units). F.e.: `500px`. |
|
|
48
|
+
|
|
30
49
|
### Mock data
|
|
31
50
|
|
|
32
|
-
There is an option to display simple mock data with this webcomponent by changing the `config-name` attribute passed to the webcomponent to: `config-name="demo"`.
|
|
51
|
+
There is an option to display simple mock data with this webcomponent by changing the `config-name` attribute passed to the webcomponent to: `config-name="demo"`, or configure it in `HostSettings`.
|
|
33
52
|
When in demo mode, the webcomponent will not make API calls and use standard mock data instead.
|
|
34
53
|
|
|
35
|
-
|
|
54
|
+
## Design kit integration
|
|
36
55
|
|
|
37
56
|
As stated before, all MyHealth webcomponents use the [MyHealth - Angular design kit](https://www.npmjs.com/package/@myhealth-belgium/design-kit) package.
|
|
38
57
|
|
|
39
58
|
This means all webcomponents use the core functionality of the design kit, and override the Material components that the webcomponent consumes.
|
|
40
59
|
|
|
41
|
-
By default, importing `@myhealth-belgium/
|
|
60
|
+
By default, importing `@myhealth-belgium/web-component-therapeutic-relations/styles.css` will execute the mixins below.
|
|
42
61
|
|
|
43
62
|
```scss
|
|
44
63
|
@include mh.core();
|
|
@@ -46,3 +65,10 @@ By default, importing `@myhealth-belgium/webcomponent-therapeutic-relations/styl
|
|
|
46
65
|
```
|
|
47
66
|
|
|
48
67
|
You **can leave out the styling** if you **provide** these **mixins yourself** using the [MyHealth - Angular design kit](https://www.npmjs.com/package/@myhealth-belgium/design-kit).
|
|
68
|
+
|
|
69
|
+
<hr>
|
|
70
|
+
|
|
71
|
+
This package is owned and maintained by:
|
|
72
|
+
|
|
73
|
+
> [FPS Health](https://www.health.belgium.be/en), Food Chain Safety & Environment
|
|
74
|
+
> [Av. Galilée 5 bus 2, 1210 Brussels](https://share.google/UrNwQwxN1O5eFZQaO)
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { BaseWebComponent } from '@myhealth-belgium/web-component-utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TherapeuticRelationsWebComponent extends BaseWebComponent implements OnInit {
|
|
5
|
+
private readonly healthcarePartyService;
|
|
6
|
+
private readonly therapeuticRelationService;
|
|
7
|
+
readonly cdkScrollViewHeight: import("@angular/core").InputSignal<string>;
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TherapeuticRelationsWebComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TherapeuticRelationsWebComponent, "mh-web-component-therapeutic-relations", never, { "cdkScrollViewHeight": { "alias": "cdkScrollViewHeight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
package/lib/main.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HealthcareOrganisation, HealthcareOrganisationType, HealthcareProfessional, HealthcareProfessionalType } from '@myhealth-belgium/api';
|
|
2
|
+
import { AbstractHealthcarePartyService } from '@myhealth-belgium/shared-ui';
|
|
3
|
+
import { ConfigName } from '@smals-belgium/myhealth-wc-integration';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
export declare class HealthcarePartyWebcomponentService implements AbstractHealthcarePartyService {
|
|
6
|
+
configuration: ConfigName;
|
|
7
|
+
private readonly healthcarePartyService;
|
|
8
|
+
setConfigName(configName: ConfigName): void;
|
|
9
|
+
searchHealthcareParty(params: {
|
|
10
|
+
name?: string;
|
|
11
|
+
firstName?: string;
|
|
12
|
+
func: HealthcareProfessionalType;
|
|
13
|
+
}): Observable<Array<HealthcareProfessional>>;
|
|
14
|
+
searchHealthcareOrganisation(params: {
|
|
15
|
+
name?: string;
|
|
16
|
+
zip?: string;
|
|
17
|
+
organisationType: HealthcareOrganisationType;
|
|
18
|
+
}): Observable<Array<HealthcareOrganisation>>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CreateTherapeuticRelation, DeleteTherapeuticRelation, TherapeuticRelation } from '@myhealth-belgium/api';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AbstractTherapeuticRelationService } from '@myhealth-belgium/therapeutic-relations';
|
|
4
|
+
import { ConfigName } from '@smals-belgium/myhealth-wc-integration';
|
|
5
|
+
export declare class TherapeuticRelationsWebcomponentService implements AbstractTherapeuticRelationService {
|
|
6
|
+
configuration: ConfigName;
|
|
7
|
+
private readonly therapeuticRelationService;
|
|
8
|
+
setConfigName(configName: ConfigName): void;
|
|
9
|
+
getTherapeuticRelations(): Observable<Array<TherapeuticRelation>>;
|
|
10
|
+
addTherapeuticRelation(params: {
|
|
11
|
+
body: CreateTherapeuticRelation;
|
|
12
|
+
}): Observable<string>;
|
|
13
|
+
deleteTherapeuticRelation(params: {
|
|
14
|
+
body: DeleteTherapeuticRelation;
|
|
15
|
+
}): Observable<string>;
|
|
16
|
+
}
|