@ltht-react/timeline 1.0.223 → 1.0.225
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 +19 -19
- package/lib/atoms/timeline-author.d.ts +8 -8
- package/lib/atoms/timeline-author.js +87 -87
- package/lib/atoms/timeline-button.d.ts +7 -7
- package/lib/atoms/timeline-button.js +36 -36
- package/lib/atoms/timeline-description.d.ts +8 -8
- package/lib/atoms/timeline-description.js +66 -66
- package/lib/atoms/timeline-status.d.ts +3 -0
- package/lib/atoms/timeline-status.js +6 -0
- package/lib/atoms/timeline-status.js.map +1 -0
- package/lib/atoms/timeline-time.d.ts +8 -8
- package/lib/atoms/timeline-time.js +62 -62
- package/lib/atoms/timeline-title-redacted.d.ts +3 -3
- package/lib/atoms/timeline-title-redacted.js +27 -27
- package/lib/atoms/timeline-title.d.ts +8 -8
- package/lib/atoms/timeline-title.js +54 -54
- package/lib/constants.d.ts +2 -2
- package/lib/constants.js +4 -4
- package/lib/index.d.ts +5 -5
- package/lib/index.js +10 -10
- package/lib/methods.d.ts +3 -0
- package/lib/methods.js +8 -0
- package/lib/methods.js.map +1 -0
- package/lib/molecules/timeline-item-redacted.d.ts +3 -3
- package/lib/molecules/timeline-item-redacted.js +42 -42
- package/lib/molecules/timeline-item.d.ts +15 -15
- package/lib/molecules/timeline-item.js +63 -63
- package/lib/organisms/timeline.d.ts +19 -19
- package/lib/organisms/timeline.js +215 -215
- package/package.json +9 -9
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
-
var types_1 = require("@ltht-react/types");
|
|
27
|
-
var utils_1 = require("@ltht-react/utils");
|
|
28
|
-
var TimelineTime = function (_a) {
|
|
29
|
-
var _b, _c, _d;
|
|
30
|
-
var domainResource = _a.domainResource, domainResourceType = _a.domainResourceType, rest = __rest(_a, ["domainResource", "domainResourceType"]);
|
|
31
|
-
if (!domainResource)
|
|
32
|
-
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
33
|
-
switch (domainResourceType) {
|
|
34
|
-
case types_1.TimelineDomainResourceType.QuestionnaireResponse: {
|
|
35
|
-
var qr = domainResource;
|
|
36
|
-
if (!((_b = qr === null || qr === void 0 ? void 0 : qr.authored) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
37
|
-
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
38
|
-
}
|
|
39
|
-
var time = utils_1.formatTime(new Date(qr === null || qr === void 0 ? void 0 : qr.authored.value));
|
|
40
|
-
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: time }), void 0);
|
|
41
|
-
}
|
|
42
|
-
case types_1.TimelineDomainResourceType.DocumentReference: {
|
|
43
|
-
var docRef = domainResource;
|
|
44
|
-
if (docRef && ((_c = docRef === null || docRef === void 0 ? void 0 : docRef.created) === null || _c === void 0 ? void 0 : _c.value)) {
|
|
45
|
-
var time = utils_1.formatTime(new Date(docRef.created.value));
|
|
46
|
-
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: time }), void 0);
|
|
47
|
-
}
|
|
48
|
-
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
49
|
-
}
|
|
50
|
-
case types_1.TimelineDomainResourceType.AuditEvent: {
|
|
51
|
-
var audit = domainResource;
|
|
52
|
-
if (audit && ((_d = audit === null || audit === void 0 ? void 0 : audit.recorded) === null || _d === void 0 ? void 0 : _d.value)) {
|
|
53
|
-
var time = utils_1.formatTime(new Date(audit.recorded.value));
|
|
54
|
-
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: time }), void 0);
|
|
55
|
-
}
|
|
56
|
-
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
57
|
-
}
|
|
58
|
-
default:
|
|
59
|
-
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
exports.default = TimelineTime;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
+
var types_1 = require("@ltht-react/types");
|
|
27
|
+
var utils_1 = require("@ltht-react/utils");
|
|
28
|
+
var TimelineTime = function (_a) {
|
|
29
|
+
var _b, _c, _d;
|
|
30
|
+
var domainResource = _a.domainResource, domainResourceType = _a.domainResourceType, rest = __rest(_a, ["domainResource", "domainResourceType"]);
|
|
31
|
+
if (!domainResource)
|
|
32
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
33
|
+
switch (domainResourceType) {
|
|
34
|
+
case types_1.TimelineDomainResourceType.QuestionnaireResponse: {
|
|
35
|
+
var qr = domainResource;
|
|
36
|
+
if (!((_b = qr === null || qr === void 0 ? void 0 : qr.authored) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
37
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
38
|
+
}
|
|
39
|
+
var time = utils_1.formatTime(new Date(qr === null || qr === void 0 ? void 0 : qr.authored.value));
|
|
40
|
+
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: time }), void 0);
|
|
41
|
+
}
|
|
42
|
+
case types_1.TimelineDomainResourceType.DocumentReference: {
|
|
43
|
+
var docRef = domainResource;
|
|
44
|
+
if (docRef && ((_c = docRef === null || docRef === void 0 ? void 0 : docRef.created) === null || _c === void 0 ? void 0 : _c.value)) {
|
|
45
|
+
var time = utils_1.formatTime(new Date(docRef.created.value));
|
|
46
|
+
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: time }), void 0);
|
|
47
|
+
}
|
|
48
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
49
|
+
}
|
|
50
|
+
case types_1.TimelineDomainResourceType.AuditEvent: {
|
|
51
|
+
var audit = domainResource;
|
|
52
|
+
if (audit && ((_d = audit === null || audit === void 0 ? void 0 : audit.recorded) === null || _d === void 0 ? void 0 : _d.value)) {
|
|
53
|
+
var time = utils_1.formatTime(new Date(audit.recorded.value));
|
|
54
|
+
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: time }), void 0);
|
|
55
|
+
}
|
|
56
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
57
|
+
}
|
|
58
|
+
default:
|
|
59
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.default = TimelineTime;
|
|
63
63
|
//# sourceMappingURL=timeline-time.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
declare const TimelineTitleRedacted: FC<HTMLAttributes<HTMLDivElement>>;
|
|
3
|
-
export default TimelineTitleRedacted;
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
declare const TimelineTitleRedacted: FC<HTMLAttributes<HTMLDivElement>>;
|
|
3
|
+
export default TimelineTitleRedacted;
|
|
@@ -1,28 +1,28 @@
|
|
|
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 styles_1 = require("@ltht-react/styles");
|
|
23
|
-
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
24
|
-
var StyledRedactedMessage = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE);
|
|
25
|
-
var TimelineTitleRedacted = function (props) { return (jsx_runtime_1.jsx(StyledRedactedMessage, __assign({}, props, { children: "Insufficient Privileges" }), void 0)); };
|
|
26
|
-
exports.default = TimelineTitleRedacted;
|
|
27
|
-
var templateObject_1;
|
|
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 styles_1 = require("@ltht-react/styles");
|
|
23
|
+
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
24
|
+
var StyledRedactedMessage = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE);
|
|
25
|
+
var TimelineTitleRedacted = function (props) { return (jsx_runtime_1.jsx(StyledRedactedMessage, __assign({}, props, { children: "Insufficient Privileges" }), void 0)); };
|
|
26
|
+
exports.default = TimelineTitleRedacted;
|
|
27
|
+
var templateObject_1;
|
|
28
28
|
//# sourceMappingURL=timeline-title-redacted.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import { AuditEvent, DocumentReference, Maybe, QuestionnaireResponse, TimelineDomainResourceType } from '@ltht-react/types';
|
|
3
|
-
declare const TimelineTitle: FC<Props>;
|
|
4
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
domainResource?: Maybe<AuditEvent | QuestionnaireResponse | DocumentReference>;
|
|
6
|
-
domainResourceType: TimelineDomainResourceType;
|
|
7
|
-
}
|
|
8
|
-
export default TimelineTitle;
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
import { AuditEvent, DocumentReference, Maybe, QuestionnaireResponse, TimelineDomainResourceType } from '@ltht-react/types';
|
|
3
|
+
declare const TimelineTitle: FC<Props>;
|
|
4
|
+
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
domainResource?: Maybe<AuditEvent | QuestionnaireResponse | DocumentReference>;
|
|
6
|
+
domainResourceType: TimelineDomainResourceType;
|
|
7
|
+
}
|
|
8
|
+
export default TimelineTitle;
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
-
var types_1 = require("@ltht-react/types");
|
|
27
|
-
var TimelineTitle = function (_a) {
|
|
28
|
-
var _b, _c, _d, _e, _f;
|
|
29
|
-
var domainResource = _a.domainResource, domainResourceType = _a.domainResourceType, rest = __rest(_a, ["domainResource", "domainResourceType"]);
|
|
30
|
-
if (!domainResource)
|
|
31
|
-
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
32
|
-
switch (domainResourceType) {
|
|
33
|
-
case types_1.TimelineDomainResourceType.QuestionnaireResponse: {
|
|
34
|
-
var qr = domainResource;
|
|
35
|
-
var questionnaireTitle = qr.metadata.isRedacted
|
|
36
|
-
? 'Insufficient privileges'
|
|
37
|
-
: (_c = (_b = qr.text) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : (_d = qr.questionnaire) === null || _d === void 0 ? void 0 : _d.title;
|
|
38
|
-
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: questionnaireTitle }), void 0);
|
|
39
|
-
}
|
|
40
|
-
case types_1.TimelineDomainResourceType.DocumentReference: {
|
|
41
|
-
var docRef = domainResource;
|
|
42
|
-
var docTitle = docRef.metadata.isRedacted ? 'Insufficient privileges' : (_e = docRef.text) === null || _e === void 0 ? void 0 : _e.text;
|
|
43
|
-
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: docTitle }), void 0);
|
|
44
|
-
}
|
|
45
|
-
case types_1.TimelineDomainResourceType.AuditEvent: {
|
|
46
|
-
var audit = domainResource;
|
|
47
|
-
var auditTitle = audit.metadata.isRedacted ? 'Insufficient privileges' : (_f = audit.text) === null || _f === void 0 ? void 0 : _f.text;
|
|
48
|
-
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: auditTitle }), void 0);
|
|
49
|
-
}
|
|
50
|
-
default:
|
|
51
|
-
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
exports.default = TimelineTitle;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
+
var types_1 = require("@ltht-react/types");
|
|
27
|
+
var TimelineTitle = function (_a) {
|
|
28
|
+
var _b, _c, _d, _e, _f;
|
|
29
|
+
var domainResource = _a.domainResource, domainResourceType = _a.domainResourceType, rest = __rest(_a, ["domainResource", "domainResourceType"]);
|
|
30
|
+
if (!domainResource)
|
|
31
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
32
|
+
switch (domainResourceType) {
|
|
33
|
+
case types_1.TimelineDomainResourceType.QuestionnaireResponse: {
|
|
34
|
+
var qr = domainResource;
|
|
35
|
+
var questionnaireTitle = qr.metadata.isRedacted
|
|
36
|
+
? 'Insufficient privileges'
|
|
37
|
+
: (_c = (_b = qr.text) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : (_d = qr.questionnaire) === null || _d === void 0 ? void 0 : _d.title;
|
|
38
|
+
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: questionnaireTitle }), void 0);
|
|
39
|
+
}
|
|
40
|
+
case types_1.TimelineDomainResourceType.DocumentReference: {
|
|
41
|
+
var docRef = domainResource;
|
|
42
|
+
var docTitle = docRef.metadata.isRedacted ? 'Insufficient privileges' : (_e = docRef.text) === null || _e === void 0 ? void 0 : _e.text;
|
|
43
|
+
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: docTitle }), void 0);
|
|
44
|
+
}
|
|
45
|
+
case types_1.TimelineDomainResourceType.AuditEvent: {
|
|
46
|
+
var audit = domainResource;
|
|
47
|
+
var auditTitle = audit.metadata.isRedacted ? 'Insufficient privileges' : (_f = audit.text) === null || _f === void 0 ? void 0 : _f.text;
|
|
48
|
+
return jsx_runtime_1.jsx("div", __assign({}, rest, { children: auditTitle }), void 0);
|
|
49
|
+
}
|
|
50
|
+
default:
|
|
51
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, {}, void 0);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.default = TimelineTitle;
|
|
55
55
|
//# sourceMappingURL=timeline-title.js.map
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const PRIMARY_AUTHOR = "PRIMAUTH";
|
|
2
|
-
export default PRIMARY_AUTHOR;
|
|
1
|
+
declare const PRIMARY_AUTHOR = "PRIMAUTH";
|
|
2
|
+
export default PRIMARY_AUTHOR;
|
package/lib/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var PRIMARY_AUTHOR = 'PRIMAUTH';
|
|
4
|
-
exports.default = PRIMARY_AUTHOR;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var PRIMARY_AUTHOR = 'PRIMAUTH';
|
|
4
|
+
exports.default = PRIMARY_AUTHOR;
|
|
5
5
|
//# sourceMappingURL=constants.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Timeline, { ITimelineFilter, ITimelineFilterOption } from './organisms/timeline';
|
|
2
|
-
import { ITimelineItem } from './molecules/timeline-item';
|
|
3
|
-
import PRIMARY_AUTHOR from './constants';
|
|
4
|
-
export default Timeline;
|
|
5
|
-
export { ITimelineItem, ITimelineFilter, ITimelineFilterOption, PRIMARY_AUTHOR };
|
|
1
|
+
import Timeline, { ITimelineFilter, ITimelineFilterOption } from './organisms/timeline';
|
|
2
|
+
import { ITimelineItem } from './molecules/timeline-item';
|
|
3
|
+
import PRIMARY_AUTHOR from './constants';
|
|
4
|
+
export default Timeline;
|
|
5
|
+
export { ITimelineItem, ITimelineFilter, ITimelineFilterOption, PRIMARY_AUTHOR };
|
package/lib/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
|
-
exports.PRIMARY_AUTHOR = void 0;
|
|
7
|
-
var timeline_1 = __importDefault(require("./organisms/timeline"));
|
|
8
|
-
var constants_1 = __importDefault(require("./constants"));
|
|
9
|
-
exports.PRIMARY_AUTHOR = constants_1.default;
|
|
10
|
-
exports.default = timeline_1.default;
|
|
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
|
+
exports.PRIMARY_AUTHOR = void 0;
|
|
7
|
+
var timeline_1 = __importDefault(require("./organisms/timeline"));
|
|
8
|
+
var constants_1 = __importDefault(require("./constants"));
|
|
9
|
+
exports.PRIMARY_AUTHOR = constants_1.default;
|
|
10
|
+
exports.default = timeline_1.default;
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/lib/methods.d.ts
ADDED
package/lib/methods.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var isDocumentReference = function (domainResource) {
|
|
4
|
+
var docRef = domainResource;
|
|
5
|
+
return docRef.status !== undefined;
|
|
6
|
+
};
|
|
7
|
+
exports.default = isDocumentReference;
|
|
8
|
+
//# sourceMappingURL=methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../src/methods.ts"],"names":[],"mappings":";;AAEA,IAAM,mBAAmB,GAAG,UAAC,cAA8C;IACzE,IAAM,MAAM,GAAG,cAAmC,CAAA;IAClD,OAAO,MAAM,CAAC,MAAM,KAAK,SAAS,CAAA;AACpC,CAAC,CAAA;AAED,kBAAe,mBAAmB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
declare const TimelineItemRedacted: FC;
|
|
3
|
-
export default TimelineItemRedacted;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
declare const TimelineItemRedacted: FC;
|
|
3
|
+
export default TimelineItemRedacted;
|
|
@@ -1,43 +1,43 @@
|
|
|
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 styles_1 = require("@ltht-react/styles");
|
|
24
|
-
var hooks_1 = require("@ltht-react/hooks");
|
|
25
|
-
var utils_1 = require("@ltht-react/utils");
|
|
26
|
-
var timeline_title_redacted_1 = __importDefault(require("../atoms/timeline-title-redacted"));
|
|
27
|
-
var StyledTimelineItem = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n padding: 0.5rem;\n"], ["\n background-color: ", ";\n padding: 0.5rem;\n"])), function (_a) {
|
|
28
|
-
var isSelected = _a.isSelected;
|
|
29
|
-
return (isSelected ? styles_1.HIGHLIGHT_GREEN.VALUE : styles_1.TRANSLUCENT_DARK_BLUE);
|
|
30
|
-
});
|
|
31
|
-
var StyledTimelineItemTop = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n color: black;\n padding-bottom: 0.25rem;\n"], ["\n display: flex;\n color: black;\n padding-bottom: 0.25rem;\n"])));
|
|
32
|
-
var StyledTitle = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-grow: 1;\n color: black;\n font-size: ", ";\n font-weight: bold;\n"], ["\n flex-grow: 1;\n color: black;\n font-size: ", ";\n font-weight: bold;\n"])), function (_a) {
|
|
33
|
-
var isMobile = _a.isMobile;
|
|
34
|
-
return (isMobile ? 'medium' : 'large');
|
|
35
|
-
});
|
|
36
|
-
var TimelineItemRedacted = function () {
|
|
37
|
-
var width = hooks_1.useWindowSize().width;
|
|
38
|
-
var isMobile = utils_1.isMobileView(width);
|
|
39
|
-
return (jsx_runtime_1.jsx(StyledTimelineItem, __assign({ isSelected: false }, { children: jsx_runtime_1.jsx(StyledTimelineItemTop, { children: jsx_runtime_1.jsx(StyledTitle, __assign({ isMobile: isMobile }, { children: jsx_runtime_1.jsx(timeline_title_redacted_1.default, {}, void 0) }), void 0) }, void 0) }), void 0));
|
|
40
|
-
};
|
|
41
|
-
exports.default = TimelineItemRedacted;
|
|
42
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
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 styles_1 = require("@ltht-react/styles");
|
|
24
|
+
var hooks_1 = require("@ltht-react/hooks");
|
|
25
|
+
var utils_1 = require("@ltht-react/utils");
|
|
26
|
+
var timeline_title_redacted_1 = __importDefault(require("../atoms/timeline-title-redacted"));
|
|
27
|
+
var StyledTimelineItem = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n padding: 0.5rem;\n"], ["\n background-color: ", ";\n padding: 0.5rem;\n"])), function (_a) {
|
|
28
|
+
var isSelected = _a.isSelected;
|
|
29
|
+
return (isSelected ? styles_1.HIGHLIGHT_GREEN.VALUE : styles_1.TRANSLUCENT_DARK_BLUE);
|
|
30
|
+
});
|
|
31
|
+
var StyledTimelineItemTop = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n color: black;\n padding-bottom: 0.25rem;\n"], ["\n display: flex;\n color: black;\n padding-bottom: 0.25rem;\n"])));
|
|
32
|
+
var StyledTitle = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-grow: 1;\n color: black;\n font-size: ", ";\n font-weight: bold;\n"], ["\n flex-grow: 1;\n color: black;\n font-size: ", ";\n font-weight: bold;\n"])), function (_a) {
|
|
33
|
+
var isMobile = _a.isMobile;
|
|
34
|
+
return (isMobile ? 'medium' : 'large');
|
|
35
|
+
});
|
|
36
|
+
var TimelineItemRedacted = function () {
|
|
37
|
+
var width = hooks_1.useWindowSize().width;
|
|
38
|
+
var isMobile = utils_1.isMobileView(width);
|
|
39
|
+
return (jsx_runtime_1.jsx(StyledTimelineItem, __assign({ isSelected: false }, { children: jsx_runtime_1.jsx(StyledTimelineItemTop, { children: jsx_runtime_1.jsx(StyledTitle, __assign({ isMobile: isMobile }, { children: jsx_runtime_1.jsx(timeline_title_redacted_1.default, {}, void 0) }), void 0) }, void 0) }), void 0));
|
|
40
|
+
};
|
|
41
|
+
exports.default = TimelineItemRedacted;
|
|
42
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
43
43
|
//# sourceMappingURL=timeline-item-redacted.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { AuditEvent, DocumentReference, Maybe, QuestionnaireResponse, TimelineDomainResourceType } from '@ltht-react/types';
|
|
3
|
-
declare const TimelineItem: FC<IProps>;
|
|
4
|
-
interface IProps {
|
|
5
|
-
timelineItem: Maybe<ITimelineItem>;
|
|
6
|
-
domainResourceType: TimelineDomainResourceType;
|
|
7
|
-
}
|
|
8
|
-
export interface ITimelineItem {
|
|
9
|
-
domainResource?: Maybe<AuditEvent | QuestionnaireResponse | DocumentReference>;
|
|
10
|
-
buttonState: TimeLineItemButtonState;
|
|
11
|
-
clickHandler?(): void;
|
|
12
|
-
buttonText?: string;
|
|
13
|
-
}
|
|
14
|
-
declare type TimeLineItemButtonState = 'no-button' | 'selectable-button' | 'selected-button' | 'permission-denied-button';
|
|
15
|
-
export default TimelineItem;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { AuditEvent, DocumentReference, Maybe, QuestionnaireResponse, TimelineDomainResourceType } from '@ltht-react/types';
|
|
3
|
+
declare const TimelineItem: FC<IProps>;
|
|
4
|
+
interface IProps {
|
|
5
|
+
timelineItem: Maybe<ITimelineItem>;
|
|
6
|
+
domainResourceType: TimelineDomainResourceType;
|
|
7
|
+
}
|
|
8
|
+
export interface ITimelineItem {
|
|
9
|
+
domainResource?: Maybe<AuditEvent | QuestionnaireResponse | DocumentReference>;
|
|
10
|
+
buttonState: TimeLineItemButtonState;
|
|
11
|
+
clickHandler?(): void;
|
|
12
|
+
buttonText?: string;
|
|
13
|
+
}
|
|
14
|
+
declare type TimeLineItemButtonState = 'no-button' | 'selectable-button' | 'selected-button' | 'permission-denied-button';
|
|
15
|
+
export default TimelineItem;
|