@ltht-react/community-treatment-order-summary 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.
Files changed (26) hide show
  1. package/README.md +27 -27
  2. package/lib/atoms/community-treatment-order-summary-consent.d.ts +7 -0
  3. package/lib/atoms/community-treatment-order-summary-consent.js +42 -0
  4. package/lib/atoms/community-treatment-order-summary-consent.js.map +1 -0
  5. package/lib/atoms/community-treatment-order-summary-restrictions.d.ts +7 -0
  6. package/lib/atoms/community-treatment-order-summary-restrictions.js +42 -0
  7. package/lib/atoms/community-treatment-order-summary-restrictions.js.map +1 -0
  8. package/lib/atoms/community-treatment-order-summary-status.d.ts +7 -0
  9. package/lib/atoms/community-treatment-order-summary-status.js +42 -0
  10. package/lib/atoms/community-treatment-order-summary-status.js.map +1 -0
  11. package/lib/index.d.ts +2 -0
  12. package/lib/index.js +8 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/molecules/community-treatment-order-redacted.d.ts +7 -0
  15. package/lib/molecules/community-treatment-order-redacted.js +21 -0
  16. package/lib/molecules/community-treatment-order-redacted.js.map +1 -0
  17. package/lib/organisms/community-treatment-order-summary.d.ts +7 -0
  18. package/lib/organisms/community-treatment-order-summary.js +51 -0
  19. package/lib/organisms/community-treatment-order-summary.js.map +1 -0
  20. package/package.json +7 -7
  21. package/src/atoms/community-treatment-order-summary-consent.tsx +24 -24
  22. package/src/atoms/community-treatment-order-summary-restrictions.tsx +24 -24
  23. package/src/atoms/community-treatment-order-summary-status.tsx +22 -22
  24. package/src/index.tsx +3 -3
  25. package/src/molecules/community-treatment-order-redacted.tsx +31 -31
  26. package/src/organisms/community-treatment-order-summary.tsx +50 -50
package/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # Community Treatment Order Summary
2
-
3
- <!-- STORY -->
4
-
5
- ### Import
6
-
7
- ```js
8
- import CommunityTreatmentOrderSummary from '@ltht-react/community-treatment-order-summary'
9
- ```
10
-
11
- ### Usage
12
-
13
- ```jsx
14
- <CommunityTreatmentOrderSummary
15
- title="Community Treatment Orders"
16
- communityTreatmentOrders={communityTreatmentOrders}
17
- clickHandler={handleClick}
18
- />
19
- ```
20
-
21
- ### Properties
22
-
23
- | Prop | Required | Default | Type | Description |
24
- | :------------------------- | :------- | :------------------------- | :----------------------------- | :-------------------------------------------------- |
25
- | `title` | No | Community Treatment Orders | string | Header text |
26
- | `communityTreatmentOrders` | Yes | | LypftCommunityTreatmentOrder[] | Array of community treatment orders to display |
27
- | `clickHandler` | No | undefined | Function | Callback click handler containing the selected item |
1
+ # Community Treatment Order Summary
2
+
3
+ <!-- STORY -->
4
+
5
+ ### Import
6
+
7
+ ```js
8
+ import CommunityTreatmentOrderSummary from '@ltht-react/community-treatment-order-summary'
9
+ ```
10
+
11
+ ### Usage
12
+
13
+ ```jsx
14
+ <CommunityTreatmentOrderSummary
15
+ title="Community Treatment Orders"
16
+ communityTreatmentOrders={communityTreatmentOrders}
17
+ clickHandler={handleClick}
18
+ />
19
+ ```
20
+
21
+ ### Properties
22
+
23
+ | Prop | Required | Default | Type | Description |
24
+ | :------------------------- | :------- | :------------------------- | :----------------------------- | :-------------------------------------------------- |
25
+ | `title` | No | Community Treatment Orders | string | Header text |
26
+ | `communityTreatmentOrders` | Yes | | LypftCommunityTreatmentOrder[] | Array of community treatment orders to display |
27
+ | `clickHandler` | No | undefined | Function | Callback click handler containing the selected item |
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types';
3
+ declare const CommunityTreatmentOrderSummaryConsent: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ communityTreatmentOrder: LypftCommunityTreatmentOrder;
6
+ }
7
+ export default CommunityTreatmentOrderSummaryConsent;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __rest = (this && this.__rest) || function (s, e) {
18
+ var t = {};
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20
+ t[p] = s[p];
21
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
22
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
24
+ t[p[i]] = s[p[i]];
25
+ }
26
+ return t;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ var jsx_runtime_1 = require("react/jsx-runtime");
33
+ var styled_1 = __importDefault(require("@emotion/styled"));
34
+ var styles_1 = require("@ltht-react/styles");
35
+ var StyledCommunityTreatmentOrderSummaryConsent = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: right;\n font-size: smaller;\n padding-top: 0.25rem;\n"], ["\n color: ", ";\n text-align: right;\n font-size: smaller;\n padding-top: 0.25rem;\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE);
36
+ var CommunityTreatmentOrderSummaryConsent = function (_a) {
37
+ var communityTreatmentOrder = _a.communityTreatmentOrder, rest = __rest(_a, ["communityTreatmentOrder"]);
38
+ return ((0, jsx_runtime_1.jsx)(StyledCommunityTreatmentOrderSummaryConsent, __assign({}, rest, { children: communityTreatmentOrder.consentToTreat && communityTreatmentOrder.consentToTreat })));
39
+ };
40
+ exports.default = CommunityTreatmentOrderSummaryConsent;
41
+ var templateObject_1;
42
+ //# sourceMappingURL=community-treatment-order-summary-consent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-treatment-order-summary-consent.js","sourceRoot":"","sources":["../../src/atoms/community-treatment-order-summary-consent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AAGjD,IAAM,2CAA2C,GAAG,gBAAM,CAAC,GAAG,6JAAA,aACnD,EAA4B,2EAItC,KAJU,qBAAY,CAAC,SAAS,CAAC,KAAK,CAItC,CAAA;AAED,IAAM,qCAAqC,GAAc,UAAC,EAAoC;IAAlC,IAAA,uBAAuB,6BAAA,EAAK,IAAI,cAAlC,2BAAoC,CAAF;IAAO,OAAA,CACjG,uBAAC,2CAA2C,eAAK,IAAI,cAClD,uBAAuB,CAAC,cAAc,IAAI,uBAAuB,CAAC,cAAc,IACrC,CAC/C,CAAA;CAAA,CAAA;AAMD,kBAAe,qCAAqC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types';
3
+ declare const CommunityTreatmentOrderSummaryRestrictions: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ communityTreatmentOrder: LypftCommunityTreatmentOrder;
6
+ }
7
+ export default CommunityTreatmentOrderSummaryRestrictions;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __rest = (this && this.__rest) || function (s, e) {
18
+ var t = {};
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20
+ t[p] = s[p];
21
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
22
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
24
+ t[p[i]] = s[p[i]];
25
+ }
26
+ return t;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ var jsx_runtime_1 = require("react/jsx-runtime");
33
+ var styled_1 = __importDefault(require("@emotion/styled"));
34
+ var styles_1 = require("@ltht-react/styles");
35
+ var StyledCommunityTreatmentOrderSummaryRestrictions = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n"], ["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE);
36
+ var CommunityTreatmentOrderSummaryRestrictions = function (_a) {
37
+ var communityTreatmentOrder = _a.communityTreatmentOrder, rest = __rest(_a, ["communityTreatmentOrder"]);
38
+ return ((0, jsx_runtime_1.jsx)(StyledCommunityTreatmentOrderSummaryRestrictions, __assign({}, rest, { children: communityTreatmentOrder.restrictions && communityTreatmentOrder.restrictions })));
39
+ };
40
+ exports.default = CommunityTreatmentOrderSummaryRestrictions;
41
+ var templateObject_1;
42
+ //# sourceMappingURL=community-treatment-order-summary-restrictions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-treatment-order-summary-restrictions.js","sourceRoot":"","sources":["../../src/atoms/community-treatment-order-summary-restrictions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AAGjD,IAAM,gDAAgD,GAAG,gBAAM,CAAC,GAAG,4JAAA,aACxD,EAA4B,0EAItC,KAJU,qBAAY,CAAC,SAAS,CAAC,KAAK,CAItC,CAAA;AAED,IAAM,0CAA0C,GAAc,UAAC,EAAoC;IAAlC,IAAA,uBAAuB,6BAAA,EAAK,IAAI,cAAlC,2BAAoC,CAAF;IAAO,OAAA,CACtG,uBAAC,gDAAgD,eAAK,IAAI,cACvD,uBAAuB,CAAC,YAAY,IAAI,uBAAuB,CAAC,YAAY,IAC5B,CACpD,CAAA;CAAA,CAAA;AAMD,kBAAe,0CAA0C,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types';
3
+ declare const CommunityTreatmentOrderConsent: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ communityTreatmentOrder: LypftCommunityTreatmentOrder;
6
+ }
7
+ export default CommunityTreatmentOrderConsent;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __rest = (this && this.__rest) || function (s, e) {
18
+ var t = {};
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20
+ t[p] = s[p];
21
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
22
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
24
+ t[p[i]] = s[p[i]];
25
+ }
26
+ return t;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ var jsx_runtime_1 = require("react/jsx-runtime");
33
+ var styled_1 = __importDefault(require("@emotion/styled"));
34
+ var styles_1 = require("@ltht-react/styles");
35
+ var StyledCommunityTreatmentOrderConsent = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: left;\n"], ["\n color: ", ";\n text-align: left;\n"])), styles_1.TEXT_COLOURS.PRIMARY);
36
+ var CommunityTreatmentOrderConsent = function (_a) {
37
+ var communityTreatmentOrder = _a.communityTreatmentOrder, rest = __rest(_a, ["communityTreatmentOrder"]);
38
+ return ((0, jsx_runtime_1.jsx)(StyledCommunityTreatmentOrderConsent, __assign({}, rest, { children: communityTreatmentOrder.legalStatus && communityTreatmentOrder.legalStatus.text })));
39
+ };
40
+ exports.default = CommunityTreatmentOrderConsent;
41
+ var templateObject_1;
42
+ //# sourceMappingURL=community-treatment-order-summary-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-treatment-order-summary-status.js","sourceRoot":"","sources":["../../src/atoms/community-treatment-order-summary-status.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AAGjD,IAAM,oCAAoC,GAAG,gBAAM,CAAC,GAAG,4GAAA,aAC5C,EAAoB,0BAE9B,KAFU,qBAAY,CAAC,OAAO,CAE9B,CAAA;AAED,IAAM,8BAA8B,GAAc,UAAC,EAAoC;IAAlC,IAAA,uBAAuB,6BAAA,EAAK,IAAI,cAAlC,2BAAoC,CAAF;IAAO,OAAA,CAC1F,uBAAC,oCAAoC,eAAK,IAAI,cAC3C,uBAAuB,CAAC,WAAW,IAAI,uBAAuB,CAAC,WAAW,CAAC,IAAI,IAC3C,CACxC,CAAA;CAAA,CAAA;AAMD,kBAAe,8BAA8B,CAAA"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import CommunityTreatmentOrderSummary from './organisms/community-treatment-order-summary';
2
+ export default CommunityTreatmentOrderSummary;
package/lib/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var community_treatment_order_summary_1 = __importDefault(require("./organisms/community-treatment-order-summary"));
7
+ exports.default = community_treatment_order_summary_1.default;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;AAAA,oHAA0F;AAE1F,kBAAe,2CAA8B,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types';
3
+ declare const CommunityTreatmentOrderRedacted: FC<Props>;
4
+ interface Props {
5
+ communityTreatmentOrder: LypftCommunityTreatmentOrder;
6
+ }
7
+ export default CommunityTreatmentOrderRedacted;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ var jsx_runtime_1 = require("react/jsx-runtime");
11
+ var styled_1 = __importDefault(require("@emotion/styled"));
12
+ var type_summary_1 = require("@ltht-react/type-summary");
13
+ var StyledRedactedDescription = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 1;\n text-align: left;\n"], ["\n flex-grow: 1;\n text-align: left;\n"])));
14
+ var StyledPeriodSummary = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: right;\n"], ["\n text-align: right;\n"])));
15
+ var CommunityTreatmentOrderRedacted = function (_a) {
16
+ var communityTreatmentOrder = _a.communityTreatmentOrder;
17
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(StyledRedactedDescription, { children: (0, jsx_runtime_1.jsx)(type_summary_1.RedactedDescription, {}) }), (0, jsx_runtime_1.jsx)(StyledPeriodSummary, { children: (0, jsx_runtime_1.jsx)(type_summary_1.PeriodSummary, { period: communityTreatmentOrder.period }) })] }));
18
+ };
19
+ exports.default = CommunityTreatmentOrderRedacted;
20
+ var templateObject_1, templateObject_2;
21
+ //# sourceMappingURL=community-treatment-order-redacted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-treatment-order-redacted.js","sourceRoot":"","sources":["../../src/molecules/community-treatment-order-redacted.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,2DAAoC;AAGpC,yDAA6E;AAE7E,IAAM,yBAAyB,GAAG,gBAAM,CAAC,GAAG,6GAAA,0CAG3C,IAAA,CAAA;AAED,IAAM,mBAAmB,GAAG,gBAAM,CAAC,GAAG,6FAAA,0BAErC,IAAA,CAAA;AAED,IAAM,+BAA+B,GAAc,UAAC,EAA2B;QAAzB,uBAAuB,6BAAA;IAAO,OAAA,CAClF,6DACE,uBAAC,yBAAyB,cACxB,uBAAC,kCAAmB,KAAG,GACG,EAC5B,uBAAC,mBAAmB,cAClB,uBAAC,4BAAa,IAAC,MAAM,EAAE,uBAAuB,CAAC,MAAM,GAAI,GACrC,IACrB,CACJ;AATmF,CASnF,CAAA;AAMD,kBAAe,+BAA+B,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types';
3
+ declare const CommunityTreatmentOrderSummary: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ communityTreatmentOrder: LypftCommunityTreatmentOrder;
6
+ }
7
+ export default CommunityTreatmentOrderSummary;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __rest = (this && this.__rest) || function (s, e) {
18
+ var t = {};
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20
+ t[p] = s[p];
21
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
22
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
24
+ t[p[i]] = s[p[i]];
25
+ }
26
+ return t;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ var jsx_runtime_1 = require("react/jsx-runtime");
33
+ var styled_1 = __importDefault(require("@emotion/styled"));
34
+ var type_summary_1 = require("@ltht-react/type-summary");
35
+ var community_treatment_order_summary_consent_1 = __importDefault(require("../atoms/community-treatment-order-summary-consent"));
36
+ var community_treatment_order_summary_restrictions_1 = __importDefault(require("../atoms/community-treatment-order-summary-restrictions"));
37
+ var community_treatment_order_summary_status_1 = __importDefault(require("../atoms/community-treatment-order-summary-status"));
38
+ var community_treatment_order_redacted_1 = __importDefault(require("../molecules/community-treatment-order-redacted"));
39
+ var StyledSummary = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n"], ["\n display: flex;\n justify-content: center;\n"])));
40
+ var StyledDescription = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex-grow: 1;\n"], ["\n flex-grow: 1;\n"])));
41
+ var StyledDate = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n text-align: right;\n"], ["\n text-align: right;\n"])));
42
+ var CommunityTreatmentOrderSummary = function (_a) {
43
+ var communityTreatmentOrder = _a.communityTreatmentOrder, rest = __rest(_a, ["communityTreatmentOrder"]);
44
+ if (communityTreatmentOrder.metadata.isRedacted) {
45
+ return ((0, jsx_runtime_1.jsx)(StyledSummary, __assign({}, rest, { children: (0, jsx_runtime_1.jsx)(community_treatment_order_redacted_1.default, { communityTreatmentOrder: communityTreatmentOrder }) })));
46
+ }
47
+ return ((0, jsx_runtime_1.jsxs)(StyledSummary, __assign({}, rest, { children: [(0, jsx_runtime_1.jsxs)(StyledDescription, { children: [(0, jsx_runtime_1.jsx)(community_treatment_order_summary_status_1.default, { communityTreatmentOrder: communityTreatmentOrder }), (0, jsx_runtime_1.jsx)(community_treatment_order_summary_restrictions_1.default, { communityTreatmentOrder: communityTreatmentOrder })] }), (0, jsx_runtime_1.jsxs)(StyledDate, { children: [(0, jsx_runtime_1.jsx)(type_summary_1.PeriodSummary, { period: communityTreatmentOrder.period }), (0, jsx_runtime_1.jsx)(community_treatment_order_summary_consent_1.default, { communityTreatmentOrder: communityTreatmentOrder })] })] })));
48
+ };
49
+ exports.default = CommunityTreatmentOrderSummary;
50
+ var templateObject_1, templateObject_2, templateObject_3;
51
+ //# sourceMappingURL=community-treatment-order-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-treatment-order-summary.js","sourceRoot":"","sources":["../../src/organisms/community-treatment-order-summary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAGpC,yDAAwD;AAExD,iIAAwE;AACxE,2IAAkF;AAClF,+HAAsE;AACtE,uHAAsE;AAEtE,IAAM,aAAa,GAAG,gBAAM,CAAC,GAAG,qHAAA,kDAG/B,IAAA,CAAA;AACD,IAAM,iBAAiB,GAAG,gBAAM,CAAC,GAAG,wFAAA,qBAEnC,IAAA,CAAA;AACD,IAAM,UAAU,GAAG,gBAAM,CAAC,GAAG,6FAAA,0BAE5B,IAAA,CAAA;AAED,IAAM,8BAA8B,GAAc,UAAC,EAAoC;IAAlC,IAAA,uBAAuB,6BAAA,EAAK,IAAI,cAAlC,2BAAoC,CAAF;IACnF,IAAI,uBAAuB,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChD,OAAO,CACL,uBAAC,aAAa,eAAK,IAAI,cACrB,uBAAC,4CAAQ,IAAC,uBAAuB,EAAE,uBAAuB,GAAI,IAChD,CACjB,CAAA;IACH,CAAC;IAED,OAAO,CACL,wBAAC,aAAa,eAAK,IAAI,eACrB,wBAAC,iBAAiB,eAChB,uBAAC,kDAAM,IAAC,uBAAuB,EAAE,uBAAuB,GAAI,EAC5D,uBAAC,wDAAY,IAAC,uBAAuB,EAAE,uBAAuB,GAAI,IAChD,EACpB,wBAAC,UAAU,eACT,uBAAC,4BAAa,IAAC,MAAM,EAAE,uBAAuB,CAAC,MAAM,GAAI,EACzD,uBAAC,mDAAO,IAAC,uBAAuB,EAAE,uBAAuB,GAAI,IAClD,KACC,CACjB,CAAA;AACH,CAAC,CAAA;AAMD,kBAAe,8BAA8B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ltht-react/community-treatment-order-summary",
3
- "version": "2.0.62",
3
+ "version": "2.0.64",
4
4
  "description": "ltht-react clinical CommunityTreatmentOrderSummary component.",
5
5
  "author": "LTHT",
6
6
  "homepage": "",
@@ -24,12 +24,12 @@
24
24
  "dependencies": {
25
25
  "@emotion/react": "^11.0.0",
26
26
  "@emotion/styled": "^11.0.0",
27
- "@ltht-react/list": "^2.0.62",
28
- "@ltht-react/styles": "^2.0.62",
29
- "@ltht-react/type-summary": "^2.0.62",
30
- "@ltht-react/types": "^2.0.62",
31
- "@ltht-react/utils": "^2.0.62",
27
+ "@ltht-react/list": "^2.0.64",
28
+ "@ltht-react/styles": "^2.0.64",
29
+ "@ltht-react/type-summary": "^2.0.64",
30
+ "@ltht-react/types": "^2.0.64",
31
+ "@ltht-react/utils": "^2.0.64",
32
32
  "react": "^18.2.0"
33
33
  },
34
- "gitHead": "9b18b5726598e1643a8ee1f105773dea28bb1664"
34
+ "gitHead": "0cba014a75df54769f93f6dfa1a2c69a77296a4a"
35
35
  }
@@ -1,24 +1,24 @@
1
- import { FC, HTMLAttributes } from 'react'
2
- import styled from '@emotion/styled'
3
-
4
- import { TEXT_COLOURS } from '@ltht-react/styles'
5
- import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
6
-
7
- const StyledCommunityTreatmentOrderSummaryConsent = styled.div`
8
- color: ${TEXT_COLOURS.SECONDARY.VALUE};
9
- text-align: right;
10
- font-size: smaller;
11
- padding-top: 0.25rem;
12
- `
13
-
14
- const CommunityTreatmentOrderSummaryConsent: FC<Props> = ({ communityTreatmentOrder, ...rest }) => (
15
- <StyledCommunityTreatmentOrderSummaryConsent {...rest}>
16
- {communityTreatmentOrder.consentToTreat && communityTreatmentOrder.consentToTreat}
17
- </StyledCommunityTreatmentOrderSummaryConsent>
18
- )
19
-
20
- interface Props extends HTMLAttributes<HTMLDivElement> {
21
- communityTreatmentOrder: LypftCommunityTreatmentOrder
22
- }
23
-
24
- export default CommunityTreatmentOrderSummaryConsent
1
+ import { FC, HTMLAttributes } from 'react'
2
+ import styled from '@emotion/styled'
3
+
4
+ import { TEXT_COLOURS } from '@ltht-react/styles'
5
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
6
+
7
+ const StyledCommunityTreatmentOrderSummaryConsent = styled.div`
8
+ color: ${TEXT_COLOURS.SECONDARY.VALUE};
9
+ text-align: right;
10
+ font-size: smaller;
11
+ padding-top: 0.25rem;
12
+ `
13
+
14
+ const CommunityTreatmentOrderSummaryConsent: FC<Props> = ({ communityTreatmentOrder, ...rest }) => (
15
+ <StyledCommunityTreatmentOrderSummaryConsent {...rest}>
16
+ {communityTreatmentOrder.consentToTreat && communityTreatmentOrder.consentToTreat}
17
+ </StyledCommunityTreatmentOrderSummaryConsent>
18
+ )
19
+
20
+ interface Props extends HTMLAttributes<HTMLDivElement> {
21
+ communityTreatmentOrder: LypftCommunityTreatmentOrder
22
+ }
23
+
24
+ export default CommunityTreatmentOrderSummaryConsent
@@ -1,24 +1,24 @@
1
- import { FC, HTMLAttributes } from 'react'
2
- import styled from '@emotion/styled'
3
-
4
- import { TEXT_COLOURS } from '@ltht-react/styles'
5
- import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
6
-
7
- const StyledCommunityTreatmentOrderSummaryRestrictions = styled.div`
8
- color: ${TEXT_COLOURS.SECONDARY.VALUE};
9
- text-align: left;
10
- font-size: smaller;
11
- padding-top: 0.25rem;
12
- `
13
-
14
- const CommunityTreatmentOrderSummaryRestrictions: FC<Props> = ({ communityTreatmentOrder, ...rest }) => (
15
- <StyledCommunityTreatmentOrderSummaryRestrictions {...rest}>
16
- {communityTreatmentOrder.restrictions && communityTreatmentOrder.restrictions}
17
- </StyledCommunityTreatmentOrderSummaryRestrictions>
18
- )
19
-
20
- interface Props extends HTMLAttributes<HTMLDivElement> {
21
- communityTreatmentOrder: LypftCommunityTreatmentOrder
22
- }
23
-
24
- export default CommunityTreatmentOrderSummaryRestrictions
1
+ import { FC, HTMLAttributes } from 'react'
2
+ import styled from '@emotion/styled'
3
+
4
+ import { TEXT_COLOURS } from '@ltht-react/styles'
5
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
6
+
7
+ const StyledCommunityTreatmentOrderSummaryRestrictions = styled.div`
8
+ color: ${TEXT_COLOURS.SECONDARY.VALUE};
9
+ text-align: left;
10
+ font-size: smaller;
11
+ padding-top: 0.25rem;
12
+ `
13
+
14
+ const CommunityTreatmentOrderSummaryRestrictions: FC<Props> = ({ communityTreatmentOrder, ...rest }) => (
15
+ <StyledCommunityTreatmentOrderSummaryRestrictions {...rest}>
16
+ {communityTreatmentOrder.restrictions && communityTreatmentOrder.restrictions}
17
+ </StyledCommunityTreatmentOrderSummaryRestrictions>
18
+ )
19
+
20
+ interface Props extends HTMLAttributes<HTMLDivElement> {
21
+ communityTreatmentOrder: LypftCommunityTreatmentOrder
22
+ }
23
+
24
+ export default CommunityTreatmentOrderSummaryRestrictions
@@ -1,22 +1,22 @@
1
- import { FC, HTMLAttributes } from 'react'
2
- import styled from '@emotion/styled'
3
-
4
- import { TEXT_COLOURS } from '@ltht-react/styles'
5
- import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
6
-
7
- const StyledCommunityTreatmentOrderConsent = styled.div`
8
- color: ${TEXT_COLOURS.PRIMARY};
9
- text-align: left;
10
- `
11
-
12
- const CommunityTreatmentOrderConsent: FC<Props> = ({ communityTreatmentOrder, ...rest }) => (
13
- <StyledCommunityTreatmentOrderConsent {...rest}>
14
- {communityTreatmentOrder.legalStatus && communityTreatmentOrder.legalStatus.text}
15
- </StyledCommunityTreatmentOrderConsent>
16
- )
17
-
18
- interface Props extends HTMLAttributes<HTMLDivElement> {
19
- communityTreatmentOrder: LypftCommunityTreatmentOrder
20
- }
21
-
22
- export default CommunityTreatmentOrderConsent
1
+ import { FC, HTMLAttributes } from 'react'
2
+ import styled from '@emotion/styled'
3
+
4
+ import { TEXT_COLOURS } from '@ltht-react/styles'
5
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
6
+
7
+ const StyledCommunityTreatmentOrderConsent = styled.div`
8
+ color: ${TEXT_COLOURS.PRIMARY};
9
+ text-align: left;
10
+ `
11
+
12
+ const CommunityTreatmentOrderConsent: FC<Props> = ({ communityTreatmentOrder, ...rest }) => (
13
+ <StyledCommunityTreatmentOrderConsent {...rest}>
14
+ {communityTreatmentOrder.legalStatus && communityTreatmentOrder.legalStatus.text}
15
+ </StyledCommunityTreatmentOrderConsent>
16
+ )
17
+
18
+ interface Props extends HTMLAttributes<HTMLDivElement> {
19
+ communityTreatmentOrder: LypftCommunityTreatmentOrder
20
+ }
21
+
22
+ export default CommunityTreatmentOrderConsent
package/src/index.tsx CHANGED
@@ -1,3 +1,3 @@
1
- import CommunityTreatmentOrderSummary from './organisms/community-treatment-order-summary'
2
-
3
- export default CommunityTreatmentOrderSummary
1
+ import CommunityTreatmentOrderSummary from './organisms/community-treatment-order-summary'
2
+
3
+ export default CommunityTreatmentOrderSummary
@@ -1,31 +1,31 @@
1
- import { FC } from 'react'
2
- import styled from '@emotion/styled'
3
-
4
- import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
5
- import { RedactedDescription, PeriodSummary } from '@ltht-react/type-summary'
6
-
7
- const StyledRedactedDescription = styled.div`
8
- flex-grow: 1;
9
- text-align: left;
10
- `
11
-
12
- const StyledPeriodSummary = styled.div`
13
- text-align: right;
14
- `
15
-
16
- const CommunityTreatmentOrderRedacted: FC<Props> = ({ communityTreatmentOrder }) => (
17
- <>
18
- <StyledRedactedDescription>
19
- <RedactedDescription />
20
- </StyledRedactedDescription>
21
- <StyledPeriodSummary>
22
- <PeriodSummary period={communityTreatmentOrder.period} />
23
- </StyledPeriodSummary>
24
- </>
25
- )
26
-
27
- interface Props {
28
- communityTreatmentOrder: LypftCommunityTreatmentOrder
29
- }
30
-
31
- export default CommunityTreatmentOrderRedacted
1
+ import { FC } from 'react'
2
+ import styled from '@emotion/styled'
3
+
4
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
5
+ import { RedactedDescription, PeriodSummary } from '@ltht-react/type-summary'
6
+
7
+ const StyledRedactedDescription = styled.div`
8
+ flex-grow: 1;
9
+ text-align: left;
10
+ `
11
+
12
+ const StyledPeriodSummary = styled.div`
13
+ text-align: right;
14
+ `
15
+
16
+ const CommunityTreatmentOrderRedacted: FC<Props> = ({ communityTreatmentOrder }) => (
17
+ <>
18
+ <StyledRedactedDescription>
19
+ <RedactedDescription />
20
+ </StyledRedactedDescription>
21
+ <StyledPeriodSummary>
22
+ <PeriodSummary period={communityTreatmentOrder.period} />
23
+ </StyledPeriodSummary>
24
+ </>
25
+ )
26
+
27
+ interface Props {
28
+ communityTreatmentOrder: LypftCommunityTreatmentOrder
29
+ }
30
+
31
+ export default CommunityTreatmentOrderRedacted
@@ -1,50 +1,50 @@
1
- import { FC, HTMLAttributes } from 'react'
2
- import styled from '@emotion/styled'
3
-
4
- import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
5
- import { PeriodSummary } from '@ltht-react/type-summary'
6
-
7
- import Consent from '../atoms/community-treatment-order-summary-consent'
8
- import Restrictions from '../atoms/community-treatment-order-summary-restrictions'
9
- import Status from '../atoms/community-treatment-order-summary-status'
10
- import Redacted from '../molecules/community-treatment-order-redacted'
11
-
12
- const StyledSummary = styled.div`
13
- display: flex;
14
- justify-content: center;
15
- `
16
- const StyledDescription = styled.div`
17
- flex-grow: 1;
18
- `
19
- const StyledDate = styled.div`
20
- text-align: right;
21
- `
22
-
23
- const CommunityTreatmentOrderSummary: FC<Props> = ({ communityTreatmentOrder, ...rest }) => {
24
- if (communityTreatmentOrder.metadata.isRedacted) {
25
- return (
26
- <StyledSummary {...rest}>
27
- <Redacted communityTreatmentOrder={communityTreatmentOrder} />
28
- </StyledSummary>
29
- )
30
- }
31
-
32
- return (
33
- <StyledSummary {...rest}>
34
- <StyledDescription>
35
- <Status communityTreatmentOrder={communityTreatmentOrder} />
36
- <Restrictions communityTreatmentOrder={communityTreatmentOrder} />
37
- </StyledDescription>
38
- <StyledDate>
39
- <PeriodSummary period={communityTreatmentOrder.period} />
40
- <Consent communityTreatmentOrder={communityTreatmentOrder} />
41
- </StyledDate>
42
- </StyledSummary>
43
- )
44
- }
45
-
46
- interface Props extends HTMLAttributes<HTMLDivElement> {
47
- communityTreatmentOrder: LypftCommunityTreatmentOrder
48
- }
49
-
50
- export default CommunityTreatmentOrderSummary
1
+ import { FC, HTMLAttributes } from 'react'
2
+ import styled from '@emotion/styled'
3
+
4
+ import { LypftCommunityTreatmentOrder } from '@ltht-react/types'
5
+ import { PeriodSummary } from '@ltht-react/type-summary'
6
+
7
+ import Consent from '../atoms/community-treatment-order-summary-consent'
8
+ import Restrictions from '../atoms/community-treatment-order-summary-restrictions'
9
+ import Status from '../atoms/community-treatment-order-summary-status'
10
+ import Redacted from '../molecules/community-treatment-order-redacted'
11
+
12
+ const StyledSummary = styled.div`
13
+ display: flex;
14
+ justify-content: center;
15
+ `
16
+ const StyledDescription = styled.div`
17
+ flex-grow: 1;
18
+ `
19
+ const StyledDate = styled.div`
20
+ text-align: right;
21
+ `
22
+
23
+ const CommunityTreatmentOrderSummary: FC<Props> = ({ communityTreatmentOrder, ...rest }) => {
24
+ if (communityTreatmentOrder.metadata.isRedacted) {
25
+ return (
26
+ <StyledSummary {...rest}>
27
+ <Redacted communityTreatmentOrder={communityTreatmentOrder} />
28
+ </StyledSummary>
29
+ )
30
+ }
31
+
32
+ return (
33
+ <StyledSummary {...rest}>
34
+ <StyledDescription>
35
+ <Status communityTreatmentOrder={communityTreatmentOrder} />
36
+ <Restrictions communityTreatmentOrder={communityTreatmentOrder} />
37
+ </StyledDescription>
38
+ <StyledDate>
39
+ <PeriodSummary period={communityTreatmentOrder.period} />
40
+ <Consent communityTreatmentOrder={communityTreatmentOrder} />
41
+ </StyledDate>
42
+ </StyledSummary>
43
+ )
44
+ }
45
+
46
+ interface Props extends HTMLAttributes<HTMLDivElement> {
47
+ communityTreatmentOrder: LypftCommunityTreatmentOrder
48
+ }
49
+
50
+ export default CommunityTreatmentOrderSummary