@ltht-react/flag-detail 2.0.62 → 2.0.64

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/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # FlagDetail
2
-
3
- <!-- STORY -->
4
-
5
- ### Import
6
-
7
- ```js
8
- import FlagDetail from '@ltht-react/flag-detail'
9
- ```
10
-
11
- ### Usage
12
-
13
- ```jsx
14
- <FlagDetail />
15
- ```
1
+ # FlagDetail
2
+
3
+ <!-- STORY -->
4
+
5
+ ### Import
6
+
7
+ ```js
8
+ import FlagDetail from '@ltht-react/flag-detail'
9
+ ```
10
+
11
+ ### Usage
12
+
13
+ ```jsx
14
+ <FlagDetail />
15
+ ```
package/lib/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { Flag } from '@ltht-react/types';
3
+ import { CollapsibleDetailCollectionProps } from '@ltht-react/type-detail';
4
+ declare const FlagDetail: FC<Props>;
5
+ interface Props extends CollapsibleDetailCollectionProps {
6
+ flag: Flag;
7
+ }
8
+ export default FlagDetail;
package/lib/index.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var jsx_runtime_1 = require("react/jsx-runtime");
4
+ var types_1 = require("@ltht-react/types");
5
+ var utils_1 = require("@ltht-react/utils");
6
+ var type_detail_1 = require("@ltht-react/type-detail");
7
+ var FlagDetail = function (_a) {
8
+ var flag = _a.flag, _b = _a.viewType, viewType = _b === void 0 ? types_1.DetailViewType.Compact : _b;
9
+ return ((0, jsx_runtime_1.jsxs)(type_detail_1.CollapsibleDetailCollection, { viewType: viewType, children: [(0, jsx_runtime_1.jsx)(type_detail_1.CodeableConceptDetail, { term: "Code", concept: flag === null || flag === void 0 ? void 0 : flag.code }), (0, jsx_runtime_1.jsx)(type_detail_1.StringDetail, { term: "Status", description: flag.status.toString() }), (0, jsx_runtime_1.jsx)(type_detail_1.CodeableConceptDetail, { term: "Category", concept: flag === null || flag === void 0 ? void 0 : flag.category }), (0, jsx_runtime_1.jsx)(type_detail_1.PeriodDetail, { period: flag === null || flag === void 0 ? void 0 : flag.period }), (0, jsx_runtime_1.jsx)(type_detail_1.NarrativeDetail, { narrative: flag === null || flag === void 0 ? void 0 : flag.text }), (0, jsx_runtime_1.jsx)(type_detail_1.StringDetail, { term: "Advice", description: (0, utils_1.getStringExtension)(flag === null || flag === void 0 ? void 0 : flag.extension, 'https://leedsth.nhs.uk/alert/advice'), parse: false }), (0, jsx_runtime_1.jsx)(type_detail_1.ResourceReferenceDetail, { term: "Author", resourceReference: flag === null || flag === void 0 ? void 0 : flag.author })] }));
10
+ };
11
+ exports.default = FlagDetail;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AACA,2CAAwD;AACxD,2CAAsD;AAEtD,uDAQgC;AAEhC,IAAM,UAAU,GAAc,UAAC,EAA2C;QAAzC,IAAI,UAAA,EAAE,gBAAiC,EAAjC,QAAQ,mBAAG,sBAAc,CAAC,OAAO,KAAA;IAAO,OAAA,CAC7E,wBAAC,yCAA2B,IAAC,QAAQ,EAAE,QAAQ,aAC7C,uBAAC,mCAAqB,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,GAAI,EAC1D,uBAAC,0BAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAI,EACnE,uBAAC,mCAAqB,IAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,GAAI,EAClE,uBAAC,0BAAY,IAAC,MAAM,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,GAAI,EACtC,uBAAC,6BAAe,IAAC,SAAS,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,GAAI,EAC1C,uBAAC,0BAAY,IACX,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE,IAAA,0BAAkB,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,qCAAqC,CAAC,EACvF,KAAK,EAAE,KAAK,GACZ,EACF,uBAAC,qCAAuB,IAAC,IAAI,EAAC,QAAQ,EAAC,iBAAiB,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,GAAI,IAC9C,CAC/B;AAd8E,CAc9E,CAAA;AAMD,kBAAe,UAAU,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ltht-react/flag-detail",
3
- "version": "2.0.62",
3
+ "version": "2.0.64",
4
4
  "description": "ltht-react clinical FlagDetail component.",
5
5
  "author": "LTHT",
6
6
  "homepage": "",
@@ -28,11 +28,11 @@
28
28
  "dependencies": {
29
29
  "@emotion/react": "^11.0.0",
30
30
  "@emotion/styled": "^11.0.0",
31
- "@ltht-react/styles": "^2.0.62",
32
- "@ltht-react/type-detail": "^2.0.62",
33
- "@ltht-react/types": "^2.0.62",
34
- "@ltht-react/utils": "^2.0.62",
31
+ "@ltht-react/styles": "^2.0.64",
32
+ "@ltht-react/type-detail": "^2.0.64",
33
+ "@ltht-react/types": "^2.0.64",
34
+ "@ltht-react/utils": "^2.0.64",
35
35
  "react": "^18.2.0"
36
36
  },
37
- "gitHead": "9b18b5726598e1643a8ee1f105773dea28bb1664"
37
+ "gitHead": "0cba014a75df54769f93f6dfa1a2c69a77296a4a"
38
38
  }
package/src/index.tsx CHANGED
@@ -1,35 +1,35 @@
1
- import { FC } from 'react'
2
- import { DetailViewType, Flag } from '@ltht-react/types'
3
- import { getStringExtension } from '@ltht-react/utils'
4
-
5
- import {
6
- CodeableConceptDetail,
7
- StringDetail,
8
- PeriodDetail,
9
- NarrativeDetail,
10
- ResourceReferenceDetail,
11
- CollapsibleDetailCollectionProps,
12
- CollapsibleDetailCollection,
13
- } from '@ltht-react/type-detail'
14
-
15
- const FlagDetail: FC<Props> = ({ flag, viewType = DetailViewType.Compact }) => (
16
- <CollapsibleDetailCollection viewType={viewType}>
17
- <CodeableConceptDetail term="Code" concept={flag?.code} />
18
- <StringDetail term="Status" description={flag.status.toString()} />
19
- <CodeableConceptDetail term="Category" concept={flag?.category} />
20
- <PeriodDetail period={flag?.period} />
21
- <NarrativeDetail narrative={flag?.text} />
22
- <StringDetail
23
- term="Advice"
24
- description={getStringExtension(flag?.extension, 'https://leedsth.nhs.uk/alert/advice')}
25
- parse={false}
26
- />
27
- <ResourceReferenceDetail term="Author" resourceReference={flag?.author} />
28
- </CollapsibleDetailCollection>
29
- )
30
-
31
- interface Props extends CollapsibleDetailCollectionProps {
32
- flag: Flag
33
- }
34
-
35
- export default FlagDetail
1
+ import { FC } from 'react'
2
+ import { DetailViewType, Flag } from '@ltht-react/types'
3
+ import { getStringExtension } from '@ltht-react/utils'
4
+
5
+ import {
6
+ CodeableConceptDetail,
7
+ StringDetail,
8
+ PeriodDetail,
9
+ NarrativeDetail,
10
+ ResourceReferenceDetail,
11
+ CollapsibleDetailCollectionProps,
12
+ CollapsibleDetailCollection,
13
+ } from '@ltht-react/type-detail'
14
+
15
+ const FlagDetail: FC<Props> = ({ flag, viewType = DetailViewType.Compact }) => (
16
+ <CollapsibleDetailCollection viewType={viewType}>
17
+ <CodeableConceptDetail term="Code" concept={flag?.code} />
18
+ <StringDetail term="Status" description={flag.status.toString()} />
19
+ <CodeableConceptDetail term="Category" concept={flag?.category} />
20
+ <PeriodDetail period={flag?.period} />
21
+ <NarrativeDetail narrative={flag?.text} />
22
+ <StringDetail
23
+ term="Advice"
24
+ description={getStringExtension(flag?.extension, 'https://leedsth.nhs.uk/alert/advice')}
25
+ parse={false}
26
+ />
27
+ <ResourceReferenceDetail term="Author" resourceReference={flag?.author} />
28
+ </CollapsibleDetailCollection>
29
+ )
30
+
31
+ interface Props extends CollapsibleDetailCollectionProps {
32
+ flag: Flag
33
+ }
34
+
35
+ export default FlagDetail