@beda.software/web-item-controls 0.1.25-group-new-design.7 → 0.1.25
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 +4 -0
- package/dist/components/ModalQuestionnaireGroupItem/hooks.js +7 -10
- package/dist/components/ModalQuestionnaireGroupItem/index.js +6 -4
- package/dist/components/SearchBar/SearchBarColumn/ReferenceColumn/index.js +2 -2
- package/dist/components/SearchBar/SearchBarMobile/styles.js +3 -3
- package/dist/components/Table/index.js +1 -1
- package/dist/controls/DateTimeSlotPicker/index.js +4 -4
- package/dist/controls/Display/index.js +5 -7
- package/dist/controls/Group/group.module.scss.js +6 -10
- package/dist/controls/Group/index.d.ts.map +1 -1
- package/dist/controls/Group/index.js +45 -47
- package/dist/controls/GroupTable/RenderFormItemReadOnly/index.js +6 -7
- package/dist/controls/GroupTable/hooks.js +1 -1
- package/dist/controls/GroupWizard/GroupWizard.stories.utils.d.ts +1 -1
- package/dist/controls/GroupWizard/GroupWizard.stories.utils.d.ts.map +1 -1
- package/dist/controls/GroupWizard/index.d.ts +1 -61
- package/dist/controls/GroupWizard/index.d.ts.map +1 -1
- package/dist/controls/ImageAnnotation/AnnotationImage.d.ts +16 -0
- package/dist/controls/ImageAnnotation/AnnotationImage.d.ts.map +1 -0
- package/dist/controls/ImageAnnotation/AnnotationImage.js +37 -0
- package/dist/controls/ImageAnnotation/index.d.ts +9 -0
- package/dist/controls/ImageAnnotation/index.d.ts.map +1 -0
- package/dist/controls/ImageAnnotation/index.js +121 -0
- package/dist/controls/ImageAnnotation/styles.d.ts +21 -0
- package/dist/controls/ImageAnnotation/styles.d.ts.map +1 -0
- package/dist/controls/ImageAnnotation/styles.js +66 -0
- package/dist/controls/ImageAnnotation/utils.d.ts +3 -0
- package/dist/controls/ImageAnnotation/utils.d.ts.map +1 -0
- package/dist/controls/ImageAnnotation/utils.js +9 -0
- package/dist/controls/MDEditorControl/MarkDownEditor/directives.js +3 -3
- package/dist/controls/MDEditorControl/MarkDownEditor/hooks.js +1 -1
- package/dist/controls/Reference/index.js +2 -2
- package/dist/controls/UploadFileControl/hooks.js +3 -4
- package/dist/controls/UploadFileControl/index.js +1 -1
- package/dist/controls/controls.d.ts.map +1 -1
- package/dist/controls/controls.js +42 -41
- package/dist/controls/index.d.ts +1 -1
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +44 -46
- package/dist/ext/d3-array/src/bisect.js +6 -7
- package/dist/ext/d3-array/src/bisector.js +2 -4
- package/dist/ext/d3-array/src/ticks.js +7 -18
- package/dist/ext/d3-color/src/color.js +3 -6
- package/dist/ext/d3-color/src/define.js +1 -2
- package/dist/ext/d3-format/src/defaultLocale.js +3 -4
- package/dist/ext/d3-format/src/formatDecimal.js +1 -2
- package/dist/ext/d3-format/src/formatPrefixAuto.js +1 -2
- package/dist/ext/d3-format/src/formatRounded.js +1 -2
- package/dist/ext/d3-format/src/formatSpecifier.js +1 -2
- package/dist/ext/d3-format/src/formatTrim.js +13 -15
- package/dist/ext/d3-interpolate/src/array.js +3 -6
- package/dist/ext/d3-interpolate/src/numberArray.js +1 -2
- package/dist/ext/d3-interpolate/src/object.js +1 -2
- package/dist/ext/d3-interpolate/src/string.js +1 -2
- package/dist/ext/d3-scale/src/continuous.js +4 -4
- package/dist/ext/unist-util-is/lib/index.js +2 -4
- package/dist/locale/de/messages.d.ts.map +1 -1
- package/dist/locale/de/messages.js +1 -4
- package/dist/locale/en/messages.d.ts.map +1 -1
- package/dist/locale/en/messages.js +1 -4
- package/dist/locale/es/messages.d.ts.map +1 -1
- package/dist/locale/es/messages.js +1 -4
- package/dist/locale/ru/messages.d.ts.map +1 -1
- package/dist/locale/ru/messages.js +1 -4
- package/dist/readonly-controls/Display/index.js +4 -4
- package/dist/readonly-controls/Group/index.d.ts.map +1 -1
- package/dist/readonly-controls/Group/index.js +25 -27
- package/dist/readonly-controls/ImageAnnotation/index.d.ts +4 -0
- package/dist/readonly-controls/ImageAnnotation/index.d.ts.map +1 -0
- package/dist/readonly-controls/ImageAnnotation/index.js +45 -0
- package/dist/readonly-controls/MarkdownRender/index.js +1 -1
- package/dist/readonly-controls/index.d.ts +1 -1
- package/dist/readonly-controls/index.d.ts.map +1 -1
- package/dist/readonly-controls/index.js +17 -17
- package/dist/readonly-controls/readonly-controls.d.ts.map +1 -1
- package/dist/readonly-controls/readonly-controls.js +33 -42
- package/dist/services/fhir.js +73 -46
- package/dist/services/i18n.js +12 -33
- package/dist/style.css +1 -1
- package/dist/utils/date.js +1 -1
- package/dist/utils/fhirpath.d.ts +1 -0
- package/dist/utils/fhirpath.d.ts.map +1 -1
- package/dist/utils/fhirpath.js +3 -2
- package/package.json +17 -13
- package/src/locale/de/messages.po +23 -32
- package/src/locale/de/messages.ts +1 -1
- package/src/locale/en/messages.po +23 -32
- package/src/locale/en/messages.ts +1 -1
- package/src/locale/es/messages.po +23 -32
- package/src/locale/es/messages.ts +1 -1
- package/src/locale/ru/messages.po +23 -32
- package/src/locale/ru/messages.ts +1 -1
- package/dist/components/Table/table.scss.js +0 -4
- package/dist/containers/App/utils.d.ts +0 -6
- package/dist/containers/App/utils.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/GroupWizardSidebar.stories.utils.d.ts +0 -10
- package/dist/controls/GroupWizard/GroupWizardSidebar/GroupWizardSidebar.stories.utils.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/ParentPreviewFields.d.ts +0 -9
- package/dist/controls/GroupWizard/GroupWizardSidebar/ParentPreviewFields.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/ParentPreviewFields.js +0 -29
- package/dist/controls/GroupWizard/GroupWizardSidebar/SidebarMenu.d.ts +0 -14
- package/dist/controls/GroupWizard/GroupWizardSidebar/SidebarMenu.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/SidebarMenu.js +0 -94
- package/dist/controls/GroupWizard/GroupWizardSidebar/index.d.ts +0 -5
- package/dist/controls/GroupWizard/GroupWizardSidebar/index.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/index.js +0 -152
- package/dist/controls/GroupWizard/GroupWizardSidebar/styles.d.ts +0 -35
- package/dist/controls/GroupWizard/GroupWizardSidebar/styles.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/styles.js +0 -106
- package/dist/controls/GroupWizard/GroupWizardSidebar/types.d.ts +0 -20
- package/dist/controls/GroupWizard/GroupWizardSidebar/types.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/utils.d.ts +0 -12
- package/dist/controls/GroupWizard/GroupWizardSidebar/utils.d.ts.map +0 -1
- package/dist/controls/GroupWizard/GroupWizardSidebar/utils.js +0 -96
- package/dist/readonly-controls/GroupWizardSidebar/index.d.ts +0 -3
- package/dist/readonly-controls/GroupWizardSidebar/index.d.ts.map +0 -1
- package/dist/readonly-controls/GroupWizardSidebar/index.js +0 -104
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsxs as x, jsx as t, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { i18n as p } from "@lingui/core";
|
|
3
|
+
import { DeleteOutlined as v } from "@ant-design/icons";
|
|
4
|
+
import { Button as D } from "antd";
|
|
5
|
+
import w from "lodash";
|
|
6
|
+
import { useState as P } from "react";
|
|
7
|
+
import { getItemKey as S, populateItemKey as K, QuestionItems as M } from "sdc-qrf";
|
|
8
|
+
import { useFieldController as $ } from "../../components/BaseQuestionnaireResponseForm/hooks.js";
|
|
9
|
+
import { Title as j } from "../../components/Typography.js";
|
|
10
|
+
import { useRepeatableGroup as q } from "../Group/RepeatableGroups/RepeatableGroupCard/hooks.js";
|
|
11
|
+
import { AnnotationImage as B } from "./AnnotationImage.js";
|
|
12
|
+
import { S as m } from "./styles.js";
|
|
13
|
+
const E = 2;
|
|
14
|
+
function A(e, i) {
|
|
15
|
+
return w.round(w.clamp(e / i * 100, 0, 100), E);
|
|
16
|
+
}
|
|
17
|
+
function O(e) {
|
|
18
|
+
return [{
|
|
19
|
+
value: {
|
|
20
|
+
decimal: e
|
|
21
|
+
}
|
|
22
|
+
}];
|
|
23
|
+
}
|
|
24
|
+
function N(e) {
|
|
25
|
+
const {
|
|
26
|
+
index: i,
|
|
27
|
+
items: l,
|
|
28
|
+
onChange: o,
|
|
29
|
+
onRemoved: k,
|
|
30
|
+
groupItem: r
|
|
31
|
+
} = e, {
|
|
32
|
+
text: u,
|
|
33
|
+
readOnly: a,
|
|
34
|
+
item: d
|
|
35
|
+
} = r.questionItem, {
|
|
36
|
+
onRemove: C,
|
|
37
|
+
parentPath: c,
|
|
38
|
+
context: h
|
|
39
|
+
} = q({
|
|
40
|
+
index: i,
|
|
41
|
+
items: l,
|
|
42
|
+
onChange: o,
|
|
43
|
+
groupItem: r
|
|
44
|
+
}), f = (d ?? []).slice(2);
|
|
45
|
+
return /* @__PURE__ */ x(b, { children: [
|
|
46
|
+
/* @__PURE__ */ x(m.DetailsHeader, { children: [
|
|
47
|
+
/* @__PURE__ */ t(j, { level: 5, children: `${u || p._(
|
|
48
|
+
/*i18n*/
|
|
49
|
+
{
|
|
50
|
+
id: "V0Qg8j"
|
|
51
|
+
}
|
|
52
|
+
)} ${i + 1}` }),
|
|
53
|
+
a ? null : /* @__PURE__ */ t(D, { icon: /* @__PURE__ */ t(v, {}), onClick: () => {
|
|
54
|
+
C(), k(i);
|
|
55
|
+
}, "aria-label": p._(
|
|
56
|
+
/*i18n*/
|
|
57
|
+
{
|
|
58
|
+
id: "KGJ03u"
|
|
59
|
+
}
|
|
60
|
+
), "data-testid": "remove-annotation-button" })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ t(m.DetailsItems, { children: /* @__PURE__ */ t(M, { questionItems: f, parentPath: c, context: h }) })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
function W(e) {
|
|
66
|
+
const {
|
|
67
|
+
parentPath: i,
|
|
68
|
+
questionItem: l
|
|
69
|
+
} = e, {
|
|
70
|
+
linkId: o,
|
|
71
|
+
item: k,
|
|
72
|
+
readOnly: r,
|
|
73
|
+
backgroundImage: u
|
|
74
|
+
} = l, [a, d] = k ?? [], C = [...i, o], {
|
|
75
|
+
value: c,
|
|
76
|
+
onChange: h
|
|
77
|
+
} = $(C, l), [f, y] = P(0);
|
|
78
|
+
if (!a || !d || a.type !== "decimal" || d.type !== "decimal")
|
|
79
|
+
return console.warn(`ImageAnnotation (${o}): the first two child items must be of type decimal`), null;
|
|
80
|
+
l.repeats || console.warn(`ImageAnnotation (${o}): the group must be repeatable`);
|
|
81
|
+
const n = (c == null ? void 0 : c.items) ?? [], g = n[f] ? f : n.length - 1, R = (I) => {
|
|
82
|
+
if (r)
|
|
83
|
+
return;
|
|
84
|
+
const s = I.currentTarget.getBoundingClientRect();
|
|
85
|
+
if (!s.width || !s.height)
|
|
86
|
+
return;
|
|
87
|
+
const _ = K({
|
|
88
|
+
[a.linkId]: O(A(I.clientX - s.left, s.width)),
|
|
89
|
+
[d.linkId]: O(A(I.clientY - s.top, s.height))
|
|
90
|
+
});
|
|
91
|
+
h({
|
|
92
|
+
...c,
|
|
93
|
+
items: [...n, _]
|
|
94
|
+
}), y(n.length);
|
|
95
|
+
};
|
|
96
|
+
return /* @__PURE__ */ x(m.Container, { "data-testid": o, "data-linkid": o, children: [
|
|
97
|
+
/* @__PURE__ */ x(m.ImagePane, { children: [
|
|
98
|
+
r ? null : /* @__PURE__ */ t(m.Hint, { children: p._(
|
|
99
|
+
/*i18n*/
|
|
100
|
+
{
|
|
101
|
+
id: "2mt1iB"
|
|
102
|
+
}
|
|
103
|
+
) }),
|
|
104
|
+
/* @__PURE__ */ t(B, { imageUrl: u == null ? void 0 : u.url, alt: l.text, items: n, xLinkId: a.linkId, yLinkId: d.linkId, activeIndex: g, onImageClick: r ? void 0 : R, onMarkerClick: y })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ t(m.Details, { children: n[g] ? /* @__PURE__ */ t(N, { index: g, items: n, onChange: h, onRemoved: (I) => y(Math.max(0, I - 1)), groupItem: e }, S(n[g])) : /* @__PURE__ */ t(m.Empty, { children: r ? p._(
|
|
107
|
+
/*i18n*/
|
|
108
|
+
{
|
|
109
|
+
id: "vKC52t"
|
|
110
|
+
}
|
|
111
|
+
) : p._(
|
|
112
|
+
/*i18n*/
|
|
113
|
+
{
|
|
114
|
+
id: "sMXMOk"
|
|
115
|
+
}
|
|
116
|
+
) }) })
|
|
117
|
+
] });
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
W as ImageAnnotation
|
|
121
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const S: {
|
|
2
|
+
Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
3
|
+
ImagePane: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
4
|
+
Hint: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
5
|
+
ImageWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$clickable"> & {
|
|
6
|
+
$clickable: boolean;
|
|
7
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$clickable"> & {
|
|
8
|
+
$clickable: boolean;
|
|
9
|
+
}, never>>> & string;
|
|
10
|
+
Image: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>>> & string;
|
|
11
|
+
Marker: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$active"> & {
|
|
12
|
+
$active: boolean;
|
|
13
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$active"> & {
|
|
14
|
+
$active: boolean;
|
|
15
|
+
}, never>>> & string;
|
|
16
|
+
Details: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
17
|
+
DetailsHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
18
|
+
DetailsItems: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
19
|
+
Empty: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/controls/ImageAnnotation/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;;;;;oBAwB6B,OAAO;;oBAAP,OAAO;;;;iBAcb,OAAO;;iBAAP,OAAO;;;;;;CA0C3C,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import i from "styled-components";
|
|
2
|
+
const o = {
|
|
3
|
+
Container: i.div.withConfig({
|
|
4
|
+
displayName: "ImageAnnotation__Container",
|
|
5
|
+
componentId: "sc-px6yxv-0"
|
|
6
|
+
})(["display:flex;flex-direction:row;width:100%;min-height:320px;border:1px solid ", ";border-radius:8px;overflow:hidden;"], ({
|
|
7
|
+
theme: e
|
|
8
|
+
}) => e.neutral.dividers),
|
|
9
|
+
ImagePane: i.div.withConfig({
|
|
10
|
+
displayName: "ImageAnnotation__ImagePane",
|
|
11
|
+
componentId: "sc-px6yxv-1"
|
|
12
|
+
})(["display:flex;flex-direction:column;align-items:center;gap:16px;flex:1 1 50%;min-width:0;padding:20px 24px;background-color:", ";"], ({
|
|
13
|
+
theme: e
|
|
14
|
+
}) => e.neutralPalette.gray_2),
|
|
15
|
+
Hint: i.div.withConfig({
|
|
16
|
+
displayName: "ImageAnnotation__Hint",
|
|
17
|
+
componentId: "sc-px6yxv-2"
|
|
18
|
+
})(["text-align:center;color:", ";"], ({
|
|
19
|
+
theme: e
|
|
20
|
+
}) => e.neutral.primaryText),
|
|
21
|
+
ImageWrapper: i.div.withConfig({
|
|
22
|
+
displayName: "ImageAnnotation__ImageWrapper",
|
|
23
|
+
componentId: "sc-px6yxv-3"
|
|
24
|
+
})(["position:relative;display:inline-block;max-width:100%;line-height:0;cursor:", ";user-select:none;"], ({
|
|
25
|
+
$clickable: e
|
|
26
|
+
}) => e ? "crosshair" : "default"),
|
|
27
|
+
Image: i.img.withConfig({
|
|
28
|
+
displayName: "ImageAnnotation__Image",
|
|
29
|
+
componentId: "sc-px6yxv-4"
|
|
30
|
+
})(["display:block;max-width:100%;height:auto;-webkit-user-drag:none;"]),
|
|
31
|
+
Marker: i.button.withConfig({
|
|
32
|
+
displayName: "ImageAnnotation__Marker",
|
|
33
|
+
componentId: "sc-px6yxv-5"
|
|
34
|
+
})(["position:absolute;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;transform:translate(-50%,-50%);border-radius:50%;border:1px solid ", ";background-color:", ";color:", ";font-size:16px;font-weight:600;line-height:1;cursor:pointer;box-shadow:", ";"], ({
|
|
35
|
+
theme: e,
|
|
36
|
+
$active: n
|
|
37
|
+
}) => n ? e.error : "transparent", ({
|
|
38
|
+
theme: e
|
|
39
|
+
}) => `${e.error}40`, ({
|
|
40
|
+
theme: e
|
|
41
|
+
}) => e.error, ({
|
|
42
|
+
theme: e,
|
|
43
|
+
$active: n
|
|
44
|
+
}) => n ? `0 0 0 4px ${e.error}33` : "none"),
|
|
45
|
+
Details: i.div.withConfig({
|
|
46
|
+
displayName: "ImageAnnotation__Details",
|
|
47
|
+
componentId: "sc-px6yxv-6"
|
|
48
|
+
})(["display:flex;flex-direction:column;gap:16px;flex:1 1 50%;min-width:0;padding:20px 24px;"]),
|
|
49
|
+
DetailsHeader: i.div.withConfig({
|
|
50
|
+
displayName: "ImageAnnotation__DetailsHeader",
|
|
51
|
+
componentId: "sc-px6yxv-7"
|
|
52
|
+
})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px;"]),
|
|
53
|
+
DetailsItems: i.div.withConfig({
|
|
54
|
+
displayName: "ImageAnnotation__DetailsItems",
|
|
55
|
+
componentId: "sc-px6yxv-8"
|
|
56
|
+
})(["display:flex;flex-direction:column;gap:16px;"]),
|
|
57
|
+
Empty: i.div.withConfig({
|
|
58
|
+
displayName: "ImageAnnotation__Empty",
|
|
59
|
+
componentId: "sc-px6yxv-9"
|
|
60
|
+
})(["color:", ";"], ({
|
|
61
|
+
theme: e
|
|
62
|
+
}) => e.neutral.secondaryText)
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
o as S
|
|
66
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/controls/ImageAnnotation/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,SAAS,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI7F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import c from "lodash";
|
|
2
|
+
function l(o, e) {
|
|
3
|
+
var n, u, a;
|
|
4
|
+
const r = (a = (u = (n = o == null ? void 0 : o[e]) == null ? void 0 : n[0]) == null ? void 0 : u.value) == null ? void 0 : a.decimal;
|
|
5
|
+
return c.isNumber(r) ? r : void 0;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
l as getCoordinate
|
|
9
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { usePublisher as l, insertDirective$ as d, useTranslation as s, Select as c, NestedLexicalEditor as m, useMdastNodeUpdater as u } from "@mdxeditor/editor";
|
|
3
|
-
import {
|
|
3
|
+
import { Popover as p, Select as b } from "antd";
|
|
4
4
|
import { useMemo as g } from "react";
|
|
5
5
|
const i = [{
|
|
6
6
|
name: "note",
|
|
@@ -61,7 +61,7 @@ const i = [{
|
|
|
61
61
|
}), triggerTitle: n("toolbar.admonition", "Insert Admonition"), placeholder: n("toolbar.admonition", "Insert Admonition"), items: r });
|
|
62
62
|
}, h = (e) => {
|
|
63
63
|
const n = u(), r = e.mdastNode.name;
|
|
64
|
-
return /* @__PURE__ */ a(
|
|
64
|
+
return /* @__PURE__ */ a(b, { size: "small", variant: "borderless", value: r, onChange: (t) => n({
|
|
65
65
|
name: t
|
|
66
66
|
}), options: i.map(({
|
|
67
67
|
name: t,
|
|
@@ -75,7 +75,7 @@ const i = [{
|
|
|
75
75
|
}, v = ({
|
|
76
76
|
children: e,
|
|
77
77
|
dropdown: n
|
|
78
|
-
}) => /* @__PURE__ */ a(
|
|
78
|
+
}) => /* @__PURE__ */ a(p, { content: n, trigger: "hover", placement: "topRight", styles: {
|
|
79
79
|
body: {
|
|
80
80
|
padding: 4
|
|
81
81
|
}
|
|
@@ -2,7 +2,7 @@ import { jsxs as V, jsx as v } from "react/jsx-runtime";
|
|
|
2
2
|
import { i18n as L } from "@lingui/core";
|
|
3
3
|
import { EditOutlined as ne } from "@ant-design/icons";
|
|
4
4
|
import { headingsPlugin as oe, listsPlugin as ce, quotePlugin as X, linkPlugin as se, linkDialogPlugin as ie, markdownShortcutPlugin as ae, imagePlugin as le, codeBlockPlugin as ue, codeMirrorPlugin as de, directivesPlugin as pe, thematicBreakPlugin as fe, diffSourcePlugin as ge, tablePlugin as me, DiffSourceToggleWrapper as ve, UndoRedo as Re, BlockTypeSelect as we, BoldItalicUnderlineToggles as he, ListsToggle as Ue, CodeToggle as be, InsertImage as ke, CreateLink as Ie, InsertTable as Me, ConditionalContents as ye, ChangeAdmonitionType as xe, InsertThematicBreak as Pe, toolbarPlugin as Le } from "@mdxeditor/editor";
|
|
5
|
-
import {
|
|
5
|
+
import { notification as Ce, Divider as _ } from "antd";
|
|
6
6
|
import { useRef as x, useContext as Se, useState as W, useMemo as j, useCallback as m, Fragment as z, useEffect as D } from "react";
|
|
7
7
|
import { renderToStaticMarkup as Te } from "react-dom/server";
|
|
8
8
|
import { useTheme as Oe } from "styled-components";
|
|
@@ -10,7 +10,7 @@ import { AsyncSelect as M } from "../../components/Select/index.js";
|
|
|
10
10
|
import { loadResourceOptions as L } from "../../services/questionnaire.js";
|
|
11
11
|
import "fhirpath/fhir-context/r4";
|
|
12
12
|
import { evaluate as R } from "../../utils/fhirpath.js";
|
|
13
|
-
import {
|
|
13
|
+
import { getAnswerCode as T, getAnswerDisplay as U } from "../../utils/questionnaire.js";
|
|
14
14
|
import "../../sharedState/index.js";
|
|
15
15
|
function ie(t) {
|
|
16
16
|
const {
|
|
@@ -101,7 +101,7 @@ function z(t) {
|
|
|
101
101
|
onSelect: m,
|
|
102
102
|
disabled: f
|
|
103
103
|
} = n, e = w(a) ? a.data : [];
|
|
104
|
-
return /* @__PURE__ */ b(E.Item, { ...u, "data-testid": s, "data-linkid": s, children: /* @__PURE__ */ b(M, { onChange: m, value: n.value, loadOptions: r, defaultOptions: e, getOptionLabel: (o) =>
|
|
104
|
+
return /* @__PURE__ */ b(E.Item, { ...u, "data-testid": s, "data-linkid": s, children: /* @__PURE__ */ b(M, { onChange: m, value: n.value, loadOptions: r, defaultOptions: e, getOptionLabel: (o) => U(o.value), getOptionValue: (o) => T(o.value), isMulti: d, placeholder: l, isDisabled: f, isLoading: N(a) }) });
|
|
105
105
|
}
|
|
106
106
|
function ae(t) {
|
|
107
107
|
const {
|
|
@@ -71,10 +71,9 @@ function q({
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
a(h ? [...n ?? [], o] : [o]);
|
|
74
|
-
} else
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
74
|
+
} else r === "error" && d.error({
|
|
75
|
+
message: `${t.file.name} file upload failed.`
|
|
76
|
+
});
|
|
78
77
|
}, [i, s, a, n]), E = m((t) => {
|
|
79
78
|
const r = s.current[t.uid] ?? t.uid;
|
|
80
79
|
a((n ?? []).filter(({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { Trans as u } from "@lingui/react";
|
|
3
3
|
import { InboxOutlined as f } from "@ant-design/icons";
|
|
4
|
-
import {
|
|
4
|
+
import { Upload as s, Form as h } from "antd";
|
|
5
5
|
import { useUploader as g } from "./hooks.js";
|
|
6
6
|
const {
|
|
7
7
|
Dragger: x
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/controls/controls.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAClB,oCAAoC,EACpC,uCAAuC,EACvC,4BAA4B,EAC/B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/controls/controls.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAClB,oCAAoC,EACpC,uCAAuC,EACvC,4BAA4B,EAC/B,MAAM,SAAS,CAAC;AA8CjB,eAAO,MAAM,sBAAsB,EAAE,4BAepC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,kBAA0B,CAAC;AAE5D,eAAO,MAAM,iCAAiC,EAAE,uCAiB/C,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,oCAoB5C,CAAC"}
|
|
@@ -13,7 +13,6 @@ import "@beda.software/fhir-react";
|
|
|
13
13
|
import "@beda.software/remote-data";
|
|
14
14
|
import "classnames";
|
|
15
15
|
import "@beda.software/fhir-questionnaire";
|
|
16
|
-
import "../components/BaseQuestionnaireResponseForm/BaseQuestionnaireResponseForm.module.scss.js";
|
|
17
16
|
import "@ant-design/icons";
|
|
18
17
|
import "../components/BaseQuestionnaireResponseForm/BaseQuestionnaireResponseForm.styles.js";
|
|
19
18
|
import "./Group/context.js";
|
|
@@ -21,11 +20,12 @@ import "../components/DatePicker/index.js";
|
|
|
21
20
|
import "../services/fhir.js";
|
|
22
21
|
import { Display as s } from "./Display/index.js";
|
|
23
22
|
import { EditableGroup as u } from "./EditableGroup/index.js";
|
|
24
|
-
import { Group as l,
|
|
23
|
+
import { Group as l, SubCard as c, MainCard as f, SectionWithDivider as b, Section as g, Grid as Q, Gtable as t, Row as h, Col as C } from "./Group/index.js";
|
|
25
24
|
import "@lingui/react";
|
|
26
25
|
import "sdc-qrf";
|
|
27
26
|
import "./Group/GridGroup/Grid.styles.js";
|
|
28
27
|
import "@lingui/core";
|
|
28
|
+
import "../components/Typography.js";
|
|
29
29
|
import "./Group/GroupCard/styles.js";
|
|
30
30
|
import "./Group/RepeatableGroups/styles.js";
|
|
31
31
|
import "./Group/GTable/GTable.styles.js";
|
|
@@ -37,17 +37,16 @@ import "./GroupTable/utils.js";
|
|
|
37
37
|
import "react-audio-voice-recorder";
|
|
38
38
|
import "../components/AudioRecorder/styles.js";
|
|
39
39
|
import "@beda.software/emr-config";
|
|
40
|
-
import "../readonly-controls/ReadonlyWidgets.module.scss.js";
|
|
41
40
|
import "../readonly-controls/ReadonlyWidgets.styles.js";
|
|
42
41
|
import "yup";
|
|
43
42
|
import "fhirpath";
|
|
44
43
|
import "../utils/yup-locale.js";
|
|
45
|
-
import { GroupWizard as m, GroupWizardWithTooltips as G, GroupWizardVertical as I } from "./GroupWizard/index.js";
|
|
46
|
-
import "./GroupWizard/GroupWizardSidebar/styles.js";
|
|
47
44
|
import "antd/es/layout/layout";
|
|
48
45
|
import "antd/es/layout/Sider";
|
|
49
46
|
import "../components/Wizard/styles.js";
|
|
47
|
+
import { GroupWizardVertical as I, GroupWizard as m, GroupWizardWithTooltips as G } from "./GroupWizard/index.js";
|
|
50
48
|
import "../readonly-controls/GroupWizard/styles.js";
|
|
49
|
+
import "./ImageAnnotation/styles.js";
|
|
51
50
|
import "react-markdown";
|
|
52
51
|
import "rehype-raw";
|
|
53
52
|
import "remark-directive";
|
|
@@ -58,31 +57,32 @@ import "../readonly-controls/MarkdownRender/styles.js";
|
|
|
58
57
|
import { QuestionReference as T } from "./Reference/index.js";
|
|
59
58
|
import "./GroupTable/RenderFormItemReadOnly/styles.js";
|
|
60
59
|
import { GroupTabs as x } from "./GroupTabs/index.js";
|
|
60
|
+
import { ImageAnnotation as W } from "./ImageAnnotation/index.js";
|
|
61
61
|
import { InlineChoice as o } from "./InlineChoice/index.js";
|
|
62
62
|
import { InlineReference as e } from "./InlineReference/index.js";
|
|
63
|
-
import { QuestionInputInsideText as
|
|
64
|
-
import { MDEditorControl as
|
|
63
|
+
import { QuestionInputInsideText as z } from "./InsideText/index.js";
|
|
64
|
+
import { MDEditorControl as R } from "./MDEditorControl/index.js";
|
|
65
65
|
import "@mdxeditor/editor";
|
|
66
66
|
import "@mdxeditor/editor/style.css";
|
|
67
67
|
import "react-dom/server";
|
|
68
68
|
import "./MDEditorControl/MarkDownEditor/context.js";
|
|
69
69
|
import "./MDEditorControl/MarkDownEditor/ImageEdit/styles.js";
|
|
70
70
|
import "./MDEditorControl/MarkDownEditor/styles.js";
|
|
71
|
-
import {
|
|
72
|
-
import { PasswordInput as
|
|
73
|
-
import { QuestionPhone as
|
|
71
|
+
import { QuestionQuantity as S, QuestionInteger as D, QuestionDecimal as k } from "./Number/index.js";
|
|
72
|
+
import { PasswordInput as v } from "./PasswordInput/index.js";
|
|
73
|
+
import { QuestionPhone as y } from "./PhoneInput/index.js";
|
|
74
74
|
import { QuestionDateTime as r } from "./QuestionDateTime/index.js";
|
|
75
|
-
import { QuestionSolidRadio as
|
|
76
|
-
import { QuestionSlider as
|
|
77
|
-
import {
|
|
78
|
-
import { TextWithMacroFill as
|
|
75
|
+
import { QuestionSolidRadio as P } from "./Radio/index.js";
|
|
76
|
+
import { QuestionSlider as B } from "./Slider/index.js";
|
|
77
|
+
import { QuestionEmail as E, QuestionString as M, QuestionText as q } from "./String/index.js";
|
|
78
|
+
import { TextWithMacroFill as A } from "./TextWithMacroFill/index.js";
|
|
79
79
|
import { TimeRangePickerControl as F } from "./TimeRangePickerControl/index.js";
|
|
80
80
|
import { UploadFileControl as U } from "./UploadFileControl/index.js";
|
|
81
|
-
const
|
|
82
|
-
text:
|
|
83
|
-
string:
|
|
84
|
-
decimal:
|
|
85
|
-
integer:
|
|
81
|
+
const fr = {
|
|
82
|
+
text: q,
|
|
83
|
+
string: M,
|
|
84
|
+
decimal: k,
|
|
85
|
+
integer: D,
|
|
86
86
|
date: r,
|
|
87
87
|
dateTime: r,
|
|
88
88
|
time: r,
|
|
@@ -91,35 +91,35 @@ const cr = {
|
|
|
91
91
|
boolean: d,
|
|
92
92
|
display: s,
|
|
93
93
|
reference: T,
|
|
94
|
-
quantity:
|
|
94
|
+
quantity: S,
|
|
95
95
|
attachment: U
|
|
96
|
-
},
|
|
97
|
-
phoneWidget:
|
|
98
|
-
email:
|
|
99
|
-
passwordWidget:
|
|
100
|
-
slider:
|
|
101
|
-
"solid-radio-button":
|
|
96
|
+
}, br = l, gr = {
|
|
97
|
+
phoneWidget: y,
|
|
98
|
+
email: E,
|
|
99
|
+
passwordWidget: v,
|
|
100
|
+
slider: B,
|
|
101
|
+
"solid-radio-button": P,
|
|
102
102
|
"inline-choice": o,
|
|
103
103
|
"inline-reference": e,
|
|
104
|
-
"text-with-macro":
|
|
104
|
+
"text-with-macro": A,
|
|
105
105
|
"radio-button": o,
|
|
106
106
|
"check-box": o,
|
|
107
|
-
"input-inside-text":
|
|
108
|
-
"markdown-editor":
|
|
107
|
+
"input-inside-text": z,
|
|
108
|
+
"markdown-editor": R,
|
|
109
109
|
"audio-recorder-uploader": p,
|
|
110
110
|
barcode: n,
|
|
111
111
|
// reference-radio-button is deprecated, use inline-reference instead
|
|
112
112
|
"reference-radio-button": e
|
|
113
|
-
},
|
|
114
|
-
col:
|
|
115
|
-
row:
|
|
113
|
+
}, Qr = {
|
|
114
|
+
col: C,
|
|
115
|
+
row: h,
|
|
116
116
|
gtable: t,
|
|
117
117
|
table: t,
|
|
118
|
-
grid:
|
|
118
|
+
grid: Q,
|
|
119
119
|
section: g,
|
|
120
|
-
"section-with-divider":
|
|
121
|
-
"main-card":
|
|
122
|
-
"sub-card":
|
|
120
|
+
"section-with-divider": b,
|
|
121
|
+
"main-card": f,
|
|
122
|
+
"sub-card": c,
|
|
123
123
|
"blood-pressure": a,
|
|
124
124
|
"time-range-picker": F,
|
|
125
125
|
wizard: m,
|
|
@@ -128,11 +128,12 @@ const cr = {
|
|
|
128
128
|
"wizard-vertical": I,
|
|
129
129
|
"group-tabs": x,
|
|
130
130
|
"group-table": w,
|
|
131
|
-
"editable-group": u
|
|
131
|
+
"editable-group": u,
|
|
132
|
+
"image-annotation": W
|
|
132
133
|
};
|
|
133
134
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
br as groupItemComponent,
|
|
136
|
+
Qr as itemControlGroupItemComponents,
|
|
137
|
+
gr as itemControlQuestionItemComponents,
|
|
138
|
+
fr as questionItemComponents
|
|
138
139
|
};
|
package/dist/controls/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export * from './GroupTable/GroupTableChart/Tooltip';
|
|
|
20
20
|
export * from './GroupTable/RenderFormItemReadOnly';
|
|
21
21
|
export * from './GroupTabs';
|
|
22
22
|
export * from './GroupWizard';
|
|
23
|
-
export * from './
|
|
23
|
+
export * from './ImageAnnotation';
|
|
24
24
|
export * from './InlineChoice';
|
|
25
25
|
export * from './InlineReference';
|
|
26
26
|
export * from './InsideText';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controls/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controls/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAE3B,cAAc,oDAAoD,CAAC"}
|