@beda.software/web-item-controls 0.1.12-0 → 0.1.14-1
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/EditableGroup/index.d.ts +1 -0
- package/dist/controls/EditableGroup/index.d.ts.map +1 -1
- package/dist/controls/EditableGroup/index.js +2 -1
- package/dist/controls/GroupTable/GroupTableChart/index.d.ts +2 -0
- package/dist/controls/GroupTable/GroupTableChart/index.d.ts.map +1 -1
- package/dist/controls/GroupTable/GroupTableChart/index.js +2 -1
- 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 +31 -27
- package/dist/controls/index.d.ts +0 -1
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +57 -48
- 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 +8 -8
- package/src/locale/en/messages.po +8 -8
- package/src/locale/es/messages.po +8 -8
- package/src/locale/ru/messages.po +8 -8
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controls/EditableGroup/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQzC,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,kDAoDlD"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controls/EditableGroup/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,kDAoDlD"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { GroupTableChartProps } from './types';
|
|
2
|
+
export { useGroupTableChart } from './hooks';
|
|
3
|
+
export type { GroupTableChartProps, ChartType } from './types';
|
|
2
4
|
export declare function GroupTableChart(props: GroupTableChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/controls/GroupTable/GroupTableChart/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAgH1D"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/controls/GroupTable/GroupTableChart/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/D,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAgH1D"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { GroupTableProps } from './types';
|
|
2
|
+
export type { GroupTableProps, GroupTableRow, GroupTableItem, ChartHighlightArea } from './types';
|
|
3
|
+
export { getValueFromAnswerValue, isFormAnswerItems } 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
|