@myhealth-belgium/webcomponent-therapeutic-relations 0.1.5 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # 1.0.1
2
+
3
+ **Bug fixes:**
4
+
5
+ - Remove infinite scrolling to avoid scrolling in scrolling
6
+
7
+ # 1.0.0
8
+
9
+ **Bug fixes:**
10
+
11
+ - Updated README.md
12
+ - Added cards on small screen.
13
+ - Updated to be compliant with [integration library](https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration) 5.0.0.
14
+ - Reworked build process to export TypeScript declartion (`index.d.ts`) file.
15
+ - Renamed the package & webcomponent from `mh-webcomponent-therapeutic-relations` to `mh-web-component-therapeutic-relations` to be compliant with requirements.
16
+ - Added `cdk-scroll-view-height` input parameter, and added docs for it.
17
+
1
18
  # 0.1.5
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, simply import the package's JavaScript and CSS into your application:
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/webcomponent-therapeutic-relations';
13
- ```
12
+ import { manifest, bootstrap } from '@myhealth-belgium/web-component-therapeutic-relations';
14
13
 
15
- ```scss
16
- @use '@myhealth-belgium/webcomponent-therapeutic-relations/styles.css';
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
- Then, implement the webcomponent in your HTML according to [MyHealth - Web Component Integration](https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration)'s guidelines. Example:
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
- ```html
22
- <mh-webcomponent-therapeutic-relations
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
- ### Design kit integration
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/webcomponent-therapeutic-relations/styles.css` will execute the mixins below.
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,3 @@
1
+ import './lib/styles.scss';
2
+ import 'zone.js';
3
+ export { manifest, bootstrap } from './lib/main';
@@ -0,0 +1,10 @@
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
+ ngOnInit(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TherapeuticRelationsWebComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<TherapeuticRelationsWebComponent, "mh-web-component-therapeutic-relations", never, {}, {}, never, never, true, never>;
10
+ }
package/lib/main.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { MyHealthModuleBootstrap, MyHealthModuleManifest } from '@smals-belgium/myhealth-wc-integration';
2
+ export declare const tagName: string;
3
+ export declare const manifest: MyHealthModuleManifest;
4
+ export declare const bootstrap: MyHealthModuleBootstrap;
@@ -0,0 +1,3 @@
1
+ import { HealthcareOrganisation, HealthcareProfessional } from '@myhealth-belgium/api';
2
+ export declare const healthcarePartyMock: HealthcareProfessional[];
3
+ export declare const healthcareOrginsationMock: HealthcareOrganisation[];
@@ -0,0 +1,2 @@
1
+ import { TherapeuticRelation } from '@myhealth-belgium/api';
2
+ export declare const therapeuticRelationsMock: TherapeuticRelation[];
@@ -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
+ }