@beda.software/web-item-controls 0.1.12-0 → 0.1.14-0
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 +0 -12
- package/dist/components/BaseQuestionnaireResponseForm/utils.d.ts.map +1 -1
- package/dist/components/SearchBar/SearchBarMobile/index.js +36 -0
- package/dist/components/SearchBar/SearchBarMobile/styles.js +49 -37
- package/dist/components/SearchBar/hooks.js +70 -0
- package/dist/components/SearchBar/index.js +27 -0
- package/dist/components/SearchBar/styles.js +23 -16
- package/dist/components/SearchBar/utils.js +10 -0
- package/dist/components/SearchBar/validate.js +46 -0
- package/dist/components/Table/TableCards/index.js +60 -0
- package/dist/components/Table/TableCards/styles.js +43 -31
- package/dist/components/Table/index.js +17 -0
- package/dist/components/Table/styles.js +18 -12
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +26 -0
- package/dist/controls/GroupTable/index.d.ts +3 -0
- package/dist/controls/GroupTable/index.d.ts.map +1 -1
- package/dist/controls/GroupTable/index.js +28 -25
- package/dist/controls/index.d.ts +0 -1
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +29 -25
- package/dist/style.css +1 -1
- package/dist/theme/palette.d.ts +2 -2
- package/dist/utils/theme.d.ts +1 -1
- package/package.json +21 -3
- package/src/locale/de/messages.po +6 -6
- package/src/locale/en/messages.po +6 -6
- package/src/locale/es/messages.po +6 -6
- package/src/locale/ru/messages.po +6 -6
package/README.md
CHANGED
|
@@ -87,18 +87,6 @@ Build the package:
|
|
|
87
87
|
yarn build:lib
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Validate generated package shape:
|
|
91
|
-
|
|
92
|
-
```sh
|
|
93
|
-
yarn check:package
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Smoke test a packed tarball in a temporary consumer project:
|
|
97
|
-
|
|
98
|
-
```sh
|
|
99
|
-
yarn smoke:package
|
|
100
|
-
```
|
|
101
|
-
|
|
102
90
|
Run TypeScript checks:
|
|
103
91
|
|
|
104
92
|
```sh
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/BaseQuestionnaireResponseForm/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/BaseQuestionnaireResponseForm/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EACtC,UAAU,EAAE,oBAAoB,EAChC,IAAI,CAAC,EAAE,MAAM,sBAehB;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,gBAAgB,uBAShD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Trans as i } from "@lingui/react";
|
|
3
|
+
import { FilterFilled as f, CloseOutlined as h } from "@ant-design/icons";
|
|
4
|
+
import { Button as n } from "antd";
|
|
5
|
+
import u from "lodash";
|
|
6
|
+
import { useState as C } from "react";
|
|
7
|
+
import { Title as g } from "../../Typography.js";
|
|
8
|
+
import { S as r } from "./styles.js";
|
|
9
|
+
import { SearchBarColumn as F } from "../SearchBarColumn/index.js";
|
|
10
|
+
function D(s) {
|
|
11
|
+
const {
|
|
12
|
+
columnsFilterValues: a,
|
|
13
|
+
onChangeColumnFilter: m,
|
|
14
|
+
onResetFilters: p
|
|
15
|
+
} = s, [d, l] = C(!1), c = u.compact(a.map((t) => t.value)).length;
|
|
16
|
+
return /* @__PURE__ */ o(r.Container, { children: [
|
|
17
|
+
/* @__PURE__ */ o(r.FiltersButton, { children: [
|
|
18
|
+
/* @__PURE__ */ e(n, { type: "default", icon: /* @__PURE__ */ e(f, {}), onClick: () => l(!0) }),
|
|
19
|
+
c ? /* @__PURE__ */ e(r.Badge, { count: c, size: "small" }) : null
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ o(r.Drawer, { placement: "bottom", onClose: () => l(!1), open: d, closable: !1, width: "100%", height: "100%", children: [
|
|
22
|
+
/* @__PURE__ */ o(r.DrawerHeader, { children: [
|
|
23
|
+
/* @__PURE__ */ e(g, { level: 5, children: /* @__PURE__ */ e(i, { id: "cSev+j" }) }),
|
|
24
|
+
/* @__PURE__ */ e(r.CloseIcon, { type: "text", icon: /* @__PURE__ */ e(h, {}), onClick: () => l(!1) })
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ e(r.DrawerContent, { children: a.map((t) => /* @__PURE__ */ e(F, { columnFilterValue: t, onChange: m }, `search-bar-column-${t.column.id}`)) }),
|
|
27
|
+
/* @__PURE__ */ o(r.DrawerFooter, { children: [
|
|
28
|
+
/* @__PURE__ */ e(n, { type: "primary", onClick: () => l(!1), size: "large", children: /* @__PURE__ */ e(i, { id: "zCjei3" }) }),
|
|
29
|
+
/* @__PURE__ */ e(n, { type: "default", onClick: p, size: "large", children: /* @__PURE__ */ e(i, { id: "u8JHrO" }) })
|
|
30
|
+
] })
|
|
31
|
+
] })
|
|
32
|
+
] });
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
D as SearchBarMobile
|
|
36
|
+
};
|
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
import { Badge as o, Button as a, Drawer as i } from "antd";
|
|
2
2
|
import t from "styled-components";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})(["
|
|
30
|
-
|
|
31
|
-
}) => e.neutralPalette.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
|
|
3
|
+
const p = {
|
|
4
|
+
Container: t.div.withConfig({
|
|
5
|
+
displayName: "SearchBarMobile__Container",
|
|
6
|
+
componentId: "sc-nh45q8-0"
|
|
7
|
+
})([""]),
|
|
8
|
+
FiltersButton: t.div.withConfig({
|
|
9
|
+
displayName: "SearchBarMobile__FiltersButton",
|
|
10
|
+
componentId: "sc-nh45q8-1"
|
|
11
|
+
})(["position:relative;"]),
|
|
12
|
+
Badge: t(o).withConfig({
|
|
13
|
+
displayName: "SearchBarMobile__Badge",
|
|
14
|
+
componentId: "sc-nh45q8-2"
|
|
15
|
+
})(["position:absolute;right:-3px;top:-3px;.ant-badge-count{background-color:", ";color:", ";}"], ({
|
|
16
|
+
theme: e
|
|
17
|
+
}) => e.primaryPalette.bcp_2, ({
|
|
18
|
+
theme: e
|
|
19
|
+
}) => e.primary),
|
|
20
|
+
CloseIcon: t(a).withConfig({
|
|
21
|
+
displayName: "SearchBarMobile__CloseIcon",
|
|
22
|
+
componentId: "sc-nh45q8-3"
|
|
23
|
+
})(["height:56px;width:48px !important;color:", " !important;&:hover{background:0 !important;}"], ({
|
|
24
|
+
theme: e
|
|
25
|
+
}) => e.neutralPalette.gray_7),
|
|
26
|
+
Drawer: t(i).withConfig({
|
|
27
|
+
displayName: "SearchBarMobile__Drawer",
|
|
28
|
+
componentId: "sc-nh45q8-4"
|
|
29
|
+
})(["padding-top:56px;padding-bottom:129px;background-color:", ";.ant-drawer-body{padding:0;display:flex;flex-direction:column;justify-content:space-between;}.ant-input-search,.ant-picker,.react-select__control{width:100%;max-width:450px;}"], ({
|
|
30
|
+
theme: e
|
|
31
|
+
}) => e.neutralPalette.gray_1),
|
|
32
|
+
DrawerHeader: t.div.withConfig({
|
|
33
|
+
displayName: "SearchBarMobile__DrawerHeader",
|
|
34
|
+
componentId: "sc-nh45q8-5"
|
|
35
|
+
})(["position:absolute;left:0;right:0;top:0;height:56px;padding-left:16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid ", ";"], ({
|
|
36
|
+
theme: e
|
|
37
|
+
}) => e.neutralPalette.gray_4),
|
|
38
|
+
DrawerContent: t.div.withConfig({
|
|
39
|
+
displayName: "SearchBarMobile__DrawerContent",
|
|
40
|
+
componentId: "sc-nh45q8-6"
|
|
41
|
+
})(["padding:16px;display:flex;flex-direction:column;gap:16px;flex:1;"]),
|
|
42
|
+
DrawerFooter: t.div.withConfig({
|
|
43
|
+
displayName: "SearchBarMobile__DrawerFooter",
|
|
44
|
+
componentId: "sc-nh45q8-7"
|
|
45
|
+
})(["position:absolute;left:0;right:0;bottom:0;padding:16px;display:flex;flex-direction:column;gap:16px;border-top:1px solid ", ";"], ({
|
|
46
|
+
theme: e
|
|
47
|
+
}) => e.neutralPalette.gray_4)
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
p as S
|
|
51
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useMemo as V, useState as F, useCallback as a } from "react";
|
|
2
|
+
import { isStringColumn as S, isDateColumn as p, isSingleDateColumn as m, isReferenceColumn as v, isChoiceColumn as g, isSolidChoiceColumn as h, isSplitStringColumn as D, isStringColumnFilterValue as w, isDateColumnFilterValue as R, isSingleDateColumnFilterValue as y, isReferenceColumnFilterValue as E, isChoiceColumnFilterValue as U, isSolidChoiceColumnFilterValue as b, isSplitStringColumnFilterValue as c } from "./types.js";
|
|
3
|
+
import { validateStringColumnFilterValue as k, validateDateColumnFilterValue as x, validateSingleDateColumnFilterValue as B, validateReferenceColumnFilterValue as M, validateChoiceColumnFilterValue as j, validateSolidChoiceColumnFilterValue as q, validateSplitStringColumnFilterValue as z } from "./validate.js";
|
|
4
|
+
function I(n) {
|
|
5
|
+
const {
|
|
6
|
+
columns: u
|
|
7
|
+
} = n, l = V(() => u.map((e) => {
|
|
8
|
+
if (S(e))
|
|
9
|
+
return {
|
|
10
|
+
column: e,
|
|
11
|
+
value: e.defaultValue ?? void 0
|
|
12
|
+
};
|
|
13
|
+
if (p(e))
|
|
14
|
+
return {
|
|
15
|
+
column: e,
|
|
16
|
+
value: e.defaultValue ?? void 0
|
|
17
|
+
};
|
|
18
|
+
if (m(e))
|
|
19
|
+
return {
|
|
20
|
+
column: e,
|
|
21
|
+
value: e.defaultValue ?? void 0
|
|
22
|
+
};
|
|
23
|
+
if (v(e))
|
|
24
|
+
return {
|
|
25
|
+
column: e,
|
|
26
|
+
value: e.defaultValue ? {
|
|
27
|
+
value: {
|
|
28
|
+
Reference: e.defaultValue
|
|
29
|
+
}
|
|
30
|
+
} : null
|
|
31
|
+
};
|
|
32
|
+
if (g(e))
|
|
33
|
+
return {
|
|
34
|
+
column: e,
|
|
35
|
+
value: e.defaultValue ? [e.defaultValue] : null
|
|
36
|
+
};
|
|
37
|
+
if (h(e))
|
|
38
|
+
return {
|
|
39
|
+
column: e,
|
|
40
|
+
value: e.defaultValue ? [e.defaultValue] : null
|
|
41
|
+
};
|
|
42
|
+
if (D(e))
|
|
43
|
+
return {
|
|
44
|
+
column: e,
|
|
45
|
+
value: e.defaultValue ?? void 0
|
|
46
|
+
};
|
|
47
|
+
throw new Error("Unsupported column type");
|
|
48
|
+
}), [u]), [o, t] = F(l), f = a((e, C) => {
|
|
49
|
+
t((d) => d.map((r) => {
|
|
50
|
+
if (r.column.id !== C)
|
|
51
|
+
return r;
|
|
52
|
+
const i = {
|
|
53
|
+
...r
|
|
54
|
+
};
|
|
55
|
+
if (w(i) && k(e) || R(i) && x(e) || y(i) && B(e) || E(i) && M(e) || U(i) && j(e) || b(i) && q(e) || c(i) && z(e))
|
|
56
|
+
return i.value = e, i;
|
|
57
|
+
throw new Error("Unsupported column type");
|
|
58
|
+
}));
|
|
59
|
+
}, [t]), s = a(() => {
|
|
60
|
+
t(l);
|
|
61
|
+
}, [t, l]);
|
|
62
|
+
return {
|
|
63
|
+
columnsFilterValues: o,
|
|
64
|
+
onChangeColumnFilter: f,
|
|
65
|
+
onResetFilters: s
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
I as useSearchBar
|
|
70
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Trans as u } from "@lingui/react";
|
|
3
|
+
import { Button as f } from "antd";
|
|
4
|
+
import { useMemo as p } from "react";
|
|
5
|
+
import { SearchBarColumn as d } from "./SearchBarColumn/index.js";
|
|
6
|
+
import { SearchBarMobile as B } from "./SearchBarMobile/index.js";
|
|
7
|
+
import { S as o } from "./styles.js";
|
|
8
|
+
import { isSearchBarFilter as S } from "./utils.js";
|
|
9
|
+
function x(n) {
|
|
10
|
+
const {
|
|
11
|
+
columnsFilterValues: i,
|
|
12
|
+
onChangeColumnFilter: a,
|
|
13
|
+
onResetFilters: s,
|
|
14
|
+
showInDrawerOnMobile: l = !0,
|
|
15
|
+
level: c = 1
|
|
16
|
+
} = n, t = p(() => i.filter((e) => S(e)), [JSON.stringify(i)]);
|
|
17
|
+
return /* @__PURE__ */ m(h, { children: [
|
|
18
|
+
/* @__PURE__ */ m(o.SearchBar, { $showInDrawerOnMobile: l, children: [
|
|
19
|
+
/* @__PURE__ */ r(o.LeftColumn, { children: t.map((e) => /* @__PURE__ */ r(d, { columnFilterValue: e, onChange: a }, `search-bar-column-${e.column.id}`)) }),
|
|
20
|
+
t.length > 1 ? /* @__PURE__ */ r(f, { onClick: s, children: /* @__PURE__ */ r(u, { id: "u8JHrO" }) }) : null
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ r(o.MobileFilters, { $showInDrawerOnMobile: l, $level: c, children: /* @__PURE__ */ r(B, { ...n }) })
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
x as SearchBar
|
|
27
|
+
};
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import i, { css as t } from "styled-components";
|
|
2
2
|
import { mobileWidth as a } from "../../theme/utils.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
}) => e && t(["
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
const p = {
|
|
4
|
+
SearchBar: i.div.withConfig({
|
|
5
|
+
displayName: "SearchBar",
|
|
6
|
+
componentId: "sc-t5bis6-0"
|
|
7
|
+
})(["position:relative;display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;.ant-input-search,.ant-picker,.react-select__control{width:270px;}", ""], ({
|
|
8
|
+
$showInDrawerOnMobile: e
|
|
9
|
+
}) => e && t(["@media screen and (max-width:", "){display:none;}"], () => `${a - 1}px`)),
|
|
10
|
+
MobileFilters: i.div.withConfig({
|
|
11
|
+
displayName: "SearchBar__MobileFilters",
|
|
12
|
+
componentId: "sc-t5bis6-1"
|
|
13
|
+
})(["position:absolute;right:24px;top:24px;", " ", ""], ({
|
|
14
|
+
$level: e
|
|
15
|
+
}) => e === 2 && t(["right:0;top:0;"]), ({
|
|
16
|
+
$showInDrawerOnMobile: e
|
|
17
|
+
}) => e && t(["@media screen and (min-width:", "){display:none;}"], () => `${a}px`)),
|
|
18
|
+
LeftColumn: i.div.withConfig({
|
|
19
|
+
displayName: "SearchBar__LeftColumn",
|
|
20
|
+
componentId: "sc-t5bis6-2"
|
|
21
|
+
})(["display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:10px 8px;"])
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
p as S
|
|
25
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import n from "lodash";
|
|
2
|
+
import e from "moment";
|
|
3
|
+
function l(i) {
|
|
4
|
+
if (n.isUndefined(i) || n.isString(i))
|
|
5
|
+
return !0;
|
|
6
|
+
throw new Error("Invalid string column filter value");
|
|
7
|
+
}
|
|
8
|
+
function o(i) {
|
|
9
|
+
if (n.isUndefined(i) || n.isArray(i) && i.length === 2 && e.isMoment(i[0]) && e.isMoment(i[1]))
|
|
10
|
+
return !0;
|
|
11
|
+
throw new Error("Invalid date column filter value");
|
|
12
|
+
}
|
|
13
|
+
function d(i) {
|
|
14
|
+
if (n.isUndefined(i) || e.isMoment(i))
|
|
15
|
+
return !0;
|
|
16
|
+
throw new Error("Invalid single date column filter value");
|
|
17
|
+
}
|
|
18
|
+
function u(i) {
|
|
19
|
+
if (n.isUndefined(i) || n.isNull(i) || n.isObject(i) && "value" in i && "Reference" in i.value)
|
|
20
|
+
return !0;
|
|
21
|
+
throw new Error("Invalid reference column filter value");
|
|
22
|
+
}
|
|
23
|
+
function f(i) {
|
|
24
|
+
if (n.isUndefined(i) || n.isNull(i) || n.isArray(i) && i.length > 0 && n.isObject(i[0]) && "value" in i[0] && "Coding" in i[0].value)
|
|
25
|
+
return !0;
|
|
26
|
+
throw new Error("Invalid choice column filter value");
|
|
27
|
+
}
|
|
28
|
+
function c(i) {
|
|
29
|
+
if (n.isUndefined(i) || n.isNull(i) || n.isArray(i) && i.length > 0 && n.isObject(i[0]) && "code" in i[0] && "display" in i[0])
|
|
30
|
+
return !0;
|
|
31
|
+
throw new Error("Invalid solid choice column filter value");
|
|
32
|
+
}
|
|
33
|
+
function s(i) {
|
|
34
|
+
if (n.isUndefined(i) || n.isString(i))
|
|
35
|
+
return !0;
|
|
36
|
+
throw new Error("Invalid split string column filter value");
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
f as validateChoiceColumnFilterValue,
|
|
40
|
+
o as validateDateColumnFilterValue,
|
|
41
|
+
u as validateReferenceColumnFilterValue,
|
|
42
|
+
d as validateSingleDateColumnFilterValue,
|
|
43
|
+
c as validateSolidChoiceColumnFilterValue,
|
|
44
|
+
s as validateSplitStringColumnFilterValue,
|
|
45
|
+
l as validateStringColumnFilterValue
|
|
46
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as i, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { Empty as y, Checkbox as R, Pagination as _ } from "antd";
|
|
3
|
+
import c from "lodash";
|
|
4
|
+
import { S as r } from "./styles.js";
|
|
5
|
+
function z(l) {
|
|
6
|
+
const {
|
|
7
|
+
pagination: o,
|
|
8
|
+
onChange: x,
|
|
9
|
+
dataSource: h = [],
|
|
10
|
+
columns: k = [],
|
|
11
|
+
rowKey: s,
|
|
12
|
+
rowSelection: n
|
|
13
|
+
} = l, E = (t) => typeof t == "function" ? /* @__PURE__ */ i(r.Title, { children: t({}) }) : /* @__PURE__ */ i(r.Title, { children: t }), I = (t) => typeof s == "function" ? s(t) : s;
|
|
14
|
+
return h.length === 0 ? /* @__PURE__ */ i(y, { image: y.PRESENTED_IMAGE_SIMPLE }) : /* @__PURE__ */ g(r.Container, { children: [
|
|
15
|
+
h.map((t, f) => {
|
|
16
|
+
const a = I(t), d = (n == null ? void 0 : n.selectedRowKeys) ?? [];
|
|
17
|
+
return /* @__PURE__ */ g(r.Card, { children: [
|
|
18
|
+
/* @__PURE__ */ i(r.Columns, { children: k.map((e) => /* @__PURE__ */ g(r.Column, { children: [
|
|
19
|
+
e != null && e.title ? E(e.title) : null,
|
|
20
|
+
/* @__PURE__ */ i(r.Content, {
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
children: e != null && e.render ? e == null ? void 0 : e.render(
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
e.dataIndex ? c.get(t, e.dataIndex) : t,
|
|
25
|
+
t,
|
|
26
|
+
f
|
|
27
|
+
) : (
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
c.get(t, e.dataIndex)
|
|
30
|
+
)
|
|
31
|
+
})
|
|
32
|
+
] }, `${a}-${e.key}`)) }),
|
|
33
|
+
n ? /* @__PURE__ */ i(r.RowSelection, { children: /* @__PURE__ */ i(R, { checked: d.includes(a), onChange: (e) => {
|
|
34
|
+
var C, p;
|
|
35
|
+
if (e.target.checked)
|
|
36
|
+
(C = n.onChange) == null || C.call(n, [...d, a], [], {
|
|
37
|
+
type: "single"
|
|
38
|
+
});
|
|
39
|
+
else {
|
|
40
|
+
const T = d.filter((P) => P !== a);
|
|
41
|
+
(p = n.onChange) == null || p.call(n, T, [], {
|
|
42
|
+
type: "single"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
} }) }) : null
|
|
46
|
+
] }, a);
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ i(r.Pagination, { children: /* @__PURE__ */ i(_, { ...o, size: "small", onChange: (t, f) => {
|
|
49
|
+
const a = {
|
|
50
|
+
...o ?? {},
|
|
51
|
+
current: t,
|
|
52
|
+
pageSize: f
|
|
53
|
+
};
|
|
54
|
+
x(a, {}, {}, {});
|
|
55
|
+
} }) })
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
z as TableCards
|
|
60
|
+
};
|
|
@@ -1,33 +1,45 @@
|
|
|
1
1
|
import n from "styled-components";
|
|
2
2
|
import { Text as a } from "../../Typography.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
}) => e.neutralPalette.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})([""]),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})(["
|
|
3
|
+
const d = {
|
|
4
|
+
Container: n.div.withConfig({
|
|
5
|
+
displayName: "TableCards__Container",
|
|
6
|
+
componentId: "sc-1dntn1w-0"
|
|
7
|
+
})(["display:flex;flex-direction:column;gap:10px 0;color:", ";"], ({
|
|
8
|
+
theme: e
|
|
9
|
+
}) => e.neutral.primaryText),
|
|
10
|
+
Card: n.div.withConfig({
|
|
11
|
+
displayName: "TableCards__Card",
|
|
12
|
+
componentId: "sc-1dntn1w-1"
|
|
13
|
+
})(["display:flex;gap:0 24px;padding:16px;border:1px solid ", ";border-radius:6px;background-color:", ";"], ({
|
|
14
|
+
theme: e
|
|
15
|
+
}) => e.neutralPalette.gray_4, ({
|
|
16
|
+
theme: e
|
|
17
|
+
}) => e.neutralPalette.gray_1),
|
|
18
|
+
Columns: n.div.withConfig({
|
|
19
|
+
displayName: "TableCards__Columns",
|
|
20
|
+
componentId: "sc-1dntn1w-2"
|
|
21
|
+
})(["flex:1;display:flex;flex-direction:column;gap:16px 0;"]),
|
|
22
|
+
RowSelection: n.div.withConfig({
|
|
23
|
+
displayName: "TableCards__RowSelection",
|
|
24
|
+
componentId: "sc-1dntn1w-3"
|
|
25
|
+
})([""]),
|
|
26
|
+
Column: n.div.withConfig({
|
|
27
|
+
displayName: "TableCards__Column",
|
|
28
|
+
componentId: "sc-1dntn1w-4"
|
|
29
|
+
})(["display:flex;flex-direction:column;gap:4px 0;"]),
|
|
30
|
+
Title: n(a).withConfig({
|
|
31
|
+
displayName: "TableCards__Title",
|
|
32
|
+
componentId: "sc-1dntn1w-5"
|
|
33
|
+
})(["font-weight:700;"]),
|
|
34
|
+
Content: n.div.withConfig({
|
|
35
|
+
displayName: "TableCards__Content",
|
|
36
|
+
componentId: "sc-1dntn1w-6"
|
|
37
|
+
})([""]),
|
|
38
|
+
Pagination: n.div.withConfig({
|
|
39
|
+
displayName: "TableCards__Pagination",
|
|
40
|
+
componentId: "sc-1dntn1w-7"
|
|
41
|
+
})(["display:flex;justify-content:flex-end;"])
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
d as S
|
|
45
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Table as l } from "antd";
|
|
3
|
+
import { S as i } from "./styles.js";
|
|
4
|
+
import { TableCards as s } from "./TableCards/index.js";
|
|
5
|
+
import "./table.scss.js";
|
|
6
|
+
function c(e) {
|
|
7
|
+
const {
|
|
8
|
+
showCardsOnMobile: o = !0
|
|
9
|
+
} = e;
|
|
10
|
+
return /* @__PURE__ */ a(d, { children: [
|
|
11
|
+
/* @__PURE__ */ r(i.Table, { $showCardsOnMobile: o, children: /* @__PURE__ */ r(l, { bordered: !0, size: "middle", ...e }) }),
|
|
12
|
+
/* @__PURE__ */ r(i.Cards, { $showCardsOnMobile: o, children: /* @__PURE__ */ r(s, { ...e }) })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
c as Table
|
|
17
|
+
};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import d, { css as e } from "styled-components";
|
|
2
|
-
import { mobileWidth as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
2
|
+
import { mobileWidth as o } from "../../theme/utils.js";
|
|
3
|
+
const m = {
|
|
4
|
+
Table: d.div.withConfig({
|
|
5
|
+
displayName: "Table",
|
|
6
|
+
componentId: "sc-9du5mi-0"
|
|
7
|
+
})(["overflow:auto;", ""], ({
|
|
8
|
+
$showCardsOnMobile: i
|
|
9
|
+
}) => i && e(["@media screen and (max-width:", "){display:none;}"], () => `${o - 1}px`)),
|
|
10
|
+
Cards: d.div.withConfig({
|
|
11
|
+
displayName: "Table__Cards",
|
|
12
|
+
componentId: "sc-9du5mi-1"
|
|
13
|
+
})(["", ""], ({
|
|
14
|
+
$showCardsOnMobile: i
|
|
15
|
+
}) => i && e(["@media screen and (min-width:", "){display:none;}"], () => `${o}px`))
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
m as S
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './DatePicker';
|
|
2
|
+
export * from './Modal';
|
|
3
|
+
export * from './SearchBar';
|
|
4
|
+
export * from './SearchBar/hooks';
|
|
5
|
+
export * from './Select';
|
|
6
|
+
export * from './Spinner';
|
|
7
|
+
export * from './Table';
|
|
8
|
+
export * from './TimePicker';
|
|
9
|
+
export * from './Typography';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DatePicker as o } from "./DatePicker/index.js";
|
|
2
|
+
import { Modal as a } from "./Modal/index.js";
|
|
3
|
+
import { SearchBar as m } from "./SearchBar/index.js";
|
|
4
|
+
import { useSearchBar as x } from "./SearchBar/hooks.js";
|
|
5
|
+
import { AsyncSelect as f, Select as n } from "./Select/index.js";
|
|
6
|
+
import { SpinIndicator as l, Spinner as T } from "./Spinner/index.js";
|
|
7
|
+
import { Table as P } from "./Table/index.js";
|
|
8
|
+
import { RangeTimePicker as d, TimePicker as g } from "./TimePicker/index.js";
|
|
9
|
+
import { Link as B, Paragraph as b, Text as u, Title as y } from "./Typography.js";
|
|
10
|
+
export {
|
|
11
|
+
f as AsyncSelect,
|
|
12
|
+
o as DatePicker,
|
|
13
|
+
B as Link,
|
|
14
|
+
a as Modal,
|
|
15
|
+
b as Paragraph,
|
|
16
|
+
d as RangeTimePicker,
|
|
17
|
+
m as SearchBar,
|
|
18
|
+
n as Select,
|
|
19
|
+
l as SpinIndicator,
|
|
20
|
+
T as Spinner,
|
|
21
|
+
P as Table,
|
|
22
|
+
u as Text,
|
|
23
|
+
g as TimePicker,
|
|
24
|
+
y as Title,
|
|
25
|
+
x as useSearchBar
|
|
26
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { GroupTableProps } from './types';
|
|
2
|
+
export type { GroupTableProps, GroupTableRow, GroupTableItem, ChartHighlightArea } from './types';
|
|
3
|
+
export { getValueFromAnswerValue } from './utils';
|
|
4
|
+
export { useGroupTable } from './hooks';
|
|
2
5
|
export declare function GroupTable(props: GroupTableProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controls/GroupTable/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAEzD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kDAqGhD"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controls/GroupTable/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAEzD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kDAqGhD"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, Fragment as O, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { i18n as r } from "@lingui/core";
|
|
3
|
-
import { ExpandAltOutlined as
|
|
4
|
-
import { Flex as
|
|
5
|
-
import { ModalQuestionnaireGroupItem as
|
|
6
|
-
import { useGroupTable as
|
|
7
|
-
import { GroupTableChart as
|
|
3
|
+
import { ExpandAltOutlined as V, PlusOutlined as j } from "@ant-design/icons";
|
|
4
|
+
import { Flex as z, Typography as s, Space as m, Switch as F, Button as u, Table as L, Alert as g } from "antd";
|
|
5
|
+
import { ModalQuestionnaireGroupItem as M } from "../../components/ModalQuestionnaireGroupItem/index.js";
|
|
6
|
+
import { useGroupTable as P } from "./hooks.js";
|
|
7
|
+
import { GroupTableChart as Y } from "./GroupTableChart/index.js";
|
|
8
8
|
import { S as x } from "./styles.js";
|
|
9
|
+
import { getValueFromAnswerValue as Z } from "./utils.js";
|
|
9
10
|
function J(a) {
|
|
10
11
|
const {
|
|
11
|
-
chartHeight:
|
|
12
|
+
chartHeight: f
|
|
12
13
|
} = a, {
|
|
13
|
-
repeats:
|
|
14
|
-
hidden:
|
|
15
|
-
title:
|
|
14
|
+
repeats: y,
|
|
15
|
+
hidden: b,
|
|
16
|
+
title: i,
|
|
16
17
|
handleAdd: T,
|
|
17
18
|
dataSource: n,
|
|
18
19
|
columns: A,
|
|
19
20
|
expandable: k,
|
|
20
|
-
isModalVisible:
|
|
21
|
-
editIndex:
|
|
22
|
-
handleCancel:
|
|
21
|
+
isModalVisible: w,
|
|
22
|
+
editIndex: I,
|
|
23
|
+
handleCancel: S,
|
|
23
24
|
handleSave: C,
|
|
24
25
|
snapshotDataSource: t,
|
|
25
26
|
renderAsTable: d,
|
|
@@ -32,13 +33,13 @@ function J(a) {
|
|
|
32
33
|
chartLinkIdY: p,
|
|
33
34
|
chartYRange: G,
|
|
34
35
|
chartHighlightAreas: v
|
|
35
|
-
} =
|
|
36
|
-
return
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */ e(s.Title, { level: 4, children:
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
o && /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */ e(
|
|
36
|
+
} = P(a);
|
|
37
|
+
return b ? null : /* @__PURE__ */ l(O, { children: [
|
|
38
|
+
/* @__PURE__ */ l(z, { justify: "space-between", children: [
|
|
39
|
+
/* @__PURE__ */ e(s.Title, { level: 4, children: i }),
|
|
40
|
+
/* @__PURE__ */ l(m, { size: 16, children: [
|
|
41
|
+
o && /* @__PURE__ */ l(m, { size: "small", children: [
|
|
42
|
+
/* @__PURE__ */ e(F, { checked: d, onChange: o }),
|
|
42
43
|
/* @__PURE__ */ e(s.Text, { children: r._(
|
|
43
44
|
/*i18n*/
|
|
44
45
|
{
|
|
@@ -46,7 +47,7 @@ function J(a) {
|
|
|
46
47
|
}
|
|
47
48
|
) })
|
|
48
49
|
] }),
|
|
49
|
-
E && /* @__PURE__ */ e(u, { type: "primary", icon: /* @__PURE__ */ e(
|
|
50
|
+
E && /* @__PURE__ */ e(u, { type: "primary", icon: /* @__PURE__ */ e(V, {}), onClick: h ? _ : R, children: h ? r._(
|
|
50
51
|
/*i18n*/
|
|
51
52
|
{
|
|
52
53
|
id: "qvWGzP"
|
|
@@ -57,7 +58,7 @@ function J(a) {
|
|
|
57
58
|
id: "OlAl5i"
|
|
58
59
|
}
|
|
59
60
|
) }),
|
|
60
|
-
/* @__PURE__ */ e(u, { type: "primary", icon: /* @__PURE__ */ e(
|
|
61
|
+
/* @__PURE__ */ e(u, { type: "primary", icon: /* @__PURE__ */ e(j, {}), onClick: T, children: r._(
|
|
61
62
|
/*i18n*/
|
|
62
63
|
{
|
|
63
64
|
id: "Rd7v4h"
|
|
@@ -65,7 +66,7 @@ function J(a) {
|
|
|
65
66
|
) })
|
|
66
67
|
] })
|
|
67
68
|
] }),
|
|
68
|
-
|
|
69
|
+
y ? d ? /* @__PURE__ */ e(x.TableWrapper, { children: /* @__PURE__ */ e(L, { columns: A, dataSource: t ?? n, rowKey: (H) => H.key, pagination: !1, bordered: !0, expandable: k }) }) : c && p ? /* @__PURE__ */ e(x.ChartItem, { $chartHeight: f, children: /* @__PURE__ */ e(Y, { dataSource: t ?? n, linkIdX: c, linkIdY: p, chartYRange: G, chartHighlightAreas: v, ...a }) }) : /* @__PURE__ */ e(g, { type: "error", message: r._(
|
|
69
70
|
/*i18n*/
|
|
70
71
|
{
|
|
71
72
|
id: "hHcMdO"
|
|
@@ -76,9 +77,11 @@ function J(a) {
|
|
|
76
77
|
id: "VP0gyL"
|
|
77
78
|
}
|
|
78
79
|
) }),
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
+
/* @__PURE__ */ e(M, { open: w, index: I, groupItem: a, title: i, handleCancel: S, handleSave: C })
|
|
80
81
|
] });
|
|
81
82
|
}
|
|
82
83
|
export {
|
|
83
|
-
J as GroupTable
|
|
84
|
+
J as GroupTable,
|
|
85
|
+
Z as getValueFromAnswerValue,
|
|
86
|
+
P as useGroupTable
|
|
84
87
|
};
|
package/dist/controls/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export * from './Group/GTable';
|
|
|
14
14
|
export * from './Group/RepeatableGroups';
|
|
15
15
|
export * from './Group/RepeatableGroups/RepeatableGroupCard';
|
|
16
16
|
export * from './GroupTable';
|
|
17
|
-
export * from './GroupTable/types';
|
|
18
17
|
export * from './GroupTable/GroupTableChart';
|
|
19
18
|
export * from './GroupTable/GroupTableChart/HighlightArea';
|
|
20
19
|
export * from './GroupTable/GroupTableChart/Tooltip';
|
|
@@ -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,
|
|
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,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"}
|
package/dist/controls/index.js
CHANGED
|
@@ -7,11 +7,11 @@ import { ChoiceQuestionSelect as x, ChoiceQuestionValueSet as f, QuestionChoice
|
|
|
7
7
|
import { DateTimeSlotPicker as d, usePractitionerRoleId as G } from "./DateTimeSlotPicker/index.js";
|
|
8
8
|
import { Display as c, TextWithLink as Q } from "./Display/index.js";
|
|
9
9
|
import { EditableGroup as g } from "./EditableGroup/index.js";
|
|
10
|
-
import { Col as
|
|
11
|
-
import { GroupContext as
|
|
12
|
-
import { GridGroup as
|
|
13
|
-
import { GroupCard as
|
|
14
|
-
import { GTable as
|
|
10
|
+
import { Col as h, Grid as I, Group as b, Gtable as S, MainCard as W, Row as P, Section as D, SectionWithDivider as M, SubCard as w } from "./Group/index.js";
|
|
11
|
+
import { GroupContext as F } from "./Group/context.js";
|
|
12
|
+
import { GridGroup as z } from "./Group/GridGroup/index.js";
|
|
13
|
+
import { GroupCard as B, GroupMainCard as V, GroupSubCard as y } from "./Group/GroupCard/index.js";
|
|
14
|
+
import { GTable as H } from "./Group/GTable/index.js";
|
|
15
15
|
import { RepeatableGroups as v } from "./Group/RepeatableGroups/index.js";
|
|
16
16
|
import { RepeatableGroupCard as O } from "./Group/RepeatableGroups/RepeatableGroupCard/index.js";
|
|
17
17
|
import { GroupTable as j } from "./GroupTable/index.js";
|
|
@@ -26,14 +26,14 @@ import { InlineChoice as lo } from "./InlineChoice/index.js";
|
|
|
26
26
|
import { InlineReference as Go } from "./InlineReference/index.js";
|
|
27
27
|
import { QuestionInputInsideText as co } from "./InsideText/index.js";
|
|
28
28
|
import { MDEditorControl as Ro } from "./MDEditorControl/index.js";
|
|
29
|
-
import { MarkDownEditor as
|
|
29
|
+
import { MarkDownEditor as To } from "./MDEditorControl/MarkDownEditor/index.js";
|
|
30
30
|
import { ImageEditModal as Io } from "./MDEditorControl/MarkDownEditor/ImageEdit/index.js";
|
|
31
31
|
import { QuestionDecimal as So, QuestionInteger as Wo, QuestionQuantity as Po } from "./Number/index.js";
|
|
32
32
|
import { PasswordInput as Mo } from "./PasswordInput/index.js";
|
|
33
|
-
import { QuestionPhone as
|
|
34
|
-
import { QuestionDateTime as
|
|
35
|
-
import { QuestionSolidRadio as
|
|
36
|
-
import { QuestionReference as
|
|
33
|
+
import { QuestionPhone as Eo } from "./PhoneInput/index.js";
|
|
34
|
+
import { QuestionDateTime as ko } from "./QuestionDateTime/index.js";
|
|
35
|
+
import { QuestionSolidRadio as Ao } from "./Radio/index.js";
|
|
36
|
+
import { QuestionReference as Vo, useAnswerReference as yo, useFieldReference as Uo } from "./Reference/index.js";
|
|
37
37
|
import { QuestionSlider as qo } from "./Slider/index.js";
|
|
38
38
|
import { QuestionEmail as Lo, QuestionString as Oo, QuestionText as Yo } from "./String/index.js";
|
|
39
39
|
import { TextWithMacroFill as Jo } from "./TextWithMacroFill/index.js";
|
|
@@ -44,24 +44,26 @@ import { useUploader as ee } from "./UploadFileControl/hooks.js";
|
|
|
44
44
|
import { groupItemComponent as te, itemControlGroupItemComponents as pe, itemControlQuestionItemComponents as ie, questionItemComponents as me } from "./controls.js";
|
|
45
45
|
import { getFieldErrorMessage as ae, isGroupWizard as ue } from "../components/BaseQuestionnaireResponseForm/utils.js";
|
|
46
46
|
import { RepeatableGroupRow as fe } from "./Group/RepeatableGroups/RepeatableGroupRow.js";
|
|
47
|
+
import { getValueFromAnswerValue as se } from "./GroupTable/utils.js";
|
|
48
|
+
import { useGroupTable as Ge } from "./GroupTable/hooks.js";
|
|
47
49
|
export {
|
|
48
50
|
r as AudioRecorderUploader,
|
|
49
51
|
p as Barcode,
|
|
50
52
|
m as BloodPressure,
|
|
51
53
|
x as ChoiceQuestionSelect,
|
|
52
54
|
f as ChoiceQuestionValueSet,
|
|
53
|
-
|
|
55
|
+
h as Col,
|
|
54
56
|
d as DateTimeSlotPicker,
|
|
55
57
|
c as Display,
|
|
56
58
|
g as EditableGroup,
|
|
57
|
-
|
|
59
|
+
H as GTable,
|
|
58
60
|
I as Grid,
|
|
59
|
-
|
|
61
|
+
z as GridGroup,
|
|
60
62
|
b as Group,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
B as GroupCard,
|
|
64
|
+
F as GroupContext,
|
|
65
|
+
V as GroupMainCard,
|
|
66
|
+
y as GroupSubCard,
|
|
65
67
|
j as GroupTable,
|
|
66
68
|
K as GroupTableChart,
|
|
67
69
|
po as GroupTabs,
|
|
@@ -76,20 +78,20 @@ export {
|
|
|
76
78
|
Go as InlineReference,
|
|
77
79
|
Ro as MDEditorControl,
|
|
78
80
|
W as MainCard,
|
|
79
|
-
|
|
81
|
+
To as MarkDownEditor,
|
|
80
82
|
Mo as PasswordInput,
|
|
81
83
|
a as QuestionBoolean,
|
|
82
84
|
l as QuestionChoice,
|
|
83
|
-
|
|
85
|
+
ko as QuestionDateTime,
|
|
84
86
|
So as QuestionDecimal,
|
|
85
87
|
Lo as QuestionEmail,
|
|
86
88
|
co as QuestionInputInsideText,
|
|
87
89
|
Wo as QuestionInteger,
|
|
88
|
-
|
|
90
|
+
Eo as QuestionPhone,
|
|
89
91
|
Po as QuestionQuantity,
|
|
90
|
-
|
|
92
|
+
Vo as QuestionReference,
|
|
91
93
|
qo as QuestionSlider,
|
|
92
|
-
|
|
94
|
+
Ao as QuestionSolidRadio,
|
|
93
95
|
Oo as QuestionString,
|
|
94
96
|
Yo as QuestionText,
|
|
95
97
|
ro as RenderFormItemReadOnly,
|
|
@@ -99,7 +101,7 @@ export {
|
|
|
99
101
|
P as Row,
|
|
100
102
|
D as Section,
|
|
101
103
|
M as SectionWithDivider,
|
|
102
|
-
|
|
104
|
+
w as SubCard,
|
|
103
105
|
Q as TextWithLink,
|
|
104
106
|
Jo as TextWithMacroFill,
|
|
105
107
|
No as TimeRangePickerControl,
|
|
@@ -108,13 +110,15 @@ export {
|
|
|
108
110
|
ae as getFieldErrorMessage,
|
|
109
111
|
xo as getGroupStats,
|
|
110
112
|
_ as getHighlightYParams,
|
|
113
|
+
se as getValueFromAnswerValue,
|
|
111
114
|
te as groupItemComponent,
|
|
112
115
|
ue as isGroupWizard,
|
|
113
116
|
pe as itemControlGroupItemComponents,
|
|
114
117
|
ie as itemControlQuestionItemComponents,
|
|
115
118
|
me as questionItemComponents,
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
yo as useAnswerReference,
|
|
120
|
+
Uo as useFieldReference,
|
|
121
|
+
Ge as useGroupTable,
|
|
118
122
|
G as usePractitionerRoleId,
|
|
119
123
|
Zo as useTimeRangePickerControl,
|
|
120
124
|
ee as useUploader
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._row_dy31e_1{display:flex}._inputWrapper_dy31e_5{flex:auto}._splitterWrapper_dy31e_9{display:flex;flex-direction:column;justify-content:flex-end}._splitter_dy31e_9{position:relative;bottom:22px;margin:0 8px;font-weight:400;font-size:20px;line-height:22px}._form_1v4sy_1 .ant-form-item-label{font-weight:700}._form_1v4sy_1 .ant-form-item-row{flex:1;flex-direction:column;justify-content:space-between;gap:12px}._form_1v4sy_1 .ant-form-item-label{text-align:start;white-space:normal}._form_1v4sy_1 .ant-form-item-label label{display:flex;height:auto}._form_1v4sy_1 .ant-form-item-label label:after{display:none}._form_1v4sy_1 .ant-form-item-control{flex-grow:0}._content_1v4sy_25{display:flex;flex-direction:column;gap:24px}._field_1v4sy_31{width:100%;margin-bottom:0;display:flex}._field_1v4sy_31.__hidden_1v4sy_36{display:none}._group_1ndd9_1{display:flex;flex-direction:column;gap:16px;width:100%}._groupTitle_1ndd9_8{font-weight:700;font-size:16px;line-height:24px}._row_1ndd9_14{display:flex;flex-direction:row;justify-content:space-between;gap:16px;width:100%}._col_1ndd9_22{display:flex;flex-direction:column;gap:16px}._inputContainer_gs0vq_1{display:flex;flex-direction:column}._inputHeader_gs0vq_6{display:flex;margin-bottom:12px;align-items:center;justify-content:space-between}._label_gs0vq_13{font-weight:700;font-size:14px;line-height:22px}._column_14bfg_1{display:flex;flex-direction:column}._row_14bfg_6{display:flex;flex-direction:row;justify-content:space-between;align-items:center}._questionText_14bfg_13{font-weight:700;margin:0}._answer_14bfg_18{display:block;min-width:40%;max-width:40%}.ant-dropdown .ant-table-filter-dropdown{border:0;background:none;box-shadow:none;position:relative;overflow:visible}
|
package/dist/theme/palette.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
|
2
2
|
export declare const brandColors: Pick<DefaultTheme, 'primary' | 'secondary'>;
|
|
3
3
|
export declare const colors: {
|
|
4
|
+
warning: string;
|
|
4
5
|
error: string;
|
|
5
|
-
link: string;
|
|
6
6
|
success: string;
|
|
7
|
-
|
|
7
|
+
link: string;
|
|
8
8
|
primary: string;
|
|
9
9
|
secondary: string;
|
|
10
10
|
};
|
package/dist/utils/theme.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beda.software/web-item-controls",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14-0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"start": "storybook dev -p 6006",
|
|
14
14
|
"build:lib": "vite build --config vite.lib.config.ts && node ./scripts/inject-style-imports.mjs",
|
|
15
|
-
"check:package": "node ./scripts/check-package-output.mjs",
|
|
16
|
-
"smoke:package": "node ./scripts/smoke-package-tarball.mjs",
|
|
17
15
|
"test": "vitest --no-threads",
|
|
18
16
|
"test-storybook": "test-storybook",
|
|
19
17
|
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
@@ -151,13 +149,33 @@
|
|
|
151
149
|
"types": "./dist/controls/index.d.ts",
|
|
152
150
|
"import": "./dist/controls/index.js"
|
|
153
151
|
},
|
|
152
|
+
"./controls/*": {
|
|
153
|
+
"types": "./dist/controls/*/index.d.ts",
|
|
154
|
+
"import": "./dist/controls/*/index.js"
|
|
155
|
+
},
|
|
154
156
|
"./readonly-controls": {
|
|
155
157
|
"types": "./dist/readonly-controls/index.d.ts",
|
|
156
158
|
"import": "./dist/readonly-controls/index.js"
|
|
157
159
|
},
|
|
160
|
+
"./readonly-controls/*": {
|
|
161
|
+
"types": "./dist/readonly-controls/*/index.d.ts",
|
|
162
|
+
"import": "./dist/readonly-controls/*/index.js"
|
|
163
|
+
},
|
|
158
164
|
"./contexts": {
|
|
159
165
|
"types": "./dist/contexts/index.d.ts",
|
|
160
166
|
"import": "./dist/contexts/index.js"
|
|
167
|
+
},
|
|
168
|
+
"./contexts/*": {
|
|
169
|
+
"types": "./dist/contexts/*/index.d.ts",
|
|
170
|
+
"import": "./dist/contexts/*/index.js"
|
|
171
|
+
},
|
|
172
|
+
"./components": {
|
|
173
|
+
"types": "./dist/components/index.d.ts",
|
|
174
|
+
"import": "./dist/components/index.js"
|
|
175
|
+
},
|
|
176
|
+
"./components/*": {
|
|
177
|
+
"types": "./dist/components/*/index.d.ts",
|
|
178
|
+
"import": "./dist/components/*/index.js"
|
|
161
179
|
}
|
|
162
180
|
}
|
|
163
181
|
}
|
|
@@ -227,7 +227,7 @@ msgstr ""
|
|
|
227
227
|
#~ msgid "Add break"
|
|
228
228
|
#~ msgstr ""
|
|
229
229
|
|
|
230
|
-
#: src/controls/GroupTable/index.tsx:
|
|
230
|
+
#: src/controls/GroupTable/index.tsx:68
|
|
231
231
|
msgid "Add entry"
|
|
232
232
|
msgstr ""
|
|
233
233
|
|
|
@@ -450,7 +450,7 @@ msgstr ""
|
|
|
450
450
|
#~ msgid "Col (default)"
|
|
451
451
|
#~ msgstr ""
|
|
452
452
|
|
|
453
|
-
#: src/controls/GroupTable/index.tsx:
|
|
453
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
454
454
|
msgid "Collapse all"
|
|
455
455
|
msgstr ""
|
|
456
456
|
|
|
@@ -739,7 +739,7 @@ msgstr ""
|
|
|
739
739
|
#~ msgid "Error while amending the document"
|
|
740
740
|
#~ msgstr ""
|
|
741
741
|
|
|
742
|
-
#: src/controls/GroupTable/index.tsx:
|
|
742
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
743
743
|
msgid "Expand all"
|
|
744
744
|
msgstr ""
|
|
745
745
|
|
|
@@ -960,7 +960,7 @@ msgstr ""
|
|
|
960
960
|
#~ msgid "Last name"
|
|
961
961
|
#~ msgstr ""
|
|
962
962
|
|
|
963
|
-
#: src/controls/GroupTable/index.tsx:
|
|
963
|
+
#: src/controls/GroupTable/index.tsx:98
|
|
964
964
|
msgid "linkIdX or linkIdY not defined"
|
|
965
965
|
msgstr ""
|
|
966
966
|
|
|
@@ -1562,7 +1562,7 @@ msgstr ""
|
|
|
1562
1562
|
#~ msgid "System"
|
|
1563
1563
|
#~ msgstr ""
|
|
1564
1564
|
|
|
1565
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1565
|
+
#: src/controls/GroupTable/index.tsx:56
|
|
1566
1566
|
msgid "Table View"
|
|
1567
1567
|
msgstr ""
|
|
1568
1568
|
|
|
@@ -1624,7 +1624,7 @@ msgstr ""
|
|
|
1624
1624
|
msgid "This itemControl is designed for non-repeatable groups"
|
|
1625
1625
|
msgstr ""
|
|
1626
1626
|
|
|
1627
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1627
|
+
#: src/controls/GroupTable/index.tsx:103
|
|
1628
1628
|
msgid "This itemControl is designed for repeatable groups, but this group is not repeatable"
|
|
1629
1629
|
msgstr ""
|
|
1630
1630
|
|
|
@@ -236,7 +236,7 @@ msgstr ""
|
|
|
236
236
|
#~ msgid "Add break"
|
|
237
237
|
#~ msgstr ""
|
|
238
238
|
|
|
239
|
-
#: src/controls/GroupTable/index.tsx:
|
|
239
|
+
#: src/controls/GroupTable/index.tsx:68
|
|
240
240
|
msgid "Add entry"
|
|
241
241
|
msgstr ""
|
|
242
242
|
|
|
@@ -491,7 +491,7 @@ msgstr ""
|
|
|
491
491
|
#~ msgid "Col (default)"
|
|
492
492
|
#~ msgstr ""
|
|
493
493
|
|
|
494
|
-
#: src/controls/GroupTable/index.tsx:
|
|
494
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
495
495
|
msgid "Collapse all"
|
|
496
496
|
msgstr ""
|
|
497
497
|
|
|
@@ -841,7 +841,7 @@ msgstr ""
|
|
|
841
841
|
#~ msgid "Error while extracting"
|
|
842
842
|
#~ msgstr ""
|
|
843
843
|
|
|
844
|
-
#: src/controls/GroupTable/index.tsx:
|
|
844
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
845
845
|
msgid "Expand all"
|
|
846
846
|
msgstr ""
|
|
847
847
|
|
|
@@ -1103,7 +1103,7 @@ msgstr ""
|
|
|
1103
1103
|
#~ msgid "Last name"
|
|
1104
1104
|
#~ msgstr ""
|
|
1105
1105
|
|
|
1106
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1106
|
+
#: src/controls/GroupTable/index.tsx:98
|
|
1107
1107
|
msgid "linkIdX or linkIdY not defined"
|
|
1108
1108
|
msgstr ""
|
|
1109
1109
|
|
|
@@ -1787,7 +1787,7 @@ msgstr ""
|
|
|
1787
1787
|
#~ msgid "System"
|
|
1788
1788
|
#~ msgstr ""
|
|
1789
1789
|
|
|
1790
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1790
|
+
#: src/controls/GroupTable/index.tsx:56
|
|
1791
1791
|
msgid "Table View"
|
|
1792
1792
|
msgstr ""
|
|
1793
1793
|
|
|
@@ -1849,7 +1849,7 @@ msgstr ""
|
|
|
1849
1849
|
msgid "This itemControl is designed for non-repeatable groups"
|
|
1850
1850
|
msgstr ""
|
|
1851
1851
|
|
|
1852
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1852
|
+
#: src/controls/GroupTable/index.tsx:103
|
|
1853
1853
|
msgid "This itemControl is designed for repeatable groups, but this group is not repeatable"
|
|
1854
1854
|
msgstr ""
|
|
1855
1855
|
|
|
@@ -236,7 +236,7 @@ msgstr "Añadir otra respuesta"
|
|
|
236
236
|
#~ msgid "Add break"
|
|
237
237
|
#~ msgstr "Añadir pausa"
|
|
238
238
|
|
|
239
|
-
#: src/controls/GroupTable/index.tsx:
|
|
239
|
+
#: src/controls/GroupTable/index.tsx:68
|
|
240
240
|
msgid "Add entry"
|
|
241
241
|
msgstr ""
|
|
242
242
|
|
|
@@ -491,7 +491,7 @@ msgstr "Haz click o arrastra el archivo hasta esta área para cargar"
|
|
|
491
491
|
#~ msgid "Col (default)"
|
|
492
492
|
#~ msgstr "Columna (predeterminado)"
|
|
493
493
|
|
|
494
|
-
#: src/controls/GroupTable/index.tsx:
|
|
494
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
495
495
|
msgid "Collapse all"
|
|
496
496
|
msgstr ""
|
|
497
497
|
|
|
@@ -837,7 +837,7 @@ msgstr "Editar"
|
|
|
837
837
|
#~ msgid "Error while extracting"
|
|
838
838
|
#~ msgstr "Error durante la extracción"
|
|
839
839
|
|
|
840
|
-
#: src/controls/GroupTable/index.tsx:
|
|
840
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
841
841
|
msgid "Expand all"
|
|
842
842
|
msgstr ""
|
|
843
843
|
|
|
@@ -1099,7 +1099,7 @@ msgstr "Ítem"
|
|
|
1099
1099
|
#~ msgid "Last name"
|
|
1100
1100
|
#~ msgstr "Apellido"
|
|
1101
1101
|
|
|
1102
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1102
|
+
#: src/controls/GroupTable/index.tsx:98
|
|
1103
1103
|
msgid "linkIdX or linkIdY not defined"
|
|
1104
1104
|
msgstr ""
|
|
1105
1105
|
|
|
@@ -1771,7 +1771,7 @@ msgstr "Iniciar escritura"
|
|
|
1771
1771
|
#~ msgid "System"
|
|
1772
1772
|
#~ msgstr "Sistema"
|
|
1773
1773
|
|
|
1774
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1774
|
+
#: src/controls/GroupTable/index.tsx:56
|
|
1775
1775
|
msgid "Table View"
|
|
1776
1776
|
msgstr ""
|
|
1777
1777
|
|
|
@@ -1833,7 +1833,7 @@ msgstr "Este audio no se puede reproducir en Safari, por favor descarga el audio
|
|
|
1833
1833
|
msgid "This itemControl is designed for non-repeatable groups"
|
|
1834
1834
|
msgstr ""
|
|
1835
1835
|
|
|
1836
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1836
|
+
#: src/controls/GroupTable/index.tsx:103
|
|
1837
1837
|
msgid "This itemControl is designed for repeatable groups, but this group is not repeatable"
|
|
1838
1838
|
msgstr ""
|
|
1839
1839
|
|
|
@@ -236,7 +236,7 @@ msgstr ""
|
|
|
236
236
|
#~ msgid "Add break"
|
|
237
237
|
#~ msgstr ""
|
|
238
238
|
|
|
239
|
-
#: src/controls/GroupTable/index.tsx:
|
|
239
|
+
#: src/controls/GroupTable/index.tsx:68
|
|
240
240
|
msgid "Add entry"
|
|
241
241
|
msgstr ""
|
|
242
242
|
|
|
@@ -491,7 +491,7 @@ msgstr ""
|
|
|
491
491
|
#~ msgid "Col (default)"
|
|
492
492
|
#~ msgstr ""
|
|
493
493
|
|
|
494
|
-
#: src/controls/GroupTable/index.tsx:
|
|
494
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
495
495
|
msgid "Collapse all"
|
|
496
496
|
msgstr ""
|
|
497
497
|
|
|
@@ -841,7 +841,7 @@ msgstr "Редактировать"
|
|
|
841
841
|
#~ msgid "Error while extracting"
|
|
842
842
|
#~ msgstr ""
|
|
843
843
|
|
|
844
|
-
#: src/controls/GroupTable/index.tsx:
|
|
844
|
+
#: src/controls/GroupTable/index.tsx:65
|
|
845
845
|
msgid "Expand all"
|
|
846
846
|
msgstr ""
|
|
847
847
|
|
|
@@ -1103,7 +1103,7 @@ msgstr ""
|
|
|
1103
1103
|
#~ msgid "Last name"
|
|
1104
1104
|
#~ msgstr ""
|
|
1105
1105
|
|
|
1106
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1106
|
+
#: src/controls/GroupTable/index.tsx:98
|
|
1107
1107
|
msgid "linkIdX or linkIdY not defined"
|
|
1108
1108
|
msgstr ""
|
|
1109
1109
|
|
|
@@ -1787,7 +1787,7 @@ msgstr ""
|
|
|
1787
1787
|
#~ msgid "System"
|
|
1788
1788
|
#~ msgstr ""
|
|
1789
1789
|
|
|
1790
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1790
|
+
#: src/controls/GroupTable/index.tsx:56
|
|
1791
1791
|
msgid "Table View"
|
|
1792
1792
|
msgstr ""
|
|
1793
1793
|
|
|
@@ -1849,7 +1849,7 @@ msgstr ""
|
|
|
1849
1849
|
msgid "This itemControl is designed for non-repeatable groups"
|
|
1850
1850
|
msgstr ""
|
|
1851
1851
|
|
|
1852
|
-
#: src/controls/GroupTable/index.tsx:
|
|
1852
|
+
#: src/controls/GroupTable/index.tsx:103
|
|
1853
1853
|
msgid "This itemControl is designed for repeatable groups, but this group is not repeatable"
|
|
1854
1854
|
msgstr ""
|
|
1855
1855
|
|