@pih/esm-commons-app 2.1.1-pre.28 → 2.1.1-pre.34
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/.turbo/turbo-build.log +20 -19
- package/dist/300.js +1 -1
- package/dist/520.js +2 -0
- package/dist/520.js.map +1 -0
- package/dist/660.js +1 -1
- package/dist/660.js.map +1 -1
- package/dist/692.js +2 -0
- package/dist/692.js.LICENSE.txt +9 -0
- package/dist/692.js.map +1 -0
- package/dist/831.js +1 -1
- package/dist/831.js.map +1 -1
- package/dist/848.js +1 -0
- package/dist/848.js.map +1 -0
- package/dist/873.js +2 -0
- package/dist/873.js.LICENSE.txt +9 -0
- package/dist/873.js.map +1 -0
- package/dist/90.js +1 -1
- package/dist/90.js.map +1 -1
- package/dist/974.js +2 -0
- package/dist/974.js.LICENSE.txt +25 -0
- package/dist/974.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/pih-esm-commons-app.js +1 -1
- package/dist/pih-esm-commons-app.js.buildmanifest.json +118 -41
- package/dist/pih-esm-commons-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/hooks/useEncounters.ts +22 -0
- package/src/index.ts +13 -7
- package/src/routes.json +13 -0
- package/src/service-queues-app/maternal-triage-form.workspace.tsx +103 -0
- package/src/service-queues-app/maternal-triage-queue-actions.extension.tsx +131 -0
- package/src/service-queues-app/maternal-triage-queue-actions.resource.ts +80 -0
- package/src/service-queues-app/maternal-trial-queue-actions.scss +14 -0
- package/src/service-queues-app/types.ts +58 -0
- package/src/ward-app/o2-iframe.component.tsx +2 -2
- package/src/ward-app/o2-visit-summary-workspace.component.tsx +1 -1
- package/translations/en.json +8 -0
- package/dist/411.js +0 -2
- package/dist/411.js.LICENSE.txt +0 -5
- package/dist/411.js.map +0 -1
- package/dist/856.js +0 -2
- package/dist/856.js.map +0 -1
- /package/dist/{856.js.LICENSE.txt → 520.js.LICENSE.txt} +0 -0
package/src/routes.json
CHANGED
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
"name": "o2-pregnancy-infant-dashboard",
|
|
13
13
|
"component": "o2PregnancyInfantDashboard",
|
|
14
14
|
"slot": "ward-patient-workspace-content-slot"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "triage-waiting-queue-actions",
|
|
18
|
+
"component": "triageWaitingQueueActions",
|
|
19
|
+
"slot": "queue-table-triage-waiting-queue-actions-slot"
|
|
15
20
|
}
|
|
16
21
|
],
|
|
17
22
|
"workspaces": [
|
|
@@ -25,6 +30,14 @@
|
|
|
25
30
|
"width": "extra-wide",
|
|
26
31
|
"groups": ["ward-patient"],
|
|
27
32
|
"canMaximize": true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "maternal-triage-form-workspace",
|
|
36
|
+
"component": "maternalTriageFormWorkspace",
|
|
37
|
+
"title": "maternalTriageForm",
|
|
38
|
+
"type": "maternal-triage-form",
|
|
39
|
+
"width": "extra-wide",
|
|
40
|
+
"canMaximize": true
|
|
28
41
|
}
|
|
29
42
|
]
|
|
30
43
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type DefaultWorkspaceProps, type Patient, showSnackbar } from '@openmrs/esm-framework';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import O2IFrame from '../ward-app/o2-iframe.component';
|
|
5
|
+
import { updateQueueEntry, useMutateQueueEntries } from './maternal-triage-queue-actions.resource';
|
|
6
|
+
import { type QueueEntry } from './types';
|
|
7
|
+
import { useEncounters } from '../hooks/useEncounters';
|
|
8
|
+
import { Loading } from '@carbon/react';
|
|
9
|
+
import { InlineNotification } from '@carbon/react';
|
|
10
|
+
|
|
11
|
+
interface MaternalTriageFormWorkspaceProps extends DefaultWorkspaceProps {
|
|
12
|
+
queueEntry: QueueEntry;
|
|
13
|
+
patient: Patient;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const MATERNAL_TRIAGE_FORM_ENCOUNTER_TYPE = '41911448-71a1-43d7-bba8-dc86339850da';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Workspace to display the Maternal Triage HTML Form, rendered in a iframe
|
|
20
|
+
*/
|
|
21
|
+
const MaternalTriageFormWorkspace: React.FC<MaternalTriageFormWorkspaceProps> = ({
|
|
22
|
+
queueEntry,
|
|
23
|
+
patient,
|
|
24
|
+
closeWorkspace,
|
|
25
|
+
}) => {
|
|
26
|
+
const { t } = useTranslation();
|
|
27
|
+
const { mutateQueueEntries } = useMutateQueueEntries();
|
|
28
|
+
const {
|
|
29
|
+
data: filledOutTriageForms,
|
|
30
|
+
isLoading,
|
|
31
|
+
error,
|
|
32
|
+
} = useEncounters({
|
|
33
|
+
patient: patient.uuid,
|
|
34
|
+
visit: queueEntry.visit.uuid,
|
|
35
|
+
encounterType: MATERNAL_TRIAGE_FORM_ENCOUNTER_TYPE,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const onMessage = async (event: MessageEvent) => {
|
|
40
|
+
if (event.data == 'triageFormSubmitted') {
|
|
41
|
+
const endQueueEntry = () => {
|
|
42
|
+
return updateQueueEntry(queueEntry.uuid, {
|
|
43
|
+
endedAt: new Date().toISOString(),
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
await endQueueEntry();
|
|
48
|
+
await mutateQueueEntries();
|
|
49
|
+
closeWorkspace();
|
|
50
|
+
showSnackbar({
|
|
51
|
+
isLowContrast: true,
|
|
52
|
+
kind: 'success',
|
|
53
|
+
title: t('triageFormSubmitted', 'Triage form successfully submitted for {{patient}}.', {
|
|
54
|
+
patient: patient.person.display,
|
|
55
|
+
}),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
window.addEventListener('message', onMessage);
|
|
61
|
+
return () => window.removeEventListener('message', onMessage);
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
const patientUuid = patient.uuid;
|
|
65
|
+
const visitUuid = queueEntry.visit.id;
|
|
66
|
+
|
|
67
|
+
const elementsToHide = [
|
|
68
|
+
'header',
|
|
69
|
+
'#breadcrumbs',
|
|
70
|
+
|
|
71
|
+
// prevent O2 success toast from showing; After submitting form for a patient,
|
|
72
|
+
// the success toast for that patient shows when opening form for another patient
|
|
73
|
+
'.toast-type-success',
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
const customJavaScript = `
|
|
77
|
+
htmlForm.setSuccessFunction(() => window.top.postMessage('triageFormSubmitted'))
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
if (isLoading) {
|
|
81
|
+
return <Loading withOverlay={false} small />;
|
|
82
|
+
} else if (error) {
|
|
83
|
+
return (
|
|
84
|
+
<InlineNotification
|
|
85
|
+
kind="error"
|
|
86
|
+
lowContrast={true}
|
|
87
|
+
hideCloseButton={true}
|
|
88
|
+
title={t('errorLoadingPatientForm', 'Error loading patient form')}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
} else {
|
|
92
|
+
// If patient does not have triage form filled out already, we load a new one,
|
|
93
|
+
// else, we load the last filled out form to edit
|
|
94
|
+
const src =
|
|
95
|
+
filledOutTriageForms.length == 0
|
|
96
|
+
? `${window.openmrsBase}/htmlformentryui/htmlform/enterHtmlFormWithStandardUi.page?patientId=${patientUuid}&visitId=${visitUuid}&definitionUiResource=file:configuration/pih/htmlforms/triage.xml&returnUrl=%2Fopenmrs%2Fcoreapps%2Fclinicianfacing%2Fpatient.page%3FpatientId%3D${patientUuid}%26`
|
|
97
|
+
: `${window.openmrsBase}/htmlformentryui/htmlform/editHtmlFormWithStandardUi.page?patientId=${patientUuid}&encounterId=${filledOutTriageForms[filledOutTriageForms.length - 1].uuid}`;
|
|
98
|
+
|
|
99
|
+
return <O2IFrame key={patientUuid} src={src} elementsToHide={elementsToHide} customJavaScript={customJavaScript} />;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export default MaternalTriageFormWorkspace;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Button, OverflowMenu, OverflowMenuItem } from '@carbon/react';
|
|
2
|
+
import { isDesktop, launchWorkspace, showModal, useConfig, useLayoutType } from '@openmrs/esm-framework';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import styles from './maternal-trial-queue-actions.scss';
|
|
6
|
+
import { type QueueEntry } from './types';
|
|
7
|
+
import { transitionQueueEntry, useMutateQueueEntries } from './maternal-triage-queue-actions.resource';
|
|
8
|
+
|
|
9
|
+
// types taken from esm-service-queues-app
|
|
10
|
+
interface QueueTableCellComponentProps {
|
|
11
|
+
queueEntry: QueueEntry;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ConfigObject {
|
|
15
|
+
concepts: {
|
|
16
|
+
defaultTransitionStatus: string;
|
|
17
|
+
};
|
|
18
|
+
// other fields not shown
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* This extension provides an extra "Triage" action, along with the other standard actions for
|
|
23
|
+
* queue entries in the queues table. The Triage action opens the maternal triage form, and also
|
|
24
|
+
* has the side effect of putting the patient's queue entry into the "in service" status, if they have
|
|
25
|
+
* not yet already
|
|
26
|
+
* @param param0
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
const MaternalTriageQueueActions: React.FC<QueueTableCellComponentProps> = ({ queueEntry }) => {
|
|
30
|
+
const { t } = useTranslation();
|
|
31
|
+
const layout = useLayoutType();
|
|
32
|
+
|
|
33
|
+
const { mutateQueueEntries } = useMutateQueueEntries();
|
|
34
|
+
const { concepts } = useConfig<ConfigObject>({ externalModuleName: '@openmrs/esm-service-queues-app' });
|
|
35
|
+
const inServiceStatus = concepts.defaultTransitionStatus;
|
|
36
|
+
|
|
37
|
+
const { patient } = queueEntry;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div className={styles.actionsCell}>
|
|
41
|
+
<Button
|
|
42
|
+
kind="ghost"
|
|
43
|
+
aria-label={t('triage', 'Triage')}
|
|
44
|
+
onClick={async () => {
|
|
45
|
+
if (queueEntry.status.uuid !== inServiceStatus) {
|
|
46
|
+
const res = await transitionQueueEntry({
|
|
47
|
+
queueEntryToTransition: queueEntry.uuid,
|
|
48
|
+
newStatus: inServiceStatus,
|
|
49
|
+
});
|
|
50
|
+
mutateQueueEntries();
|
|
51
|
+
launchWorkspace('maternal-triage-form-workspace', { queueEntry: res.data, patient });
|
|
52
|
+
} else {
|
|
53
|
+
launchWorkspace('maternal-triage-form-workspace', { queueEntry, patient });
|
|
54
|
+
}
|
|
55
|
+
}}
|
|
56
|
+
size={isDesktop(layout) ? 'sm' : 'lg'}>
|
|
57
|
+
{t('triage', 'Triage')}
|
|
58
|
+
</Button>
|
|
59
|
+
|
|
60
|
+
<OverflowMenu aria-label="Actions menu" size={isDesktop(layout) ? 'sm' : 'lg'} align="left" flipped>
|
|
61
|
+
<OverflowMenuItem
|
|
62
|
+
className={styles.menuItem}
|
|
63
|
+
aria-label={t('transition', 'Transition')}
|
|
64
|
+
hasDivider
|
|
65
|
+
onClick={() => {
|
|
66
|
+
const dispose = showModal('transition-queue-entry-modal', {
|
|
67
|
+
closeModal: () => dispose(),
|
|
68
|
+
queueEntry,
|
|
69
|
+
});
|
|
70
|
+
}}
|
|
71
|
+
itemText={t('transition', 'Transition')}
|
|
72
|
+
/>
|
|
73
|
+
<OverflowMenuItem
|
|
74
|
+
className={styles.menuItem}
|
|
75
|
+
aria-label={t('edit', 'Edit')}
|
|
76
|
+
hasDivider
|
|
77
|
+
onClick={() => {
|
|
78
|
+
const dispose = showModal('edit-queue-entry-modal', {
|
|
79
|
+
closeModal: () => dispose(),
|
|
80
|
+
queueEntry,
|
|
81
|
+
});
|
|
82
|
+
}}
|
|
83
|
+
itemText={t('edit', 'Edit')}
|
|
84
|
+
/>
|
|
85
|
+
<OverflowMenuItem
|
|
86
|
+
className={styles.menuItem}
|
|
87
|
+
aria-label={t('removePatient', 'Remove patient')}
|
|
88
|
+
hasDivider
|
|
89
|
+
onClick={() => {
|
|
90
|
+
const dispose = showModal('end-queue-entry-modal', {
|
|
91
|
+
closeModal: () => dispose(),
|
|
92
|
+
queueEntry,
|
|
93
|
+
});
|
|
94
|
+
}}
|
|
95
|
+
itemText={t('removePatient', 'Remove patient')}
|
|
96
|
+
/>
|
|
97
|
+
{queueEntry.previousQueueEntry == null ? (
|
|
98
|
+
<OverflowMenuItem
|
|
99
|
+
className={styles.menuItem}
|
|
100
|
+
aria-label={t('delete', 'Delete')}
|
|
101
|
+
hasDivider
|
|
102
|
+
isDelete
|
|
103
|
+
onClick={() => {
|
|
104
|
+
const dispose = showModal('void-queue-entry-modal', {
|
|
105
|
+
closeModal: () => dispose(),
|
|
106
|
+
queueEntry,
|
|
107
|
+
});
|
|
108
|
+
}}
|
|
109
|
+
itemText={t('delete', 'Delete')}
|
|
110
|
+
/>
|
|
111
|
+
) : (
|
|
112
|
+
<OverflowMenuItem
|
|
113
|
+
className={styles.menuItem}
|
|
114
|
+
aria-label={t('undoTransition', 'Undo transition')}
|
|
115
|
+
hasDivider
|
|
116
|
+
isDelete
|
|
117
|
+
onClick={() => {
|
|
118
|
+
const dispose = showModal('undo-transition-queue-entry-modal', {
|
|
119
|
+
closeModal: () => dispose(),
|
|
120
|
+
queueEntry,
|
|
121
|
+
});
|
|
122
|
+
}}
|
|
123
|
+
itemText={t('undoTransition', 'Undo transition')}
|
|
124
|
+
/>
|
|
125
|
+
)}
|
|
126
|
+
</OverflowMenu>
|
|
127
|
+
</div>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export default MaternalTriageQueueActions;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type Concept, type FetchResponse, openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
|
2
|
+
import { useSWRConfig } from 'swr';
|
|
3
|
+
import { type QueueEntry } from './types';
|
|
4
|
+
|
|
5
|
+
// Hooks here copied from esm-service-queues-app
|
|
6
|
+
|
|
7
|
+
export function useMutateQueueEntries() {
|
|
8
|
+
const { mutate } = useSWRConfig();
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
mutateQueueEntries: () => {
|
|
12
|
+
return mutate((key) => {
|
|
13
|
+
return (
|
|
14
|
+
typeof key === 'string' &&
|
|
15
|
+
(key.includes(`${restBaseUrl}/queue-entry`) || key.includes(`${restBaseUrl}/visit-queue-entry`))
|
|
16
|
+
);
|
|
17
|
+
}).then(() => {
|
|
18
|
+
window.dispatchEvent(new CustomEvent('queue-entry-updated'));
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface TransitionQueueEntryParams {
|
|
25
|
+
queueEntryToTransition: string;
|
|
26
|
+
transitionDate?: string;
|
|
27
|
+
newQueue?: string;
|
|
28
|
+
newStatus?: string;
|
|
29
|
+
newPriority?: string;
|
|
30
|
+
newPriorityComment?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A transition is defined as an action that ends a current queue entry and immediately starts a new one
|
|
35
|
+
* with (slightly) different values. For now, this could be used to transition the queue entry's status,
|
|
36
|
+
* priority or queue. This allows us to keep a history of queue entries through a patient's visit.
|
|
37
|
+
* Note that there are some use cases (like RDE or data correction) where a transition is NOT appropriate.
|
|
38
|
+
* @param params
|
|
39
|
+
* @param abortController
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
export function transitionQueueEntry(
|
|
43
|
+
params: TransitionQueueEntryParams,
|
|
44
|
+
abortController?: AbortController,
|
|
45
|
+
): Promise<FetchResponse<QueueEntry>> {
|
|
46
|
+
return openmrsFetch(`${restBaseUrl}/queue-entry/transition`, {
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: {
|
|
49
|
+
'Content-Type': 'application/json',
|
|
50
|
+
},
|
|
51
|
+
signal: abortController?.signal,
|
|
52
|
+
body: params,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface UpdateQueueEntryParams {
|
|
57
|
+
status?: Concept;
|
|
58
|
+
priority?: Concept;
|
|
59
|
+
priorityComment?: string;
|
|
60
|
+
sortWeight?: number;
|
|
61
|
+
startedAt?: string;
|
|
62
|
+
endedAt?: string;
|
|
63
|
+
loationWaitingFor?: Location;
|
|
64
|
+
providerWaitingFor?: Location;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function updateQueueEntry(
|
|
68
|
+
queueEntryUuid: string,
|
|
69
|
+
params: UpdateQueueEntryParams,
|
|
70
|
+
abortController?: AbortController,
|
|
71
|
+
) {
|
|
72
|
+
return openmrsFetch(`${restBaseUrl}/queue-entry/${queueEntryUuid}`, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
headers: {
|
|
75
|
+
'Content-Type': 'application/json',
|
|
76
|
+
},
|
|
77
|
+
signal: abortController?.signal,
|
|
78
|
+
body: params,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Concept, type OpenmrsResource, type Patient, type Visit } from '@openmrs/esm-framework';
|
|
2
|
+
|
|
3
|
+
export interface Queue {
|
|
4
|
+
uuid: string;
|
|
5
|
+
display: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
location: Location;
|
|
9
|
+
service: Concept;
|
|
10
|
+
allowedPriorities: Array<Concept>;
|
|
11
|
+
allowedStatuses: Array<Concept>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface QueueEntry {
|
|
15
|
+
uuid: string;
|
|
16
|
+
display: string;
|
|
17
|
+
endedAt: string;
|
|
18
|
+
locationWaitingFor: Location;
|
|
19
|
+
patient: Patient;
|
|
20
|
+
priority: Concept;
|
|
21
|
+
priorityComment: string | null;
|
|
22
|
+
providerWaitingFor: Provider;
|
|
23
|
+
queue: Queue;
|
|
24
|
+
startedAt: string;
|
|
25
|
+
status: Concept;
|
|
26
|
+
visit: Visit;
|
|
27
|
+
sortWeight: number;
|
|
28
|
+
queueComingFrom: Queue;
|
|
29
|
+
previousQueueEntry: QueueEntry;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Provider extends OpenmrsResource {}
|
|
33
|
+
|
|
34
|
+
export interface Encounter {
|
|
35
|
+
uuid: string;
|
|
36
|
+
encounterDateTime: string;
|
|
37
|
+
encounterProviders: Array<{
|
|
38
|
+
uuid: string;
|
|
39
|
+
display: string;
|
|
40
|
+
encounterRole: {
|
|
41
|
+
uuid: string;
|
|
42
|
+
display: string;
|
|
43
|
+
};
|
|
44
|
+
provider: {
|
|
45
|
+
uuid: string;
|
|
46
|
+
person: {
|
|
47
|
+
uuid: string;
|
|
48
|
+
display: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
encounterType: {
|
|
53
|
+
uuid: string;
|
|
54
|
+
display: string;
|
|
55
|
+
};
|
|
56
|
+
obs: Array<OpenmrsResource>;
|
|
57
|
+
orders: Array<OpenmrsResource>;
|
|
58
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ArrowLeft } from '@carbon/react/icons';
|
|
2
2
|
|
|
3
|
-
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import styles from './o2-iframe.scss';
|
|
5
3
|
import { IconButton, InlineLoading } from '@carbon/react';
|
|
4
|
+
import React, { useMemo, useRef, useState } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import styles from './o2-iframe.scss';
|
|
7
7
|
|
|
8
8
|
interface O2IFrame {
|
|
9
9
|
src: string;
|
|
@@ -26,7 +26,7 @@ const O2VisitSummaryWorkspace: React.FC<WardPatientWorkspaceProps> = ({ wardPati
|
|
|
26
26
|
];
|
|
27
27
|
const customJavaScript = `
|
|
28
28
|
jQuery('#formBreadcrumb').show();
|
|
29
|
-
jQuery('.simple-form-ui form section').width(
|
|
29
|
+
jQuery('.simple-form-ui form section').width(425);
|
|
30
30
|
jQuery('#nav-buttons').hide();
|
|
31
31
|
`;
|
|
32
32
|
|
package/translations/en.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"back": "Back",
|
|
3
|
+
"delete": "Delete",
|
|
4
|
+
"edit": "Edit",
|
|
5
|
+
"errorLoadingPatientForm": "Error loading patient form",
|
|
3
6
|
"fullPatientChart": "Full patient chart",
|
|
4
7
|
"patientHasNoActiveVisit": "Patient has no active visit",
|
|
5
8
|
"patientNotEnrolledInInfantOrPregnancyProgram": "Patient not enrolled in either Infant or Pregnancy Program",
|
|
6
9
|
"patientVisitSummary": "Patient visit summary",
|
|
10
|
+
"removePatient": "Remove patient",
|
|
11
|
+
"transition": "Transition",
|
|
12
|
+
"triage": "Triage",
|
|
13
|
+
"triageFormSubmitted": "Triage form successfully submitted for {{patient}}.",
|
|
14
|
+
"undoTransition": "Undo transition",
|
|
7
15
|
"visitSummary": "Visit summary"
|
|
8
16
|
}
|
package/dist/411.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 411.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_pih_esm_commons_app=globalThis.webpackChunk_pih_esm_commons_app||[]).push([[411],{9247:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{A:()=>h});var l=["width","height","viewBox"],s=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(9067),f=n.n(u),p=n(1343),d=n.n(p);const h=d().forwardRef((function(e,t){let{className:n,children:r,tabIndex:a,xmlns:u="http://www.w3.org/2000/svg",preserveAspectRatio:f="xMidYMid meet",...p}=e;const{tabindex:h,...m}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,a=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=i(e,l),f=u.tabindex,p=i(u,s),d=o(o(o({},c),p),{},{width:t,height:n,viewBox:a});return d["aria-label"]||d["aria-labelledby"]||d.title?(d.role="img",null!=f&&(d.focusable="true",d.tabindex=f)):d["aria-hidden"]=!0,d}({...p,tabindex:a}),b=m;return n&&(b.className=n),null!=h&&(b.tabIndex="number"==typeof h?h:Number(a)),t&&(b.ref=t),u&&(b.xmlns=u),f&&(b.preserveAspectRatio=f),d().createElement("svg",b,r)}));h.displayName="Icon",h.propTypes={"aria-hidden":f().oneOfType([f().bool,f().oneOf(["true","false"])]),"aria-label":f().string,"aria-labelledby":f().string,children:f().node,className:f().string,height:f().oneOfType([f().number,f().string]),preserveAspectRatio:f().string,tabIndex:f().oneOfType([f().number,f().string]),viewBox:f().string,width:f().oneOfType([f().number,f().string]),xmlns:f().string}},5848:(e,t,n)=>{"use strict";n.d(t,{nk:()=>s});var r,o,a=n(1343),i=n.n(a),l=n(9247);const s=i().forwardRef((function(e,t){let{children:n,size:a=16,...s}=e;return 16===a||"16"===a||"16px"===a?i().createElement(l.A,{width:a,height:a,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...s},r||(r=i().createElement("path",{d:"M6.7 12.3L2.9 8.5 15 8.5 15 7.5 2.9 7.5 6.7 3.7 6 3 1 8 6 13z"})),n):i().createElement(l.A,{width:a,height:a,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...s},o||(o=i().createElement("path",{d:"M14 26L15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z"})),n)}))},628:(e,t,n)=>{"use strict";n.d(t,{K0:()=>F,OuH:()=>pe});var r={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?r.enableCssCustomProperties=!0:r.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?r.enableUseControlledStateWithValue=!0:r.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?r.enableCssGrid=!0:r.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?r.enableV11Release=!0:r.enableV11Release=!1:r.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?r.enableExperimentalTileContrast=!0:r.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?r.enableV12TileDefaultIcons=!0:r.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?r.enableV12Overflowmenu=!0:r.enableV12Overflowmenu=!1}catch(e){r.enableCssCustomProperties=!1,r.enableUseControlledStateWithValue=!1,r.enableCssGrid=!1,r.enableV11Release=!0,r.enableExperimentalTileContrast=!1,r.enableV12TileDefaultIcons=!1,r.enableV12Overflowmenu=!1}var o=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:r.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:r.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:r.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:r.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:r.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:r.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:r.enableV12Overflowmenu}];function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?o:String(o)),r)}var o}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=i(t.value,2),o=r[0],a=r[1];this.flags.has(o)||this.flags.set(o,a)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=new c(undefined),f=0;f<o.length;f++){var p=o[f];u.add(p.name,p.enabled)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}!function(){u.merge.apply(u,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1});var h=n(9067),m=n.n(h),b=n(1343),v=n.n(b),g=n(9870),y=n.n(g);const E=v().createContext("cds");function w(){return v().useContext(E)}const O=!("undefined"==typeof window||!window.document||!window.document.createElement),C=v().createContext(null),x=function(){let e=0;return function(){return++e}}(),A=O?b.useLayoutEffect:b.useEffect;let N=!1;function _(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=v().useContext(C),[n,r]=(0,b.useState)((()=>N?`${t?`${t}-`:""}${e}-${x()}`:null));if(A((()=>{null===n&&r(`${t?`${t}-`:""}${e}-${x()}`)}),[x]),(0,b.useEffect)((()=>{!1===N&&(N=!0)}),[]),"function"==typeof v().useId){const n=function(e,t){return`${e?`${e}-`:""}${t}-${v().useId()}`}(t,e);return n}return n}const T=v().forwardRef((function(e,t){let{as:n,children:r,className:o,dangerDescription:a="danger",disabled:i=!1,hasIconOnly:l=!1,href:s,iconDescription:c,isExpressive:u=!1,isSelected:f,kind:p="primary",onBlur:h,onClick:m,onFocus:g,onMouseEnter:E,onMouseLeave:O,renderIcon:C,size:x,tabIndex:A,tooltipAlignment:N="center",tooltipPosition:T="top",type:S="button",...L}=e;const R=(0,b.useRef)(null),M=w(),$=e=>{e.target!==R.current||e.preventDefault()},k={tabIndex:A,className:y()(o,{[`${M}--btn`]:!0,[`${M}--btn--sm`]:"sm"===x&&!u,[`${M}--btn--md`]:"md"===x&&!u,[`${M}--btn--xl`]:"xl"===x,[`${M}--btn--2xl`]:"2xl"===x,[`${M}--layout--size-${x}`]:x,[`${M}--btn--${p}`]:p,[`${M}--btn--disabled`]:i,[`${M}--btn--expressive`]:u,[`${M}--btn--icon-only`]:l,[`${M}--btn--selected`]:l&&f&&"ghost"===p}),ref:t},B=C?v().createElement(C,{"aria-label":c,className:`${M}--btn__icon`,"aria-hidden":"true"}):null,I=C?v().createElement(C,null):null,j=["danger","danger--tertiary","danger--ghost"];let P="button";const D=_("danger-description"),{"aria-pressed":z}=L;let V={disabled:i,type:S,"aria-describedby":j.includes(p)?D:void 0,"aria-pressed":z??(l&&"ghost"===p?f:void 0)};const U={href:s};let W=null;if(j.includes(p)&&(W=v().createElement("span",{id:D,className:`${M}--visually-hidden`},a)),n?(P=n,V={...V,...U}):s&&!i&&(P="a",V=U),l){let e;return"top"!==T&&"bottom"!==T||("center"===N&&(e=T),"end"===N&&(e=`${T}-right`),"start"===N&&(e=`${T}-left`)),"right"!==T&&"left"!==T||(e=T),v().createElement(F,d({as:n,align:e,label:c,kind:p,size:x,onMouseEnter:E,onMouseLeave:O,onFocus:g,onBlur:h,onClick:(H=[m,$],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(let t=0;t<H.length&&!e.defaultPrevented;t++){const r=H[t];"function"==typeof r&&r(e,...n)}})},L,k,V),I||r)}return v().createElement(P,{onMouseEnter:E,onMouseLeave:O,onFocus:g,onBlur:h,onClick:m,...L,...k,...V},W,r,B);var H}));T.displayName="Button",T.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,className:m().string,dangerDescription:m().string,disabled:m().bool,hasIconOnly:m().bool,href:m().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:m().bool,isSelected:m().bool,kind:m().oneOf(["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"]),onBlur:m().func,onClick:m().func,onFocus:m().func,onMouseEnter:m().func,onMouseLeave:m().func,renderIcon:m().oneOfType([m().func,m().object]),role:m().string,size:m().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:m().number,tooltipAlignment:m().oneOf(["start","center","end"]),tooltipPosition:m().oneOf(["top","right","bottom","left"]),type:m().oneOf(["button","reset","submit"])};var S="undefined"!=typeof window?b.useLayoutEffect:b.useEffect;const L=e=>(0,b.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e);function R(e,t){const n=(0,b.useRef)(null);(0,b.useEffect)((()=>{n.current=t}),[t]),(0,b.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}const M=v().createContext({floating:{current:null}});function $(e,t){let{isTabTip:n,align:r=(n?"bottom-left":"bottom"),as:o="span",autoAlign:a=!1,caret:i=!n,className:l,children:s,dropShadow:c=!0,highContrast:u=!1,onRequestClose:f,open:p,...h}=e;const m=w(),g=(0,b.useRef)(null),E=(0,b.useRef)(null);R("blur",(()=>{p&&f?.()})),R("click",(e=>{p&&!E?.current?.contains(e.target)&&f?.()}));const O=(0,b.useMemo)((()=>({floating:g})),[]);n&&(["bottom-left","bottom-right"].includes(r)||(r="bottom-left"));const C=L([t,E]),[x,A]=(0,b.useState)(!1),[N,_]=(0,b.useState)(r),T=y()({[`${m}--popover-container`]:!0,[`${m}--popover--caret`]:i,[`${m}--popover--drop-shadow`]:c,[`${m}--popover--high-contrast`]:u,[`${m}--popover--open`]:p,[`${m}--popover--${N}`]:x&&!n,[`${m}--popover--${r}`]:!x,[`${m}--popover--tab-tip`]:n},l);S((()=>{if(!p)return;if(!a||n)return void A(!1);if(!g.current)return;if(!0===x)return;const e=g.current.getBoundingClientRect(),t=e.x<-16,o=e.y<-16,i=e.x+(e.width-16)>document.documentElement.clientWidth,l=e.y+(e.height-16)>document.documentElement.clientHeight;if(!(t||o||i||l))return void A(!1);const s=["top","top-left","right-bottom","right","right-top","bottom-left","bottom","bottom-right","left-top","left","left-bottom","top-right"],c=[r];let u=s[(s.indexOf(r)+1)%s.length];for(;u&&!c.includes(u);)c.push(u),u=s[(s.indexOf(u)+1)%s.length];function f(e){if(!E.current||!g.current)return!1;E.current.classList.add(`${m}--popover--${e}`);const t=g.current.getBoundingClientRect();return t.x<-16||t.y<-16||t.x+(t.width-16)>document.documentElement.clientWidth||t.y+(t.height-16)>document.documentElement.clientHeight?(E.current.classList.remove(`${m}--popover--${e}`),!1):(E.current.classList.remove(`${m}--popover--${e}`),!0)}let d=null;for(let e=0;e<c.length;e++){const t=c[e];if(f(t)){d=t;break}}d&&(A(!0),_(d))}),[x,r,a,m,p,n]);const $=v().Children.map(s,(e=>{const t=e;if("button"===t?.type){const{className:e}=t.props,n=y()(`${m}--popover--tab-tip__button`,e);return v().cloneElement(t,{className:n})}return t})),k=o;return v().createElement(M.Provider,{value:O},v().createElement(k,d({},h,{className:T,ref:C}),n?$:s))}const k=v().forwardRef($);function B(e,t){let{className:n,children:r,...o}=e;const a=w(),{floating:i}=v().useContext(M),l=L([i,t]);return v().createElement("span",d({},o,{className:`${a}--popover`}),v().createElement("span",{className:y()(`${a}--popover-content`,n),ref:l},r),v().createElement("span",{className:`${a}--popover-caret`}))}k.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),as:m().oneOfType([m().string,m().elementType]),autoAlign:m().bool,caret:m().bool,children:m().node,className:m().string,dropShadow:m().bool,highContrast:m().bool,isTabTip:m().bool,onRequestClose:m().func,open:m().bool.isRequired};const I=v().forwardRef(B);function j(e){if(!e||!e.childNodes)return null;if(function(e){if(e.tabIndex<0)return!1;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return"hidden"!==e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}(e))return e;for(const t of e.childNodes){const e=j(t);if(e)return e}return null}function P(e){let{key:t,which:n,keyCode:r,code:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?-1!==t.indexOf(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===o}I.propTypes={children:m().node,className:m().string};const D={key:"Enter",which:13,keyCode:13,code:"Enter"},z={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},V={key:" ",which:32,keyCode:32,code:"Space"};function U(e){let{align:t="top",className:n,children:r,label:o,description:a,enterDelayMs:i=100,leaveDelayMs:l=300,defaultOpen:s=!1,closeOnActivation:c=!1,...u}=e;const f=(0,b.useRef)(null),p=(0,b.useRef)(null),[h,m]=function(e){const[t,n]=(0,b.useState)(e),r=(0,b.useRef)(null),o=(0,b.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout((()=>{n(e),r.current=null}),t):n(e)}),[]);return(0,b.useEffect)((()=>()=>{window.clearTimeout(r.current??void 0)}),[]),[t,o]}(s),g=_("tooltip"),E=w(),O=v().Children.only(r),C={onFocus:()=>m(!0),onBlur:()=>m(!1),onClick:()=>c&&m(!1),onMouseEnter:function(){m(!0,i)}};return o?C["aria-labelledby"]=g:C["aria-describedby"]=g,(0,b.useEffect)((()=>{null!==f&&f.current&&(j(f.current)||m(!1))})),v().createElement(k,d({},u,{align:t,className:y()(`${E}--tooltip`,n),dropShadow:!1,highContrast:!0,onKeyDown:function(e){h&&P(e,z)&&(e.stopPropagation(),m(!1)),h&&c&&(P(e,D)||P(e,V))&&m(!1)},onMouseLeave:function(){m(!1,l)},open:h,ref:f}),v().createElement("div",{className:`${E}--tooltip-trigger__wrapper`},void 0!==O?v().cloneElement(O,{...C,...function(e){const t={};return["onFocus","onBlur","onClick","onMouseEnter"].forEach((n=>{t[n]=t=>{C[n](),e?.[n]&&e?.[n](t)}})),t}(O.props)}):null),v().createElement(I,{"aria-hidden":h?"false":"true",className:`${E}--tooltip-content`,id:g,ref:p,role:"tooltip"},o||a))}U.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,description:m().node,enterDelayMs:m().number,label:m().node,leaveDelayMs:m().number};const F=v().forwardRef((function(e,t){const{align:n,children:r,className:o,closeOnActivation:a=!0,defaultOpen:i=!1,disabled:l,enterDelayMs:s=100,kind:c,label:u,leaveDelayMs:f=100,wrapperClasses:p,size:h,...m}=e,b=w(),g=y()(p,`${b}--icon-tooltip`,{[`${b}--icon-tooltip--disabled`]:l});return v().createElement(U,{align:n,closeOnActivation:a,className:g,defaultOpen:i,enterDelayMs:s,label:u,leaveDelayMs:f},v().createElement(T,d({},m,{disabled:l,kind:c,ref:t,size:h,className:y()(`${b}--btn--icon-only`,o)}),r))}));F.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,disabled:m().bool,enterDelayMs:m().number,kind:m().oneOf(["primary","secondary","ghost","tertiary"]),label:m().node.isRequired,leaveDelayMs:m().number,size:m().oneOf(["sm","md","lg"]),wrapperClasses:m().string};var W,H,G,q,Z,X,Y,J,K=n(9247);const Q=v().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return 16===r||"16"===r||"16px"===r?v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...o},W||(W=v().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),H||(H=v().createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...o},G||(G=v().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),q||(q=v().createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...o},Z||(Z=v().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),X||(X=v().createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),n):v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Y||(Y=v().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),J||(J=v().createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),n)}));var ee,te,ne,re,oe,ae,ie,le;const se=v().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return 16===r||"16"===r||"16px"===r?v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...o},ee||(ee=v().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),te||(te=v().createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...o},ne||(ne=v().createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),re||(re=v().createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...o},oe||(oe=v().createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),ae||(ae=v().createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),n):v().createElement(K.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ie||(ie=v().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),le||(le=v().createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)})),ce={};function ue(e){let{active:t=!0,className:n,withOverlay:r=!0,small:o=!1,description:a="loading",...i}=e;const l=w(),s=y()(n,{[`${l}--loading`]:!0,[`${l}--loading--small`]:o,[`${l}--loading--stop`]:!t}),c=y()({[`${l}--loading-overlay`]:!0,[`${l}--loading-overlay--stop`]:!t}),u=v().createElement("div",d({},i,{"aria-atomic":"true","aria-live":t?"assertive":"off",className:s}),v().createElement("svg",{className:`${l}--loading__svg`,viewBox:"0 0 100 100"},v().createElement("title",null,a),o?v().createElement("circle",{className:`${l}--loading__background`,cx:"50%",cy:"50%",r:"44"}):null,v().createElement("circle",{className:`${l}--loading__stroke`,cx:"50%",cy:"50%",r:"44"})));return r?v().createElement("div",{className:c},u):u}var fe;function pe(e){let{className:t,status:n="active",iconDescription:r,description:o,onSuccess:a,successDelay:i=1500,...l}=e;const s=w(),c=y()(`${s}--inline-loading`,t),u=v().createElement("div",{className:`${s}--inline-loading__text`},o),f=(()=>{let e=r||n;return"error"===n?v().createElement(Q,{className:`${s}--inline-loading--error`},v().createElement("title",null,e)):"finished"===n?(setTimeout((()=>{a&&a()}),i),v().createElement(se,{className:`${s}--inline-loading__checkmark-container`},v().createElement("title",null,e))):"inactive"===n||"active"===n?(r||(e="active"===n?"loading":"not loading"),v().createElement(ue,{small:!0,description:e,withOverlay:!1,active:"active"===n})):void 0})(),p=f&&v().createElement("div",{className:`${s}--inline-loading__animation`},f);return v().createElement("div",d({className:c},l,{"aria-live":"assertive"}),p,o&&u)}ue.propTypes={active:m().bool,className:m().string,description:m().string,id:(fe=m().string,function(e,t,n){if(void 0!==e[t]){ce[n]&&ce[n][t]||(ce[n]={...ce[n],[t]:!0});for(var r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return fe(e,t,n,...o)}}),small:m().bool,withOverlay:m().bool},pe.propTypes={className:m().string,description:m().node,iconDescription:m().string,onSuccess:m().func,status:m().oneOf(["inactive","active","finished","error"]),successDelay:m().number}},5924:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);r&&o[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},977:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var n,r,o=(r=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}}(n,r)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[1],i=o[3];if(!i)return a;if("function"==typeof btoa){var l=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),c="/*# ".concat(s," */"),u=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[a].concat(u).concat([c]).join("\n")}return[a].join("\n")}},9870:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)r.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},6999:(e,t,n)=>{"use strict";var r=n(6848);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},9067:(e,t,n)=>{e.exports=n(6999)()},6848:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2591:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],l=0;l<e.length;l++){var s=e[l],c=r.base?s[0]+r.base:s[0],u=a[c]||0,f="".concat(c," ").concat(u);a[c]=u+1;var p=n(f),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var h=o(d,r);r.byIndex=l,t.splice(l,0,{identifier:f,updater:h,references:1})}i.push(f)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var l=n(a[i]);t[l].references--}for(var s=r(e,o),c=0;c<a.length;c++){var u=n(a[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}a=s}}},8128:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},3051:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},1740:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},3656:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}}]);
|