Socket
Socket
Sign inDemoInstall

@ltht-react/appointment-summary

Package Overview
Dependencies
Maintainers
1
Versions
336
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ltht-react/appointment-summary - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.0.7](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/appointment-summary@0.0.6...@ltht-react/appointment-summary@0.0.7) (2020-01-30)
**Note:** Version bump only for package @ltht-react/appointment-summary
## [0.0.6](https://github.com/ltht-epr/ltht-react/compare/@ltht-react/appointment-summary@0.0.5...@ltht-react/appointment-summary@0.0.6) (2020-01-23)

@@ -8,0 +16,0 @@

10

lib/atoms/appointment-date.d.ts

@@ -1,6 +0,8 @@

/// <reference types="react" />
/** @jsx jsx */
import React from 'react';
import { Encounter } from '@ltht-react/types';
declare const AppointmentDate: ({ appointment }: {
appointment: Encounter;
}) => JSX.Element;
declare const AppointmentDate: React.FC<Props>;
interface Props {
encounter: Encounter;
}
export default AppointmentDate;

4

lib/atoms/appointment-date.js

@@ -12,5 +12,5 @@ "use strict";

var AppointmentDate = function (_a) {
var appointment = _a.appointment;
var encounter = _a.encounter;
var _b;
return core_1.jsx("div", { css: styles }, utils_1.partialDateTimeText((_b = appointment.period) === null || _b === void 0 ? void 0 : _b.start));
return core_1.jsx("div", { css: styles }, utils_1.partialDateTimeText((_b = encounter.period) === null || _b === void 0 ? void 0 : _b.start));
};

@@ -17,0 +17,0 @@ exports.default = AppointmentDate;

@@ -1,6 +0,8 @@

/// <reference types="react" />
/** @jsx jsx */
import React from 'react';
import { Encounter } from '@ltht-react/types';
declare const AppointmentDescription: ({ appointment }: {
appointment: Encounter;
}) => JSX.Element;
declare const AppointmentDescription: React.FC<Props>;
interface Props {
encounter: Encounter;
}
export default AppointmentDescription;

@@ -11,4 +11,4 @@ "use strict";

var AppointmentDescription = function (_a) {
var appointment = _a.appointment;
return core_1.jsx("div", { css: styles }, appointment.text && appointment.text.text);
var encounter = _a.encounter;
return core_1.jsx("div", { css: styles }, encounter.text && encounter.text.text);
};

@@ -15,0 +15,0 @@ exports.default = AppointmentDescription;

@@ -1,6 +0,8 @@

/// <reference types="react" />
/** @jsx jsx */
import React from 'react';
import { Encounter } from '@ltht-react/types';
declare const AppointmentServiceProvider: ({ appointment }: {
appointment: Encounter;
}) => JSX.Element;
declare const AppointmentServiceProvider: React.FC<Props>;
interface Props {
encounter: Encounter;
}
export default AppointmentServiceProvider;

@@ -11,5 +11,5 @@ "use strict";

var AppointmentServiceProvider = function (_a) {
var appointment = _a.appointment;
var encounter = _a.encounter;
var _b;
return core_1.jsx("div", { css: styles }, (_b = appointment.serviceProvider) === null || _b === void 0 ? void 0 : _b.display);
return core_1.jsx("div", { css: styles }, (_b = encounter.serviceProvider) === null || _b === void 0 ? void 0 : _b.display);
};

@@ -16,0 +16,0 @@ exports.default = AppointmentServiceProvider;

@@ -1,6 +0,8 @@

/// <reference types="react" />
/** @jsx jsx */
import React from 'react';
import { Encounter } from '@ltht-react/types';
declare const AppointmentStatus: ({ appointment }: {
appointment: Encounter;
}) => JSX.Element;
declare const AppointmentStatus: React.FC<Props>;
interface Props {
encounter: Encounter;
}
export default AppointmentStatus;

@@ -12,4 +12,4 @@ "use strict";

var AppointmentStatus = function (_a) {
var appointment = _a.appointment;
return core_1.jsx("div", { css: styles }, appointment.status && utils_1.titleCase(appointment.status));
var encounter = _a.encounter;
return core_1.jsx("div", { css: styles }, encounter.status && utils_1.titleCase(encounter.status));
};

@@ -16,0 +16,0 @@ exports.default = AppointmentStatus;

@@ -1,9 +0,9 @@

/// <reference types="react" />
import React from 'react';
import { Encounter } from '@ltht-react/types';
declare const AppointmentSummary: ({ title, appointments, clickHandler }: Props) => JSX.Element;
declare const AppointmentSummary: React.FC<Props>;
interface Props {
title?: string;
appointments: Encounter[] | undefined;
encounters: Encounter[] | undefined;
clickHandler?(appointment: Encounter): void;
}
export default AppointmentSummary;

@@ -7,13 +7,13 @@ "use strict";

var react_1 = __importDefault(require("react"));
var widget_1 = require("@ltht-react/widget");
var appointment_summary_item_1 = __importDefault(require("./molecules/appointment-summary-item"));
var widget_1 = require("@ltht-react/widget");
var AppointmentSummary = function (_a) {
var _b = _a.title, title = _b === void 0 ? 'Appointments' : _b, _c = _a.appointments, appointments = _c === void 0 ? [] : _c, clickHandler = _a.clickHandler;
var _b = _a.title, title = _b === void 0 ? 'Appointments' : _b, _c = _a.encounters, encounters = _c === void 0 ? [] : _c, clickHandler = _a.clickHandler;
return (react_1.default.createElement(widget_1.Widget, null,
react_1.default.createElement(widget_1.WidgetHeader, null,
react_1.default.createElement("h3", null, title)),
react_1.default.createElement(widget_1.WidgetList, { clickable: clickHandler ? true : false }, appointments.map(function (appointment, index) { return (react_1.default.createElement(widget_1.WidgetListItem, { key: index },
react_1.default.createElement(appointment_summary_item_1.default, { key: index, appointment: appointment, clickHandler: clickHandler }))); }))));
react_1.default.createElement(widget_1.WidgetList, { clickable: !!clickHandler }, encounters.map(function (encounter) { return (react_1.default.createElement(widget_1.WidgetListItem, { key: encounter.id },
react_1.default.createElement(appointment_summary_item_1.default, { encounter: encounter, clickHandler: clickHandler }))); }))));
};
exports.default = AppointmentSummary;
//# sourceMappingURL=index.js.map

@@ -1,8 +0,9 @@

/// <reference types="react" />
/** @jsx jsx */
import React from 'react';
import { Encounter } from '@ltht-react/types';
declare const AppointmentSummaryItem: ({ appointment, clickHandler }: Props) => JSX.Element;
declare const AppointmentSummaryItem: React.FC<Props>;
interface Props {
appointment: Encounter;
encounter: Encounter;
clickHandler?(appointment: Encounter): void;
}
export default AppointmentSummaryItem;

@@ -15,18 +15,20 @@ "use strict";

var appointment_status_1 = __importDefault(require("../atoms/appointment-status"));
var styles = core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n"], ["\n display: flex;\n justify-content: center;\n"])));
var descriptionStyles = core_1.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex-grow: 1;\n"], ["\n flex-grow: 1;\n"])));
var styles = {
root: core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n "], ["\n display: flex;\n justify-content: center;\n "]))),
description: core_1.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex-grow: 1;\n "], ["\n flex-grow: 1;\n "]))),
};
var AppointmentSummaryItem = function (_a) {
var appointment = _a.appointment, clickHandler = _a.clickHandler;
var encounter = _a.encounter, clickHandler = _a.clickHandler;
var handleClick = function (e) {
e.preventDefault();
clickHandler && clickHandler(appointment);
clickHandler && clickHandler(encounter);
};
return (core_1.jsx("div", { css: styles, onClick: clickHandler && handleClick },
return (core_1.jsx("div", { role: "link", css: styles.root, onClick: clickHandler && handleClick },
core_1.jsx("div", null,
core_1.jsx(appointment_date_1.default, { appointment: appointment })),
core_1.jsx("div", { css: descriptionStyles },
core_1.jsx(appointment_description_1.default, { appointment: appointment })),
core_1.jsx(appointment_date_1.default, { encounter: encounter })),
core_1.jsx("div", { css: styles.description },
core_1.jsx(appointment_description_1.default, { encounter: encounter })),
core_1.jsx("div", null,
core_1.jsx(appointment_service_provider_1.default, { appointment: appointment }),
core_1.jsx(appointment_status_1.default, { appointment: appointment }))));
core_1.jsx(appointment_service_provider_1.default, { encounter: encounter }),
core_1.jsx(appointment_status_1.default, { encounter: encounter }))));
};

@@ -33,0 +35,0 @@ exports.default = AppointmentSummaryItem;

@@ -11,3 +11,2 @@ "use strict";

var _1 = __importDefault(require("."));
var handleClick = function (appointment) { };
describe('AppointmentSummary', function () {

@@ -17,8 +16,8 @@ var appointments = [fixtures_1.AppointmentOne, fixtures_1.AppointmentTwo];

var div = document.createElement('div');
react_dom_1.default.render(react_1.default.createElement(_1.default, { title: "Appointments", appointments: appointments, clickHandler: handleClick }), div);
react_dom_1.default.render(react_1.default.createElement(_1.default, { title: "Appointments", encounters: appointments }), div);
});
it('matches snapshot', function () {
expect(enzyme_1.mount(react_1.default.createElement(_1.default, { title: "Appointments", appointments: appointments, clickHandler: handleClick }))).toMatchSnapshot('wrapper mount');
expect(enzyme_1.mount(react_1.default.createElement(_1.default, { title: "Appointments", encounters: appointments }))).toMatchSnapshot('wrapper mount');
});
});
//# sourceMappingURL=tests.js.map
{
"name": "@ltht-react/appointment-summary",
"version": "0.0.6",
"version": "0.0.7",
"description": "ltht-react AppointmentSummary component.",

@@ -20,8 +20,4 @@ "author": "LTHT",

"scripts": {
"clean": "rimraf lib",
"build": "yarn build:lib",
"watch": "tsc -w",
"build:lib": "tsc",
"type:check": "tsc --noEmit",
"lint": "prettylint 'src/*.{ts,tsx}'"
"clean": "rimraf lib && rimraf node_modules",
"build": "tsc"
},

@@ -31,10 +27,10 @@ "dependencies": {

"@emotion/styled": "^10.0.27",
"@ltht-react/styles": "^0.0.6",
"@ltht-react/types": "^0.0.6",
"@ltht-react/utils": "^0.0.9",
"@ltht-react/widget": "^0.0.7",
"@ltht-react/styles": "^0.0.7",
"@ltht-react/types": "^0.0.7",
"@ltht-react/utils": "^0.0.10",
"@ltht-react/widget": "^0.0.8",
"emotion": "^10.0.27",
"react": "^16.12.0"
},
"gitHead": "c3679fdff0c81b46706afbf8b707e56d2c9b1ef8"
"gitHead": "41a42ce817ac46f80fe142d3af2e0e4af689adf3"
}

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

# AppointmentSummary
# Appointment Summary

@@ -3,0 +3,0 @@ ### Import

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

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