@ltht-react/document-summary 2.0.199 → 2.0.201
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/package.json +8 -8
- package/lib/atoms/document-date.d.ts +0 -7
- package/lib/atoms/document-date.js +0 -47
- package/lib/atoms/document-date.js.map +0 -1
- package/lib/atoms/document-description.d.ts +0 -7
- package/lib/atoms/document-description.js +0 -36
- package/lib/atoms/document-description.js.map +0 -1
- package/lib/atoms/document-source.d.ts +0 -7
- package/lib/atoms/document-source.js +0 -46
- package/lib/atoms/document-source.js.map +0 -1
- package/lib/atoms/document-status.d.ts +0 -7
- package/lib/atoms/document-status.js +0 -23
- package/lib/atoms/document-status.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -8
- package/lib/index.js.map +0 -1
- package/lib/molecules/document-redacted.d.ts +0 -7
- package/lib/molecules/document-redacted.js +0 -22
- package/lib/molecules/document-redacted.js.map +0 -1
- package/lib/organisms/document-summary.d.ts +0 -7
- package/lib/organisms/document-summary.js +0 -52
- package/lib/organisms/document-summary.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ltht-react/document-summary",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.201",
|
|
4
4
|
"description": "ltht-react clinical DocumentSummary component.",
|
|
5
5
|
"author": "LTHT",
|
|
6
6
|
"homepage": "",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@emotion/react": "^11.0.0",
|
|
30
30
|
"@emotion/styled": "^11.0.0",
|
|
31
|
-
"@ltht-react/icon": "^2.0.
|
|
32
|
-
"@ltht-react/list": "^2.0.
|
|
33
|
-
"@ltht-react/styles": "^2.0.
|
|
34
|
-
"@ltht-react/type-summary": "^2.0.
|
|
35
|
-
"@ltht-react/types": "^2.0.
|
|
36
|
-
"@ltht-react/utils": "^2.0.
|
|
31
|
+
"@ltht-react/icon": "^2.0.201",
|
|
32
|
+
"@ltht-react/list": "^2.0.201",
|
|
33
|
+
"@ltht-react/styles": "^2.0.201",
|
|
34
|
+
"@ltht-react/type-summary": "^2.0.201",
|
|
35
|
+
"@ltht-react/types": "^2.0.201",
|
|
36
|
+
"@ltht-react/utils": "^2.0.201",
|
|
37
37
|
"react": "^18.2.0"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "79d7616f63287ef8e8dd9f302294a909dd2c69d0"
|
|
40
40
|
}
|
|
@@ -1,47 +0,0 @@
|
|
|
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 (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
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 = (0, utils_1.formatDate)(new Date(Date.parse(date)));
|
|
43
|
-
return (0, jsx_runtime_1.jsx)(StyledDocumentDate, __assign({}, rest, { children: formattedDate }));
|
|
44
|
-
};
|
|
45
|
-
exports.default = DocumentDate;
|
|
46
|
-
var templateObject_1;
|
|
47
|
-
//# sourceMappingURL=document-date.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,kDAAK,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,IAAA,kBAAU,EAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAE5D,OAAO,uBAAC,kBAAkB,eAAK,IAAI,cAAG,aAAa,IAAsB,CAAA;AAC3E,CAAC,CAAA;AAMD,kBAAe,YAAY,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,36 +0,0 @@
|
|
|
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 (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
32
|
-
return (0, jsx_runtime_1.jsx)(StyledDocumentDescription, __assign({}, rest, { children: description }));
|
|
33
|
-
};
|
|
34
|
-
exports.default = DocumentDescription;
|
|
35
|
-
var templateObject_1;
|
|
36
|
-
//# sourceMappingURL=document-description.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,kDAAK,CAAA;IAE9B,OAAO,uBAAC,yBAAyB,eAAK,IAAI,cAAG,WAAW,IAA6B,CAAA;AACvF,CAAC,CAAA;AAMD,kBAAe,mBAAmB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,46 +0,0 @@
|
|
|
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 (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
42
|
-
return (0, jsx_runtime_1.jsx)(StyledDocumentSource, __assign({}, rest, { children: (0, utils_1.titleCase)(source) }));
|
|
43
|
-
};
|
|
44
|
-
exports.default = DocumentSource;
|
|
45
|
-
var templateObject_1;
|
|
46
|
-
//# sourceMappingURL=document-source.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,kDAAK,CAAA;IAEzB,OAAO,uBAAC,oBAAoB,eAAK,IAAI,cAAG,IAAA,iBAAS,EAAC,MAAM,CAAC,IAAwB,CAAA;AACnF,CAAC,CAAA;AAMD,kBAAe,cAAc,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,23 +0,0 @@
|
|
|
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 (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
19
|
-
return (0, jsx_runtime_1.jsx)(StyledStatus, { children: (0, utils_1.titleCase)(status) });
|
|
20
|
-
};
|
|
21
|
-
exports.default = DocumentStatus;
|
|
22
|
-
var templateObject_1;
|
|
23
|
-
//# sourceMappingURL=document-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,kDAAK,CAAA;IAEzB,OAAO,uBAAC,YAAY,cAAE,IAAA,iBAAS,EAAC,MAAM,CAAC,GAAgB,CAAA;AACzD,CAAC,CAAA;AAMD,kBAAe,cAAc,CAAA"}
|
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;AAAA,kFAA0D;AAE1D,kBAAe,0BAAe,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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 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 ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(StyledDate, { children: (0, jsx_runtime_1.jsx)(document_date_1.default, { document: document }) }), (0, jsx_runtime_1.jsx)(StyledDescription, { children: (0, jsx_runtime_1.jsx)(type_summary_1.RedactedDescription, {}) })] }));
|
|
19
|
-
};
|
|
20
|
-
exports.default = DocumentRedacted;
|
|
21
|
-
var templateObject_1, templateObject_2;
|
|
22
|
-
//# sourceMappingURL=document-redacted.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-redacted.js","sourceRoot":"","sources":["../../src/molecules/document-redacted.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,2DAAoC;AAGpC,yDAA8D;AAE9D,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,6DACE,uBAAC,UAAU,cACT,uBAAC,uBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,GACjB,EACb,uBAAC,iBAAiB,cAChB,uBAAC,kCAAmB,KAAG,GACL,IACnB,CACJ;AATqD,CASrD,CAAA;AAMD,kBAAe,gBAAgB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,52 +0,0 @@
|
|
|
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 ((0, jsx_runtime_1.jsx)(StyledSummary, __assign({}, rest, { children: (0, jsx_runtime_1.jsx)(document_redacted_1.default, { document: document }) })));
|
|
47
|
-
}
|
|
48
|
-
return ((0, jsx_runtime_1.jsxs)(StyledSummary, __assign({}, rest, { children: [(0, jsx_runtime_1.jsx)(StyledDate, { children: (0, jsx_runtime_1.jsx)(document_date_1.default, { document: document }) }), (0, jsx_runtime_1.jsx)(StyledDescription, { children: (0, jsx_runtime_1.jsx)(document_description_1.default, { document: document }) }), (0, jsx_runtime_1.jsxs)(StyledSource, { children: [(0, jsx_runtime_1.jsx)(document_source_1.default, { document: document }), (0, jsx_runtime_1.jsx)(document_status_1.default, { document: document })] })] })));
|
|
49
|
-
};
|
|
50
|
-
exports.default = DocumentSummary;
|
|
51
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
52
|
-
//# sourceMappingURL=document-summary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC;QACjC,OAAO,CACL,uBAAC,aAAa,eAAK,IAAI,cACrB,uBAAC,2BAAQ,IAAC,QAAQ,EAAE,QAAQ,GAAI,IAClB,CACjB,CAAA;IACH,CAAC;IAED,OAAO,CACL,wBAAC,aAAa,eAAK,IAAI,eACrB,uBAAC,UAAU,cACT,uBAAC,uBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,GACjB,EACb,uBAAC,iBAAiB,cAChB,uBAAC,8BAAW,IAAC,QAAQ,EAAE,QAAQ,GAAI,GACjB,EACpB,wBAAC,YAAY,eACX,uBAAC,yBAAM,IAAC,QAAQ,EAAE,QAAQ,GAAI,EAC9B,uBAAC,yBAAM,IAAC,QAAQ,EAAE,QAAQ,GAAI,IACjB,KACD,CACjB,CAAA;AACH,CAAC,CAAA;AAMD,kBAAe,eAAe,CAAA"}
|