@ltht-react/document-summary 1.3.14

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 ADDED
@@ -0,0 +1,224 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## 1.3.14 (2021-09-17)
7
+
8
+ **Note:** Version bump only for package @ltht-react/document-summary
9
+
10
+
11
+
12
+
13
+
14
+ ## 1.3.13 (2021-08-26)
15
+
16
+ **Note:** Version bump only for package @ltht-react/document-summary
17
+
18
+
19
+
20
+
21
+
22
+ ## 1.3.12 (2021-08-23)
23
+
24
+ **Note:** Version bump only for package @ltht-react/document-summary
25
+
26
+
27
+
28
+
29
+
30
+ ## [1.3.11](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.10...@ltht-react/document-summary@1.3.11) (2021-08-02)
31
+
32
+ **Note:** Version bump only for package @ltht-react/document-summary
33
+
34
+
35
+
36
+
37
+
38
+ ## [1.3.10](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.9...@ltht-react/document-summary@1.3.10) (2021-07-14)
39
+
40
+ **Note:** Version bump only for package @ltht-react/document-summary
41
+
42
+
43
+
44
+
45
+
46
+ ## [1.3.9](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.8...@ltht-react/document-summary@1.3.9) (2021-07-12)
47
+
48
+ **Note:** Version bump only for package @ltht-react/document-summary
49
+
50
+
51
+
52
+
53
+
54
+ ## [1.3.8](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.7...@ltht-react/document-summary@1.3.8) (2021-07-07)
55
+
56
+ **Note:** Version bump only for package @ltht-react/document-summary
57
+
58
+
59
+
60
+
61
+
62
+ ## [1.3.7](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.6...@ltht-react/document-summary@1.3.7) (2021-07-06)
63
+
64
+ **Note:** Version bump only for package @ltht-react/document-summary
65
+
66
+
67
+
68
+
69
+
70
+ ## [1.3.6](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.5...@ltht-react/document-summary@1.3.6) (2021-06-29)
71
+
72
+ **Note:** Version bump only for package @ltht-react/document-summary
73
+
74
+
75
+
76
+
77
+
78
+ ## [1.3.5](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.4...@ltht-react/document-summary@1.3.5) (2021-06-21)
79
+
80
+ **Note:** Version bump only for package @ltht-react/document-summary
81
+
82
+
83
+
84
+
85
+
86
+ ## [1.3.4](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.3...@ltht-react/document-summary@1.3.4) (2021-06-03)
87
+
88
+ **Note:** Version bump only for package @ltht-react/document-summary
89
+
90
+
91
+
92
+
93
+
94
+ ## [1.3.3](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.2...@ltht-react/document-summary@1.3.3) (2021-05-19)
95
+
96
+ **Note:** Version bump only for package @ltht-react/document-summary
97
+
98
+
99
+
100
+
101
+
102
+ ## [1.3.1](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@1.3.0...@ltht-react/document-summary@1.3.1) (2021-04-23)
103
+
104
+ **Note:** Version bump only for package @ltht-react/document-summary
105
+
106
+
107
+
108
+
109
+
110
+ ## [0.0.30](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.28...@ltht-react/document-summary@0.0.30) (2020-11-19)
111
+
112
+ **Note:** Version bump only for package @ltht-react/document-summary
113
+
114
+ ## [0.0.29](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.28...@ltht-react/document-summary@0.0.29) (2020-10-29)
115
+
116
+ **Note:** Version bump only for package @ltht-react/document-summary
117
+
118
+ ## [0.0.28](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.27...@ltht-react/document-summary@0.0.28) (2020-09-10)
119
+
120
+ **Note:** Version bump only for package @ltht-react/document-summary
121
+
122
+ ## [0.0.27](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.26...@ltht-react/document-summary@0.0.27) (2020-09-01)
123
+
124
+ **Note:** Version bump only for package @ltht-react/document-summary
125
+
126
+ ## [0.0.26](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.25...@ltht-react/document-summary@0.0.26) (2020-08-21)
127
+
128
+ **Note:** Version bump only for package @ltht-react/document-summary
129
+
130
+ ## [0.0.25](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.24...@ltht-react/document-summary@0.0.25) (2020-08-19)
131
+
132
+ **Note:** Version bump only for package @ltht-react/document-summary
133
+
134
+ ## [0.0.24](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.23...@ltht-react/document-summary@0.0.24) (2020-08-19)
135
+
136
+ **Note:** Version bump only for package @ltht-react/document-summary
137
+
138
+ ## [0.0.23](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.22...@ltht-react/document-summary@0.0.23) (2020-08-18)
139
+
140
+ **Note:** Version bump only for package @ltht-react/document-summary
141
+
142
+ ## [0.0.22](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.21...@ltht-react/document-summary@0.0.22) (2020-08-11)
143
+
144
+ **Note:** Version bump only for package @ltht-react/document-summary
145
+
146
+ ## [0.0.21](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.20...@ltht-react/document-summary@0.0.21) (2020-08-10)
147
+
148
+ **Note:** Version bump only for package @ltht-react/document-summary
149
+
150
+ ## [0.0.20](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.19...@ltht-react/document-summary@0.0.20) (2020-08-05)
151
+
152
+ **Note:** Version bump only for package @ltht-react/document-summary
153
+
154
+ ## [0.0.19](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.18...@ltht-react/document-summary@0.0.19) (2020-08-05)
155
+
156
+ **Note:** Version bump only for package @ltht-react/document-summary
157
+
158
+ ## [0.0.18](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.17...@ltht-react/document-summary@0.0.18) (2020-08-05)
159
+
160
+ **Note:** Version bump only for package @ltht-react/document-summary
161
+
162
+ ## [0.0.16](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.15...@ltht-react/document-summary@0.0.16) (2020-08-04)
163
+
164
+ **Note:** Version bump only for package @ltht-react/document-summary
165
+
166
+ ## [0.0.15](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.14...@ltht-react/document-summary@0.0.15) (2020-05-06)
167
+
168
+ **Note:** Version bump only for package @ltht-react/document-summary
169
+
170
+ ## [0.0.14](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.13...@ltht-react/document-summary@0.0.14) (2020-05-01)
171
+
172
+ **Note:** Version bump only for package @ltht-react/document-summary
173
+
174
+ ## [0.0.13](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.12...@ltht-react/document-summary@0.0.13) (2020-05-01)
175
+
176
+ **Note:** Version bump only for package @ltht-react/document-summary
177
+
178
+ ## [0.0.12](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.11...@ltht-react/document-summary@0.0.12) (2020-05-01)
179
+
180
+ **Note:** Version bump only for package @ltht-react/document-summary
181
+
182
+ ## [0.0.11](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.10...@ltht-react/document-summary@0.0.11) (2020-04-29)
183
+
184
+ **Note:** Version bump only for package @ltht-react/document-summary
185
+
186
+ ## [0.0.10](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.9...@ltht-react/document-summary@0.0.10) (2020-04-28)
187
+
188
+ **Note:** Version bump only for package @ltht-react/document-summary
189
+
190
+ ## [0.0.9](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.8...@ltht-react/document-summary@0.0.9) (2020-04-23)
191
+
192
+ **Note:** Version bump only for package @ltht-react/document-summary
193
+
194
+ ## [0.0.8](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.7...@ltht-react/document-summary@0.0.8) (2020-04-21)
195
+
196
+ **Note:** Version bump only for package @ltht-react/document-summary
197
+
198
+ ## [0.0.7](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.6...@ltht-react/document-summary@0.0.7) (2020-04-14)
199
+
200
+ **Note:** Version bump only for package @ltht-react/document-summary
201
+
202
+ ## [0.0.6](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.5...@ltht-react/document-summary@0.0.6) (2020-04-09)
203
+
204
+ **Note:** Version bump only for package @ltht-react/document-summary
205
+
206
+ ## [0.0.5](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.4...@ltht-react/document-summary@0.0.5) (2020-04-08)
207
+
208
+ **Note:** Version bump only for package @ltht-react/document-summary
209
+
210
+ ## [0.0.4](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.3...@ltht-react/document-summary@0.0.4) (2020-04-08)
211
+
212
+ **Note:** Version bump only for package @ltht-react/document-summary
213
+
214
+ ## [0.0.3](https://ssh.github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.2...@ltht-react/document-summary@0.0.3) (2020-04-06)
215
+
216
+ **Note:** Version bump only for package @ltht-react/document-summary
217
+
218
+ ## [0.0.2](https://ssh.github.com/ltht-epr/ltht-react/compare/@ltht-react/document-summary@0.0.1...@ltht-react/document-summary@0.0.2) (2020-04-03)
219
+
220
+ **Note:** Version bump only for package @ltht-react/document-summary
221
+
222
+ ## 0.0.1 (2020-04-03)
223
+
224
+ **Note:** Version bump only for package @ltht-react/document-summary
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # DocumentSummary
2
+
3
+ <!-- STORY -->
4
+
5
+ ### Import
6
+
7
+ ```js
8
+ import DocumentSummary from '@ltht-react/document-summary'
9
+ ```
10
+
11
+ ### Usage
12
+
13
+ ```jsx
14
+ <DocumentSummary documents={documentReferences} />
15
+ ```
16
+
17
+ ### Properties
18
+
19
+ | Prop | Required | Default | Type | Description |
20
+ | :------------- | :------- | :------ | :---------------------------------------- | :----------------------------------------------------- |
21
+ | `documents` | No | | DocumentReference[] | An array of document references |
22
+ | `clickHandler` | No | | clickHandler(document: DocumentReference) | A click handler that will return the selected document |
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { DocumentReference } from '@ltht-react/types';
3
+ declare const DocumentDate: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ document: DocumentReference;
6
+ }
7
+ export default DocumentDate;
@@ -0,0 +1,47 @@
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 utils_1 = require("@ltht-react/utils");
35
+ var StyledDocumentDate = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
36
+ var DocumentDate = function (_a) {
37
+ var _b, _c;
38
+ var _d = _a.document, created = _d.created, description = _d.description, indexed = _d.indexed, rest = __rest(_a, ["document"]);
39
+ if (!description)
40
+ return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
41
+ var date = (created === null || created === void 0 ? void 0 : created.value) ? (_b = created === null || created === void 0 ? void 0 : created.value) !== null && _b !== void 0 ? _b : '' : (_c = indexed.value) !== null && _c !== void 0 ? _c : '';
42
+ var formattedDate = utils_1.formatDate(new Date(Date.parse(date)));
43
+ return jsx_runtime_1.jsx(StyledDocumentDate, __assign({}, rest, { children: formattedDate }), void 0);
44
+ };
45
+ exports.default = DocumentDate;
46
+ var templateObject_1;
47
+ //# sourceMappingURL=document-date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-date.js","sourceRoot":"","sources":["../../src/atoms/document-date.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAGpC,2CAA8C;AAE9C,IAAM,kBAAkB,GAAG,gBAAM,CAAC,GAAG,qEAAA,EAAE,IAAA,CAAA;AAEvC,IAAM,YAAY,GAAc,UAAC,EAAwD;;IAAtD,IAAA,gBAA2C,EAA/B,OAAO,aAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA,EAAO,IAAI,cAAtD,YAAwD,CAAF;IACrF,IAAI,CAAC,WAAW;QAAE,OAAO,qDAAK,CAAA;IAE9B,IAAM,IAAI,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,EAAC,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAA,OAAO,CAAC,KAAK,mCAAI,EAAE,CAAA;IAExE,IAAM,aAAa,GAAG,kBAAU,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAE5D,OAAO,kBAAC,kBAAkB,eAAK,IAAI,cAAG,aAAa,YAAsB,CAAA;AAC3E,CAAC,CAAA;AAMD,kBAAe,YAAY,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { DocumentReference } from '@ltht-react/types';
3
+ declare const DocumentDescription: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ document: DocumentReference;
6
+ }
7
+ export default DocumentDescription;
@@ -0,0 +1,36 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ var jsx_runtime_1 = require("react/jsx-runtime");
22
+ var styled_1 = __importDefault(require("@emotion/styled"));
23
+ var StyledDocumentDescription = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
24
+ var DocumentDescription = function (_a) {
25
+ var description = _a.document.description;
26
+ var rest = [];
27
+ for (var _i = 1; _i < arguments.length; _i++) {
28
+ rest[_i - 1] = arguments[_i];
29
+ }
30
+ if (!description)
31
+ return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
32
+ return jsx_runtime_1.jsx(StyledDocumentDescription, __assign({}, rest, { children: description }), void 0);
33
+ };
34
+ exports.default = DocumentDescription;
35
+ var templateObject_1;
36
+ //# sourceMappingURL=document-description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-description.js","sourceRoot":"","sources":["../../src/atoms/document-description.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAIpC,IAAM,yBAAyB,GAAG,gBAAM,CAAC,GAAG,qEAAA,EAAE,IAAA,CAAA;AAE9C,IAAM,mBAAmB,GAAc,UAAC,EAA6B;QAAf,WAAW,0BAAA;IAAM,cAAO;SAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;QAAP,6BAAO;;IAC5E,IAAI,CAAC,WAAW;QAAE,OAAO,qDAAK,CAAA;IAE9B,OAAO,kBAAC,yBAAyB,eAAK,IAAI,cAAG,WAAW,YAA6B,CAAA;AACvF,CAAC,CAAA;AAMD,kBAAe,mBAAmB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { DocumentReference } from '@ltht-react/types';
3
+ declare const DocumentSource: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ document: DocumentReference;
6
+ }
7
+ export default DocumentSource;
@@ -0,0 +1,46 @@
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 utils_1 = require("@ltht-react/utils");
35
+ var StyledDocumentSource = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
36
+ var DocumentSource = function (_a) {
37
+ var _b, _c;
38
+ var document = _a.document, rest = __rest(_a, ["document"]);
39
+ var source = ((_b = document.metadata) === null || _b === void 0 ? void 0 : _b.dataSources) ? (_c = document.metadata.dataSources[0]) === null || _c === void 0 ? void 0 : _c.display : undefined;
40
+ if (!source)
41
+ return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
42
+ return jsx_runtime_1.jsx(StyledDocumentSource, __assign({}, rest, { children: utils_1.titleCase(source) }), void 0);
43
+ };
44
+ exports.default = DocumentSource;
45
+ var templateObject_1;
46
+ //# sourceMappingURL=document-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-source.js","sourceRoot":"","sources":["../../src/atoms/document-source.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,2CAA6C;AAG7C,IAAM,oBAAoB,GAAG,gBAAM,CAAC,GAAG,qEAAA,EAAE,IAAA,CAAA;AAEzC,IAAM,cAAc,GAAc,UAAC,EAAqB;;IAAnB,IAAA,QAAQ,cAAA,EAAK,IAAI,cAAnB,YAAqB,CAAF;IACpD,IAAM,MAAM,GAAG,CAAA,MAAA,QAAQ,CAAC,QAAQ,0CAAE,WAAW,EAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,0CAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;IAErG,IAAI,CAAC,MAAM;QAAE,OAAO,qDAAK,CAAA;IAEzB,OAAO,kBAAC,oBAAoB,eAAK,IAAI,cAAG,iBAAS,CAAC,MAAM,CAAC,YAAwB,CAAA;AACnF,CAAC,CAAA;AAMD,kBAAe,cAAc,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { DocumentReference } from '@ltht-react/types';
3
+ declare const DocumentStatus: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ document: DocumentReference;
6
+ }
7
+ export default DocumentStatus;
@@ -0,0 +1,23 @@
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 styles_1 = require("@ltht-react/styles");
13
+ var utils_1 = require("@ltht-react/utils");
14
+ var StyledStatus = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: smaller;\n color: ", ";\n"], ["\n font-size: smaller;\n color: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE);
15
+ var DocumentStatus = function (_a) {
16
+ var status = _a.document.status;
17
+ if (!status)
18
+ return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
19
+ return jsx_runtime_1.jsx(StyledStatus, { children: utils_1.titleCase(status) }, void 0);
20
+ };
21
+ exports.default = DocumentStatus;
22
+ var templateObject_1;
23
+ //# sourceMappingURL=document-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-status.js","sourceRoot":"","sources":["../../src/atoms/document-status.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AACjD,2CAA6C;AAG7C,IAAM,YAAY,GAAG,gBAAM,CAAC,GAAG,8GAAA,oCAEpB,EAA4B,KACtC,KADU,qBAAY,CAAC,SAAS,CAAC,KAAK,CACtC,CAAA;AAED,IAAM,cAAc,GAAc,UAAC,EAAwB;QAAV,MAAM,qBAAA;IACrD,IAAI,CAAC,MAAM;QAAE,OAAO,qDAAK,CAAA;IAEzB,OAAO,kBAAC,YAAY,cAAE,iBAAS,CAAC,MAAM,CAAC,WAAgB,CAAA;AACzD,CAAC,CAAA;AAMD,kBAAe,cAAc,CAAA"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import DocumentSummary from './organisms/document-summary';
2
+ export default DocumentSummary;
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 document_summary_1 = __importDefault(require("./organisms/document-summary"));
7
+ exports.default = document_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,kFAA0D;AAE1D,kBAAe,0BAAe,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { DocumentReference } from '@ltht-react/types';
3
+ declare const DocumentRedacted: FC<Props>;
4
+ interface Props {
5
+ document: DocumentReference;
6
+ }
7
+ export default DocumentRedacted;
@@ -0,0 +1,23 @@
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 summary_1 = require("@ltht-react/summary");
13
+ var document_date_1 = __importDefault(require("../atoms/document-date"));
14
+ var StyledDescription = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 1;\n text-align: right;\n"], ["\n flex: 1;\n text-align: right;\n"])));
15
+ var StyledDate = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex: 1;\n"], ["\n flex: 1;\n"])));
16
+ var DocumentRedacted = function (_a) {
17
+ var document = _a.document;
18
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(StyledDate, { children: jsx_runtime_1.jsx(document_date_1.default, { document: document }, void 0) }, void 0),
19
+ jsx_runtime_1.jsx(StyledDescription, { children: jsx_runtime_1.jsx(summary_1.RedactedDescription, {}, void 0) }, void 0)] }, void 0));
20
+ };
21
+ exports.default = DocumentRedacted;
22
+ var templateObject_1, templateObject_2;
23
+ //# sourceMappingURL=document-redacted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-redacted.js","sourceRoot":"","sources":["../../src/molecules/document-redacted.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,2DAAoC;AAGpC,+CAAyD;AAEzD,yEAAyC;AAEzC,IAAM,iBAAiB,GAAG,gBAAM,CAAC,GAAG,yGAAA,sCAGnC,IAAA,CAAA;AACD,IAAM,UAAU,GAAG,gBAAM,CAAC,GAAG,mFAAA,gBAE5B,IAAA,CAAA;AAED,IAAM,gBAAgB,GAAc,UAAC,EAAY;QAAV,QAAQ,cAAA;IAAO,OAAA,CACpD,wDACE,kBAAC,UAAU,cACT,kBAAC,uBAAI,IAAC,QAAQ,EAAE,QAAQ,WAAI,WACjB;YACb,kBAAC,iBAAiB,cAChB,kBAAC,6BAAmB,aAAG,WACL,YACnB,CACJ;AATqD,CASrD,CAAA;AAMD,kBAAe,gBAAgB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { DocumentReference } from '@ltht-react/types';
3
+ declare const DocumentSummary: FC<Props>;
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ document: DocumentReference;
6
+ }
7
+ export default DocumentSummary;
@@ -0,0 +1,55 @@
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 document_date_1 = __importDefault(require("../atoms/document-date"));
35
+ var document_description_1 = __importDefault(require("../atoms/document-description"));
36
+ var document_source_1 = __importDefault(require("../atoms/document-source"));
37
+ var document_status_1 = __importDefault(require("../atoms/document-status"));
38
+ var document_redacted_1 = __importDefault(require("../molecules/document-redacted"));
39
+ var StyledSummary = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n"])));
40
+ var StyledDate = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-right: 0.5rem;\n"], ["\n margin-right: 0.5rem;\n"])));
41
+ var StyledDescription = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-grow: 1;\n"], ["\n flex-grow: 1;\n"])));
42
+ var StyledSource = styled_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n text-align: right;\n"], ["\n display: flex;\n flex-direction: column;\n text-align: right;\n"])));
43
+ var DocumentSummary = function (_a) {
44
+ var document = _a.document, rest = __rest(_a, ["document"]);
45
+ if (document.metadata.isRedacted) {
46
+ return (jsx_runtime_1.jsx(StyledSummary, __assign({}, rest, { children: jsx_runtime_1.jsx(document_redacted_1.default, { document: document }, void 0) }), void 0));
47
+ }
48
+ return (jsx_runtime_1.jsxs(StyledSummary, __assign({}, rest, { children: [jsx_runtime_1.jsx(StyledDate, { children: jsx_runtime_1.jsx(document_date_1.default, { document: document }, void 0) }, void 0),
49
+ jsx_runtime_1.jsx(StyledDescription, { children: jsx_runtime_1.jsx(document_description_1.default, { document: document }, void 0) }, void 0),
50
+ jsx_runtime_1.jsxs(StyledSource, { children: [jsx_runtime_1.jsx(document_source_1.default, { document: document }, void 0),
51
+ jsx_runtime_1.jsx(document_status_1.default, { document: document }, void 0)] }, void 0)] }), void 0));
52
+ };
53
+ exports.default = DocumentSummary;
54
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
55
+ //# sourceMappingURL=document-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-summary.js","sourceRoot":"","sources":["../../src/organisms/document-summary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAIpC,yEAAyC;AACzC,uFAAuD;AACvD,6EAA6C;AAC7C,6EAA6C;AAC7C,qFAAqD;AAErD,IAAM,aAAa,GAAG,gBAAM,CAAC,GAAG,yIAAA,sEAI/B,IAAA,CAAA;AAED,IAAM,UAAU,GAAG,gBAAM,CAAC,GAAG,gGAAA,6BAE5B,IAAA,CAAA;AAED,IAAM,iBAAiB,GAAG,gBAAM,CAAC,GAAG,wFAAA,qBAEnC,IAAA,CAAA;AAED,IAAM,YAAY,GAAG,gBAAM,CAAC,GAAG,0IAAA,uEAI9B,IAAA,CAAA;AAED,IAAM,eAAe,GAAc,UAAC,EAAqB;IAAnB,IAAA,QAAQ,cAAA,EAAK,IAAI,cAAnB,YAAqB,CAAF;IACrD,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE;QAChC,OAAO,CACL,kBAAC,aAAa,eAAK,IAAI,cACrB,kBAAC,2BAAQ,IAAC,QAAQ,EAAE,QAAQ,WAAI,YAClB,CACjB,CAAA;KACF;IAED,OAAO,CACL,mBAAC,aAAa,eAAK,IAAI,eACrB,kBAAC,UAAU,cACT,kBAAC,uBAAI,IAAC,QAAQ,EAAE,QAAQ,WAAI,WACjB;YACb,kBAAC,iBAAiB,cAChB,kBAAC,8BAAW,IAAC,QAAQ,EAAE,QAAQ,WAAI,WACjB;YACpB,mBAAC,YAAY,eACX,kBAAC,yBAAM,IAAC,QAAQ,EAAE,QAAQ,WAAI;oBAC9B,kBAAC,yBAAM,IAAC,QAAQ,EAAE,QAAQ,WAAI,YACjB,aACD,CACjB,CAAA;AACH,CAAC,CAAA;AAMD,kBAAe,eAAe,CAAA"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@ltht-react/document-summary",
3
+ "version": "1.3.14",
4
+ "description": "ltht-react clinical DocumentSummary component.",
5
+ "author": "LTHT",
6
+ "homepage": "",
7
+ "license": "MIT",
8
+ "main": "lib/index.js",
9
+ "typings": "lib/index.d.ts",
10
+ "files": [
11
+ "lib"
12
+ ],
13
+ "directories": {
14
+ "lib": "lib"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "clean": "rimraf lib",
21
+ "build": "yarn build:lib",
22
+ "watch": "tsc -w",
23
+ "build:lib": "tsc",
24
+ "type:check": "tsc --noEmit",
25
+ "lint": "prettylint 'src/*.{ts,tsx}'"
26
+ },
27
+ "dependencies": {
28
+ "@emotion/react": "^11.0.0",
29
+ "@emotion/styled": "^11.0.0",
30
+ "@ltht-react/icon": "^1.3.13",
31
+ "@ltht-react/list": "^1.3.11",
32
+ "@ltht-react/styles": "^1.3.5",
33
+ "@ltht-react/summary": "^1.3.13",
34
+ "@ltht-react/types": "^1.0.9",
35
+ "@ltht-react/utils": "^1.1.11",
36
+ "react": "^17.0.0"
37
+ },
38
+ "gitHead": "2fb4ee694529d51759e27b2201553e35b9aa5f2f"
39
+ }