Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ltht-react/summary

Package Overview
Dependencies
Maintainers
6
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ltht-react/summary - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

lib/organisms/error-summary.d.ts

12

CHANGELOG.md

@@ -6,14 +6,18 @@ # Change Log

## [0.1.1](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/summary@0.0.24...@ltht-react/summary@0.1.1) (2021-01-22)
## [0.0.24](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/summary@0.0.22...@ltht-react/summary@0.0.24) (2020-11-19)
**Note:** Version bump only for package @ltht-react/summary
### Reverts
* Revert "refactor components and fix styles" ([b0c5fd8](https://github.com/ltht-epr/ltht-react/commit/b0c5fd89836aa7c47afe96aeccefd955a06dd50b))
* Revert "Publish" ([833cdd7](https://github.com/ltht-epr/ltht-react/commit/833cdd729f74c9fee22fa55530a6ec5552f438ea))
## [0.0.23](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/summary@0.0.22...@ltht-react/summary@0.0.23) (2020-10-29)
**Note:** Version bump only for package @ltht-react/summary
## [0.0.22](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/summary@0.0.21...@ltht-react/summary@0.0.22) (2020-09-10)

@@ -20,0 +24,0 @@

@@ -1,8 +0,7 @@

/** @jsx jsx */
import React from 'react';
import React, { HTMLAttributes } from 'react';
import { PartialDateTime } from '@ltht-react/types';
declare const DateSummary: React.FC<Props>;
interface Props {
interface Props extends HTMLAttributes<HTMLDivElement> {
datetime?: PartialDateTime | null;
}
export default DateSummary;

@@ -6,10 +6,36 @@ "use strict";

};
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@emotion/core");
var react_1 = __importDefault(require("react"));
var styled_1 = __importDefault(require("@emotion/styled"));
var styles_1 = require("@ltht-react/styles");
var utils_1 = require("@ltht-react/utils");
var styles = core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.PRIMARY);
var StyledDateSummary = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.PRIMARY);
var DateSummary = function (_a) {
var datetime = _a.datetime;
return core_1.jsx("div", { css: styles }, utils_1.partialDateTimeText(datetime));
var datetime = _a.datetime, rest = __rest(_a, ["datetime"]);
return (react_1.default.createElement(StyledDateSummary, __assign({}, rest), utils_1.partialDateTimeText(datetime)));
};

@@ -16,0 +42,0 @@ exports.default = DateSummary;

@@ -1,8 +0,7 @@

/** @jsx jsx */
import React from 'react';
import React, { HTMLAttributes } from 'react';
import { Period } from '@ltht-react/types';
declare const PeriodSummary: React.FC<Props>;
interface Props {
interface Props extends HTMLAttributes<HTMLDivElement> {
period?: Period | null;
}
export default PeriodSummary;

@@ -6,10 +6,36 @@ "use strict";

};
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@emotion/core");
var react_1 = __importDefault(require("react"));
var styled_1 = __importDefault(require("@emotion/styled"));
var styles_1 = require("@ltht-react/styles");
var utils_1 = require("@ltht-react/utils");
var styles = core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.PRIMARY);
var StyledPeriodSummary = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.PRIMARY);
var PeriodSummary = function (_a) {
var period = _a.period;
return core_1.jsx("div", { css: styles }, utils_1.periodSummaryText(period));
var period = _a.period, rest = __rest(_a, ["period"]);
return (react_1.default.createElement(StyledPeriodSummary, __assign({}, rest), utils_1.periodSummaryText(period)));
};

@@ -16,0 +42,0 @@ exports.default = PeriodSummary;

@@ -1,4 +0,3 @@

/** @jsx jsx */
import React from 'react';
declare const RedactedDescription: React.FC;
import React, { HTMLAttributes } from 'react';
declare const RedactedDescription: React.FC<HTMLAttributes<HTMLDivElement>>;
export default RedactedDescription;

@@ -6,8 +6,35 @@ "use strict";

};
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@emotion/core");
var react_1 = __importDefault(require("react"));
var styled_1 = __importDefault(require("@emotion/styled"));
var styles_1 = require("@ltht-react/styles");
var styles = core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE);
var RedactedDescription = function () {
return core_1.jsx("div", { css: styles }, "Insufficient privileges");
var StyledRedactedDescription = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE);
var RedactedDescription = function (_a) {
var rest = __rest(_a, []);
return (react_1.default.createElement(StyledRedactedDescription, __assign({}, rest), "Insufficient privileges"));
};

@@ -14,0 +41,0 @@ exports.default = RedactedDescription;

export { default as MissingDataSummary } from './missing-data-summary';
export { default as MissingDataWarning } from './missing-data-warning';
export { default as ErrorSummary } from './error-summary';
export { default as InfoSummary } from './info-summary';
export { default as WarningSummary } from './warning-summary';

@@ -7,2 +7,8 @@ "use strict";

Object.defineProperty(exports, "MissingDataWarning", { enumerable: true, get: function () { return missing_data_warning_1.default; } });
var error_summary_1 = require("./error-summary");
Object.defineProperty(exports, "ErrorSummary", { enumerable: true, get: function () { return error_summary_1.default; } });
var info_summary_1 = require("./info-summary");
Object.defineProperty(exports, "InfoSummary", { enumerable: true, get: function () { return info_summary_1.default; } });
var warning_summary_1 = require("./warning-summary");
Object.defineProperty(exports, "WarningSummary", { enumerable: true, get: function () { return warning_summary_1.default; } });
//# sourceMappingURL=index.js.map

@@ -1,2 +0,1 @@

/** @jsx jsx */
import React from 'react';

@@ -7,6 +6,6 @@ import { Maybe } from '@ltht-react/types';

missingData?: Maybe<Array<string>>;
partialData?: Maybe<Array<string>>;
completeData?: Maybe<Array<string>>;
noData?: Maybe<Array<string>>;
partialData?: Maybe<Array<string>>;
allData?: Maybe<Array<string>>;
}
export default MissingDataSummary;
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -10,39 +6,34 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
/** @jsx jsx */
var react_1 = __importDefault(require("react"));
var core_1 = require("@emotion/core");
var list_1 = require("@ltht-react/list");
var banner_1 = require("@ltht-react/banner");
var card_1 = __importDefault(require("@ltht-react/card"));
var icon_1 = require("@ltht-react/icon");
var styles = core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: 0.5rem;\n"], ["\n padding-left: 0.5rem;\n"])));
var MissingDataSummary = function (_a) {
var missingData = _a.missingData, noData = _a.noData, partialData = _a.partialData, allData = _a.allData;
var missingDataSection = missingData != null ? (core_1.jsx(react_1.default.Fragment, null,
core_1.jsx(banner_1.WarningBanner, null,
core_1.jsx(icon_1.CounterIcon, { size: "large", status: "amber", value: missingData.length }),
core_1.jsx("div", { css: styles }, "Missing Data")),
missingData.map(function (data) { return (core_1.jsx(list_1.ListItem, null, data)); }))) : (core_1.jsx(react_1.default.Fragment, null));
var noDataSection = noData != null ? (core_1.jsx(react_1.default.Fragment, null,
core_1.jsx(banner_1.WarningBanner, null,
core_1.jsx(icon_1.CounterIcon, { size: "large", status: "amber", value: noData.length }),
core_1.jsx("div", { css: styles }, "No Data")),
noData.map(function (data) { return (core_1.jsx(list_1.ListItem, null, data)); }))) : (core_1.jsx(react_1.default.Fragment, null));
var partialDataSection = partialData != null ? (core_1.jsx(react_1.default.Fragment, null,
core_1.jsx(banner_1.WarningBanner, null,
core_1.jsx(icon_1.CounterIcon, { size: "large", status: "amber", value: partialData.length }),
core_1.jsx("div", { css: styles }, "Partial Data")),
partialData.map(function (data) { return (core_1.jsx(list_1.ListItem, null, data)); }))) : (core_1.jsx(react_1.default.Fragment, null));
var allDataSection = allData != null ? (core_1.jsx(react_1.default.Fragment, null,
core_1.jsx(banner_1.InfoBanner, null,
core_1.jsx(icon_1.CounterIcon, { size: "large", status: "info", value: allData.length }),
core_1.jsx("div", { css: styles }, "All Data")),
allData.map(function (data) { return (core_1.jsx(list_1.ListItem, null, data)); }))) : (core_1.jsx(react_1.default.Fragment, null));
return (core_1.jsx(react_1.default.Fragment, null,
var noData = _a.noData, partialData = _a.partialData, completeData = _a.completeData, missingData = _a.missingData;
var missingDataSection = missingData != null && missingData.length > 0 ? (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement(card_1.default.Banner, { status: "warning" },
react_1.default.createElement(icon_1.CounterIcon, { size: "large", status: "amber", value: missingData.length }),
" Missing Data"),
react_1.default.createElement(card_1.default.List, null, missingData.map(function (data) { return (react_1.default.createElement(card_1.default.ListItem, null, data)); })))) : (react_1.default.createElement(react_1.default.Fragment, null));
var partialDataSection = partialData != null && partialData.length > 0 ? (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement(card_1.default.Banner, { status: "warning" },
react_1.default.createElement(icon_1.CounterIcon, { size: "large", status: "amber", value: partialData.length }),
" Partial Data"),
react_1.default.createElement(card_1.default.List, null, partialData.map(function (data) { return (react_1.default.createElement(card_1.default.ListItem, null, data)); })))) : (react_1.default.createElement(react_1.default.Fragment, null));
var completeDataSection = completeData != null && completeData.length > 0 ? (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement(card_1.default.Banner, { status: "info" },
react_1.default.createElement(icon_1.CounterIcon, { size: "large", status: "info", value: completeData.length }),
" Complete Data"),
react_1.default.createElement(card_1.default.List, null, completeData.map(function (data) { return (react_1.default.createElement(card_1.default.ListItem, null, data)); })))) : (react_1.default.createElement(react_1.default.Fragment, null));
var noDataSection = noData != null && noData.length > 0 ? (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement(card_1.default.Banner, { status: "info" },
react_1.default.createElement(icon_1.CounterIcon, { size: "large", status: "info", value: noData.length }),
" No Data"),
react_1.default.createElement(card_1.default.List, null, noData.map(function (data) { return (react_1.default.createElement(card_1.default.ListItem, null, data)); })))) : (react_1.default.createElement(react_1.default.Fragment, null));
return (react_1.default.createElement(react_1.default.Fragment, null,
missingDataSection,
noDataSection,
partialDataSection,
allDataSection));
completeDataSection,
noDataSection));
};
exports.default = MissingDataSummary;
var templateObject_1;
//# sourceMappingURL=missing-data-summary.js.map

@@ -1,2 +0,1 @@

/** @jsx jsx */
import React from 'react';

@@ -3,0 +2,0 @@ declare const MissingDataWarning: React.FC<Props>;

"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@emotion/core");
var banner_1 = require("@ltht-react/banner");
var react_1 = __importDefault(require("react"));
var card_1 = __importDefault(require("@ltht-react/card"));
var icon_1 = require("@ltht-react/icon");
var styles = core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 1;\n padding-left: 0.5rem;\n"], ["\n flex-grow: 1;\n padding-left: 0.5rem;\n"])));
var MissingDataWarning = function (_a) {

@@ -15,13 +24,10 @@ var clickHandler = _a.clickHandler;

e.preventDefault();
if (clickHandler != null) {
clickHandler();
}
clickHandler && clickHandler();
};
return (core_1.jsx(banner_1.WarningBanner, { clickHandler: handleClick },
core_1.jsx(icon_1.ExclamationIcon, { size: "medium", status: "amber" }),
core_1.jsx("div", { css: styles }, "Missing Data"),
core_1.jsx(icon_1.ChevronIcon, { size: "medium", direction: "right" })));
var missingDataWarningProps = __assign({}, (clickHandler && { onClick: handleClick }));
return (react_1.default.createElement(card_1.default.Banner, __assign({ status: "warning" }, missingDataWarningProps),
react_1.default.createElement(icon_1.ExclamationIcon, { size: "medium", status: "amber" }),
" Missing Data"));
};
exports.default = MissingDataWarning;
var templateObject_1;
//# sourceMappingURL=missing-data-warning.js.map
{
"name": "@ltht-react/summary",
"version": "0.1.1",
"version": "1.0.0",
"description": "ltht-react clinical Summary component.",

@@ -30,12 +30,12 @@ "author": "LTHT",

"@emotion/styled": "^10.0.27",
"@ltht-react/banner": "^0.1.1",
"@ltht-react/icon": "^0.2.1",
"@ltht-react/list": "^0.2.1",
"@ltht-react/styles": "^0.2.1",
"@ltht-react/types": "^0.1.1",
"@ltht-react/utils": "^0.2.1",
"@ltht-react/card": "^1.0.0",
"@ltht-react/icon": "^1.0.0",
"@ltht-react/list": "^1.0.0",
"@ltht-react/styles": "^1.0.0",
"@ltht-react/types": "^0.0.27",
"@ltht-react/utils": "^1.0.0",
"emotion": "^10.0.27",
"react": "^16.12.0"
},
"gitHead": "8ed606fa5eb29a987434481dce1c2fed87966fc7"
"gitHead": "ce395cbe99477a620c639ce01b401654510f7f81"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc