Socket
Socket
Sign inDemoInstall

@ltht-react/flag-summary

Package Overview
Dependencies
93
Maintainers
1
Versions
315
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

8

CHANGELOG.md

@@ -6,4 +6,12 @@ # Change Log

## [0.0.2](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/flag-summary@0.0.1...@ltht-react/flag-summary@0.0.2) (2020-01-06)
**Note:** Version bump only for package @ltht-react/flag-summary
## 0.0.1 (2020-01-03)
**Note:** Version bump only for package @ltht-react/flag-summary

23

lib/fixtures.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var types_1 = require("@ltht-react/types");
var mockMetadata = {
dataSources: [
{
display: 'Mock',
},
],
};
var FlagOne = {
id: '580ca927-34e0-e911-a2c7-005056926fe4|personalertandhazard',
metadata: mockMetadata,
author: {

@@ -16,5 +24,8 @@ display: 'John Smith',

period: {
start: new Date(2019, 4, 5),
start: {
value: new Date(2019, 4, 5),
kind: types_1.PartialDateTimeKindCode.Date,
},
},
status: types_1.StatusCode.INACTIVE,
status: types_1.FlagStatusCode.Inactive,
};

@@ -24,2 +35,3 @@ exports.FlagOne = FlagOne;

id: '580ca927-34e0-e911-a2c7-005056926fe4|personalertandhazard',
metadata: mockMetadata,
author: {

@@ -35,7 +47,10 @@ display: 'John Smith',

period: {
start: new Date(2017, 3, 12),
start: {
value: new Date(2017, 3, 12),
kind: types_1.PartialDateTimeKindCode.Date,
},
},
status: types_1.StatusCode.ACTIVE,
status: types_1.FlagStatusCode.Active,
};
exports.FlagTwo = FlagTwo;
//# sourceMappingURL=fixtures.js.map

19

lib/index.js

@@ -19,3 +19,4 @@ "use strict";

.map(function (coding) {
return coding.display;
var _a;
return (_a = coding) === null || _a === void 0 ? void 0 : _a.display;
})

@@ -25,3 +26,4 @@ .join(', ');

.map(function (coding) {
return coding.code;
var _a;
return (_a = coding) === null || _a === void 0 ? void 0 : _a.code;
})

@@ -37,3 +39,3 @@ .join(', ');

}
return date
return date.value
.toLocaleString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' })

@@ -45,4 +47,5 @@ .split(' ')

var _b = _a.period, period = _b === void 0 ? {} : _b, listStyles = _a.listStyles, textStyles = _a.textStyles;
var _c;
return (core_1.jsx("ul", { css: listStyles },
core_1.jsx("li", null, DateText(period.start)),
core_1.jsx("li", null, DateText((_c = period) === null || _c === void 0 ? void 0 : _c.start)),
core_1.jsx("li", { css: textStyles })));

@@ -55,10 +58,10 @@ };

var ul_styles = core_1.css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-left: 0.4rem;\n list-style: none;\n "], ["\n padding-left: 0.4rem;\n list-style: none;\n "])));
var seconday_text_style = core_1.css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), styles_1.SECONDARY_TEXT_COLOUR);
var secondary_text_style = core_1.css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), styles_1.SECONDARY_TEXT_COLOUR);
return (core_1.jsx("li", { css: li_styles, onClick: function () { return handleClick; } },
core_1.jsx("div", null,
core_1.jsx(exclamation_icon_1.default, { status: flag.status === types_1.StatusCode.ACTIVE ? 'red' : 'amber', size: "medium" })),
core_1.jsx(exclamation_icon_1.default, { status: flag.status === types_1.FlagStatusCode.Active ? 'red' : 'amber', size: "medium" })),
core_1.jsx("div", { css: codeable_styles },
core_1.jsx(CodeableConceptSnippet, { codeableConcept: flag.code, listStyles: ul_styles, textStyles: seconday_text_style })),
core_1.jsx(CodeableConceptSnippet, { codeableConcept: flag.code, listStyles: ul_styles, textStyles: secondary_text_style })),
core_1.jsx("div", null,
core_1.jsx(PeriodSnippet, { period: flag.period, listStyles: ul_styles, textStyles: seconday_text_style }))));
core_1.jsx(PeriodSnippet, { period: flag.period, listStyles: ul_styles, textStyles: secondary_text_style }))));
};

@@ -65,0 +68,0 @@ var FlagSummary = function (_a) {

{
"name": "@ltht-react/flag-summary",
"version": "0.0.1",
"version": "0.0.2",
"description": "> TODO: description",

@@ -27,3 +27,3 @@ "author": "Jonny Smith <jonny.asmith@gmail.com>",

"lint": "prettylint 'src/*.{ts,tsx}'",
"test": ""
"docs": "doc-component ./lib/index.js README_AUTO.md"
},

@@ -33,5 +33,5 @@ "dependencies": {

"@emotion/styled": "^10.0.27",
"@ltht-react/exclamation-icon": "^0.0.1",
"@ltht-react/exclamation-icon": "^0.0.2",
"@ltht-react/styles": "^0.0.1",
"@ltht-react/types": "^0.0.1",
"@ltht-react/types": "^0.0.2",
"emotion": "^10.0.27",

@@ -60,3 +60,3 @@ "react": "^16.12.0"

},
"gitHead": "9aa55822ea952f1b36db1543e601b2c78b11f2e2"
"gitHead": "30e05758c469666ff8be03e6b338e1bb319eb4d9"
}

@@ -8,3 +8,3 @@ # Flag Summary

```js
import { FlagSummary } from '@ltht-react/components'
import FlagSummary from '@ltht-react/flag-summary'
```

@@ -14,6 +14,12 @@

Simple
```jsx
<FlagSummary flags={flags} />
<FlagSummary title="Alerts" flags={flags} handleItemClick={handleClick} />
```
### Properties
| Prop | Required | Default | Type | Description |
| :---------------- | :------- | :----------- | :------- | :------------------------------------------------------------- |
| `title` | No | Flag Summary | string | Header text for the widget |
| `flags` | Yes | | Flag[] | Array of flag to display in the widget |
| `handleItemClick` | No | | Function | Callback click handler containing the flag item from the array |

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc