@photonhealth/elements 0.0.80 → 0.0.82
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 +44 -0
- package/dist/context.d.ts +3 -0
- package/dist/hooks/exposeForm.d.ts +3 -0
- package/dist/hooks/useSlot.d.ts +2 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +3706 -0
- package/dist/index.mjs +32036 -0
- package/dist/photon-auth-button/index.d.ts +1 -0
- package/dist/photon-authenticated/index.d.ts +2 -0
- package/dist/photon-button/PhotonButton.stories.d.ts +6 -0
- package/dist/photon-button/index.d.ts +1 -0
- package/dist/photon-card/index.d.ts +1 -0
- package/dist/photon-checkbox/index.d.ts +1 -0
- package/dist/photon-client/index.d.ts +1 -0
- package/dist/photon-datepicker/index.d.ts +1 -0
- package/dist/photon-dialog/index.d.ts +1 -0
- package/dist/photon-dispense-units/index.d.ts +1 -0
- package/dist/photon-dosage-calculator/components/DosageUnitsDropdown.d.ts +1 -0
- package/dist/photon-dosage-calculator/components/LiquidDosageUnitsDropdown.d.ts +1 -0
- package/dist/photon-dosage-calculator/components/VolumeUnitsDropdown.d.ts +1 -0
- package/dist/photon-dosage-calculator/components/WeightUnitsDropdown.d.ts +1 -0
- package/dist/photon-dosage-calculator/index.d.ts +1 -0
- package/dist/photon-dosage-calculator-dialog/index.d.ts +1 -0
- package/dist/photon-dropdown/index.d.ts +36 -0
- package/dist/photon-form/index.d.ts +1 -0
- package/dist/photon-form-wrapper/PhotonFormWrapper.stories.d.ts +8 -0
- package/dist/photon-form-wrapper/index.d.ts +13 -0
- package/dist/photon-gender-input/index.d.ts +1 -0
- package/dist/photon-login/index.d.ts +1 -0
- package/dist/photon-med-search/components/MedicationFormDropdown.d.ts +4 -0
- package/dist/photon-med-search/components/MedicationNameDropdown.d.ts +1 -0
- package/dist/photon-med-search/components/MedicationRouteDropdown.d.ts +4 -0
- package/dist/photon-med-search/components/MedicationStrengthDropdown.d.ts +4 -0
- package/dist/photon-med-search/index.d.ts +4 -0
- package/dist/photon-med-search-dialog/index.d.ts +1 -0
- package/dist/photon-multirx-form/PrescribeWorkflow.stories.d.ts +6 -0
- package/dist/photon-multirx-form/components/AddPrescriptionCard.d.ts +7 -0
- package/dist/photon-multirx-form/components/DraftPrescriptionCard.d.ts +5 -0
- package/dist/photon-multirx-form/components/OrderCard.d.ts +4 -0
- package/dist/photon-multirx-form/components/PatientCard.d.ts +8 -0
- package/dist/photon-multirx-form/components/PharmacyCard.d.ts +3 -0
- package/dist/photon-multirx-form/index.d.ts +4 -0
- package/dist/photon-multirx-form-wrapper/index.d.ts +1 -0
- package/dist/photon-number-input/index.d.ts +1 -0
- package/dist/photon-patient-dialog/index.d.ts +1 -0
- package/dist/photon-patient-form/index.d.ts +1 -0
- package/dist/photon-patient-select/index.d.ts +1 -0
- package/dist/photon-pharmacy-search/index.d.ts +1 -0
- package/dist/photon-phone-input/PhoneInput.stories.d.ts +7 -0
- package/dist/photon-phone-input/index.d.ts +9 -0
- package/dist/photon-prescribe-form/index.d.ts +5 -0
- package/dist/photon-prescription-select/index.d.ts +1 -0
- package/dist/photon-radio-card/index.d.ts +1 -0
- package/dist/photon-radio-group/index.d.ts +1 -0
- package/dist/photon-sex-input/index.d.ts +6 -0
- package/dist/photon-state-input/index.d.ts +1 -0
- package/dist/photon-text-input/index.d.ts +1 -0
- package/dist/photon-textarea/index.d.ts +1 -0
- package/dist/photon-tooltip/PhotonTooltip.stories.d.ts +21 -0
- package/dist/photon-tooltip/index.d.ts +9 -0
- package/dist/photon-treatment-select/TreatmentSelect.stories.d.ts +6 -0
- package/dist/photon-treatment-select/index.d.ts +1 -0
- package/dist/photon-update-patient-dialog/UpdatePatientDialog.stories.d.ts +6 -0
- package/dist/photon-update-patient-dialog/index.d.ts +1 -0
- package/dist/store.d.ts +96 -0
- package/dist/stores/catalog.d.ts +15 -0
- package/dist/stores/dispenseUnit.d.ts +18 -0
- package/dist/stores/form.d.ts +22 -0
- package/dist/stores/patient.d.ts +27 -0
- package/dist/stores/pharmacy.d.ts +41 -0
- package/dist/utils.d.ts +4 -0
- package/dist/validators/index.d.ts +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Story, Meta } from '@storybook/html';
|
|
2
|
+
import '.';
|
|
3
|
+
declare const _default: Meta<import("@storybook/html").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Solid: Story<import("@storybook/html").Args>;
|
|
6
|
+
export declare const Outline: Story<import("@storybook/html").Args>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/spinner/spinner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/checkbox/checkbox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/input/input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/dialog/dialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DosageUnitsDropdown: () => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LiquidDosageUnitsDropdown: () => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VolumeUnitsDropdown: () => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WeightUnitsDropdown: () => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JSXElement } from 'solid-js';
|
|
2
|
+
import '@shoelace-style/shoelace/dist/components/dropdown/dropdown';
|
|
3
|
+
import '@shoelace-style/shoelace/dist/components/input/input';
|
|
4
|
+
import '@shoelace-style/shoelace/dist/components/menu/menu';
|
|
5
|
+
import '@shoelace-style/shoelace/dist/components/menu-item/menu-item';
|
|
6
|
+
import '@shoelace-style/shoelace/dist/components/spinner/spinner';
|
|
7
|
+
import '@shoelace-style/shoelace/dist/components/icon/icon';
|
|
8
|
+
export declare const PhotonDropdown: <T extends {
|
|
9
|
+
id: string;
|
|
10
|
+
}>(props: {
|
|
11
|
+
data: T[];
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
required: boolean;
|
|
14
|
+
placeholder?: string | undefined;
|
|
15
|
+
forceLabelSize?: boolean | undefined;
|
|
16
|
+
invalid?: boolean | undefined;
|
|
17
|
+
onSearchChange?: Function | undefined;
|
|
18
|
+
displayAccessor: (selected: T, groupDisplay: boolean) => string | JSXElement;
|
|
19
|
+
disabled?: boolean | undefined;
|
|
20
|
+
onOpen?: Function | undefined;
|
|
21
|
+
onHide?: Function | undefined;
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
hasMore: boolean;
|
|
24
|
+
noDataMsg?: string | undefined;
|
|
25
|
+
helpText?: string | undefined;
|
|
26
|
+
fetchMore?: Function | undefined;
|
|
27
|
+
selectedData?: T | undefined;
|
|
28
|
+
groups?: {
|
|
29
|
+
label: string;
|
|
30
|
+
filter: Function;
|
|
31
|
+
}[] | undefined;
|
|
32
|
+
showOverflow?: boolean | undefined;
|
|
33
|
+
optional?: boolean | undefined;
|
|
34
|
+
clearable?: boolean | undefined;
|
|
35
|
+
actionRef?: any;
|
|
36
|
+
}) => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PhotonFormWrapperProps } from '.';
|
|
2
|
+
import '@shoelace-style/shoelace/dist/components/button/button';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ closeTitle, closeBody, headerRight, title, titleIconName, form, onClosed, checkShouldWarn, }: PhotonFormWrapperProps) => import("solid-js").JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Primary: ({ title, titleIconName, headerRight, form, onClosed, }: PhotonFormWrapperProps) => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export type PhotonFormWrapperProps = {
|
|
3
|
+
closeTitle?: string;
|
|
4
|
+
closeBody?: string;
|
|
5
|
+
headerRight?: JSX.Element;
|
|
6
|
+
title: string;
|
|
7
|
+
titleIconName?: string;
|
|
8
|
+
form?: JSX.Element;
|
|
9
|
+
onClosed: () => void;
|
|
10
|
+
checkShouldWarn?: () => boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const PhotonFormWrapper: ({ closeTitle, closeBody, headerRight, title, titleIconName, form, onClosed, checkShouldWarn, }: PhotonFormWrapperProps) => JSX.Element;
|
|
13
|
+
export default PhotonFormWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../photon-auth-button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MedicationNameDropdown: () => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/icon/icon';
|
|
2
|
+
import '@shoelace-style/shoelace/dist/components/button/button';
|
|
3
|
+
export declare const AddPrescriptionCard: (props: {
|
|
4
|
+
hideAddToTemplates: boolean;
|
|
5
|
+
actions: Record<string, Function>;
|
|
6
|
+
store: Record<string, any>;
|
|
7
|
+
}) => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PhotonClientStore } from '../../store';
|
|
2
|
+
export declare const PatientCard: (props: {
|
|
3
|
+
store: Record<string, any>;
|
|
4
|
+
actions: Record<string, Function>;
|
|
5
|
+
patientId?: string;
|
|
6
|
+
client?: PhotonClientStore;
|
|
7
|
+
enableOrder?: boolean;
|
|
8
|
+
}) => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/input/input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/spinner/spinner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Story, Meta } from '@storybook/html';
|
|
2
|
+
import '../photon-client';
|
|
3
|
+
import '.';
|
|
4
|
+
import type { PhoneInputProps } from '.';
|
|
5
|
+
declare const _default: Meta<import("@storybook/html").Args>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const PhoneInput: Story<PhoneInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/radio/radio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/radio/radio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/input/input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/textarea/textarea';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PhotonTooltipProps } from '.';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ tip, placement }: PhotonTooltipProps) => import("solid-js").JSX.Element;
|
|
5
|
+
argTypes: {
|
|
6
|
+
tip: {
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
placement: {
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
options: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
export declare const Primary: ({ tip, placement }: PhotonTooltipProps) => import("solid-js").JSX.Element;
|
|
21
|
+
export declare const LongText: ({ tip, placement }: PhotonTooltipProps) => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/tooltip/tooltip';
|
|
2
|
+
import '@shoelace-style/shoelace/dist/components/icon/icon';
|
|
3
|
+
export type TooltipPlacements = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
4
|
+
export type PhotonTooltipProps = {
|
|
5
|
+
tip: string;
|
|
6
|
+
placement?: TooltipPlacements;
|
|
7
|
+
};
|
|
8
|
+
declare const PhotonTooltip: ({ tip, placement }: PhotonTooltipProps) => import("solid-js").JSX.Element;
|
|
9
|
+
export default PhotonTooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { PhotonClient } from '@photonhealth/sdk';
|
|
2
|
+
import { Catalog, DispenseUnit, MutationCreatePrescriptionArgs, Patient, Prescription, PrescriptionTemplate, Treatment } from '@photonhealth/sdk/dist/types';
|
|
3
|
+
import { GraphQLError } from 'graphql';
|
|
4
|
+
export declare class PhotonClientStore {
|
|
5
|
+
private sdk;
|
|
6
|
+
private setStore;
|
|
7
|
+
private store;
|
|
8
|
+
authentication: {
|
|
9
|
+
state: {
|
|
10
|
+
user: any;
|
|
11
|
+
isAuthenticated: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
};
|
|
15
|
+
handleRedirect: (url?: string) => Promise<void>;
|
|
16
|
+
checkSession: () => Promise<void>;
|
|
17
|
+
login: (args?: object) => Promise<void>;
|
|
18
|
+
logout: () => void;
|
|
19
|
+
};
|
|
20
|
+
getSDK: () => PhotonClient;
|
|
21
|
+
clinical: {
|
|
22
|
+
catalog: {
|
|
23
|
+
state: {
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
treatments: Treatment[];
|
|
26
|
+
templates: PrescriptionTemplate[];
|
|
27
|
+
};
|
|
28
|
+
getCatalog: (args: {
|
|
29
|
+
id: string;
|
|
30
|
+
}) => void;
|
|
31
|
+
};
|
|
32
|
+
catalogs: {
|
|
33
|
+
state: {
|
|
34
|
+
isLoading: boolean;
|
|
35
|
+
catalogs: Catalog[];
|
|
36
|
+
};
|
|
37
|
+
getCatalogs: () => void;
|
|
38
|
+
};
|
|
39
|
+
dispenseUnits: {
|
|
40
|
+
state: {
|
|
41
|
+
isLoading: boolean;
|
|
42
|
+
dispenseUnits: Array<DispenseUnit & {
|
|
43
|
+
id: string;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
getDispenseUnits: () => void;
|
|
47
|
+
};
|
|
48
|
+
patients: {
|
|
49
|
+
state: {
|
|
50
|
+
isLoading: boolean;
|
|
51
|
+
patients: Patient[];
|
|
52
|
+
finished: boolean;
|
|
53
|
+
};
|
|
54
|
+
getPatients: (args?: {
|
|
55
|
+
after?: string;
|
|
56
|
+
first?: number;
|
|
57
|
+
name?: string;
|
|
58
|
+
clear?: boolean;
|
|
59
|
+
}) => void;
|
|
60
|
+
};
|
|
61
|
+
patient: {
|
|
62
|
+
state: {
|
|
63
|
+
isLoading: boolean;
|
|
64
|
+
patient?: Patient;
|
|
65
|
+
};
|
|
66
|
+
getPatient: (args: {
|
|
67
|
+
id: string;
|
|
68
|
+
}) => Promise<Patient>;
|
|
69
|
+
};
|
|
70
|
+
prescription: {
|
|
71
|
+
state: {
|
|
72
|
+
isLoading: boolean;
|
|
73
|
+
data?: Prescription;
|
|
74
|
+
errors: GraphQLError[];
|
|
75
|
+
error?: any;
|
|
76
|
+
};
|
|
77
|
+
createPrescription: (args: MutationCreatePrescriptionArgs) => Promise<{
|
|
78
|
+
data: {
|
|
79
|
+
createPrescription: Prescription;
|
|
80
|
+
} | null | undefined;
|
|
81
|
+
errors: readonly GraphQLError[] | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
constructor(sdk: PhotonClient);
|
|
86
|
+
private _getSDK;
|
|
87
|
+
private checkSession;
|
|
88
|
+
private login;
|
|
89
|
+
private logout;
|
|
90
|
+
private getPatients;
|
|
91
|
+
private getPatient;
|
|
92
|
+
private getCatalog;
|
|
93
|
+
private getCatalogs;
|
|
94
|
+
private getDispenseUnits;
|
|
95
|
+
private createPrescription;
|
|
96
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PhotonClient } from '@photonhealth/sdk';
|
|
2
|
+
import { Catalog } from '@photonhealth/sdk/dist/types';
|
|
3
|
+
import { GraphQLError } from 'graphql';
|
|
4
|
+
export declare const CatalogStore: {
|
|
5
|
+
store: {
|
|
6
|
+
catalogs: {
|
|
7
|
+
data: Catalog[];
|
|
8
|
+
errors: readonly GraphQLError[];
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
actions: {
|
|
13
|
+
getCatalogs: (client: PhotonClient) => Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PhotonClient } from '@photonhealth/sdk';
|
|
2
|
+
import { GraphQLError } from 'graphql';
|
|
3
|
+
import { DispenseUnit } from '@photonhealth/sdk/dist/types';
|
|
4
|
+
export type StoreDispenseUnit = {
|
|
5
|
+
id: string;
|
|
6
|
+
} & DispenseUnit;
|
|
7
|
+
export declare const DispenseUnitStore: {
|
|
8
|
+
store: {
|
|
9
|
+
dispenseUnits: {
|
|
10
|
+
data: StoreDispenseUnit[];
|
|
11
|
+
errors: readonly GraphQLError[];
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
actions: {
|
|
16
|
+
getDispenseUnits: (client: PhotonClient) => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Struct } from 'superstruct';
|
|
2
|
+
export declare const createFormStore: (initalValue?: Record<string, any>) => {
|
|
3
|
+
store: Record<string, {
|
|
4
|
+
value: any;
|
|
5
|
+
error?: string | undefined;
|
|
6
|
+
} | undefined>;
|
|
7
|
+
actions: {
|
|
8
|
+
updateFormValue: ({ key, value }: {
|
|
9
|
+
key: string;
|
|
10
|
+
value: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
clearKeys: (keys: string[]) => void;
|
|
13
|
+
registerValidator: ({ key, validator }: {
|
|
14
|
+
key: string;
|
|
15
|
+
validator: Struct<any, any>;
|
|
16
|
+
}) => void;
|
|
17
|
+
unRegisterValidator: (key: string) => void;
|
|
18
|
+
validate: (keys?: string[]) => void;
|
|
19
|
+
hasErrors: (keys: string[]) => boolean;
|
|
20
|
+
reset: () => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PhotonClient } from '@photonhealth/sdk';
|
|
2
|
+
import { Patient } from '@photonhealth/sdk/dist/types';
|
|
3
|
+
import { GraphQLError } from 'graphql';
|
|
4
|
+
export declare const PatientStore: {
|
|
5
|
+
store: {
|
|
6
|
+
patients: {
|
|
7
|
+
data: Patient[];
|
|
8
|
+
errors: readonly GraphQLError[];
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
finished: boolean;
|
|
11
|
+
};
|
|
12
|
+
selectedPatient: {
|
|
13
|
+
data?: Patient;
|
|
14
|
+
errors: readonly GraphQLError[];
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
actions: {
|
|
19
|
+
getPatients: (client: PhotonClient, args?: {
|
|
20
|
+
first?: number;
|
|
21
|
+
name?: string;
|
|
22
|
+
}) => Promise<(() => Promise<(() => Promise<any | undefined>) | undefined>) | undefined>;
|
|
23
|
+
getSelectedPatient: (client: PhotonClient, id: string) => Promise<void>;
|
|
24
|
+
clearSelectedPatient: () => Promise<void>;
|
|
25
|
+
reset: () => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="@types/google.maps" />
|
|
2
|
+
import { PhotonClient } from '@photonhealth/sdk';
|
|
3
|
+
import { Pharmacy } from '@photonhealth/sdk/dist/types';
|
|
4
|
+
import { GraphQLError } from 'graphql';
|
|
5
|
+
export declare const PharmacyStore: {
|
|
6
|
+
store: {
|
|
7
|
+
pharmacies: {
|
|
8
|
+
data: Pharmacy[];
|
|
9
|
+
address?: string;
|
|
10
|
+
errors: readonly (GraphQLError | Error)[];
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
};
|
|
13
|
+
selectedPharmacy: {
|
|
14
|
+
data?: Pharmacy;
|
|
15
|
+
errors: readonly GraphQLError[];
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
};
|
|
18
|
+
preferredPharmacies: {
|
|
19
|
+
data?: Pharmacy[];
|
|
20
|
+
errors: readonly GraphQLError[];
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
actions: {
|
|
25
|
+
getPharmacies: (client: PhotonClient, args: {
|
|
26
|
+
name?: string;
|
|
27
|
+
location: {
|
|
28
|
+
latitude: number;
|
|
29
|
+
longitude: number;
|
|
30
|
+
radius: number;
|
|
31
|
+
};
|
|
32
|
+
first?: number;
|
|
33
|
+
}) => Promise<void>;
|
|
34
|
+
getPharmaciesByAddress: (client: PhotonClient, geocoder: google.maps.Geocoder, address: string, name?: string) => Promise<void>;
|
|
35
|
+
getPharmacy: (client: PhotonClient, id: string) => Promise<void>;
|
|
36
|
+
clearSelectedPharmacy: () => void;
|
|
37
|
+
getPreferredPharmacies: (client: PhotonClient, id: string) => Promise<void>;
|
|
38
|
+
clearPreferredPharmacies: () => void;
|
|
39
|
+
reset: () => Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
};
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const validateProps: (props: Record<string, any>, required: string[]) => string[];
|
|
2
|
+
export declare const hasAuthParams: (searchParams?: string) => boolean;
|
|
3
|
+
export declare const toTitleCase: (str: string) => string;
|
|
4
|
+
export declare const isZip: (zip: string) => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Struct } from 'superstruct';
|
|
2
|
+
export declare const message: <T>(struct: Struct<T, any>, message: string) => Struct<T, any>;
|
|
3
|
+
export declare const between: (min: number, max: number, inclusive?: boolean) => Struct<unknown, null>;
|
|
4
|
+
export declare const afterDate: (date: Date, parser?: (v: string) => Date) => Struct<unknown, null>;
|
|
5
|
+
export declare const numericString: () => Struct<string, null>;
|
|
6
|
+
export declare const email: () => Struct<string, null>;
|
|
7
|
+
export declare const empty: () => Struct<any, null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@photonhealth/elements",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.82",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"start": "vite --port 3000",
|
|
9
9
|
"build": "rimraf dist && vite build",
|
|
10
10
|
"build:watch": "rimraf dist && vite build --watch",
|
|
11
|
-
"
|
|
11
|
+
"prepublishOnly": "npm run build",
|
|
12
12
|
"upload-s3": "npm run upload-s3:package-json && npm run upload-s3:dist && npm run upload-s3:package-json-latest && npm run upload-s3:dist-latest",
|
|
13
13
|
"upload-s3:package-json": "s3-deploy './package.json' --cwd './' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX",
|
|
14
14
|
"upload-s3:dist": "s3-deploy './dist/**' --cwd './dist/' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX/dist",
|