@hkyhy/marsun-components-core 0.1.67 → 0.1.69
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/dist/components/FlexBox/FlexBox.d.ts +7 -0
- package/dist/components/FlexBox/FlexBox.js +43 -0
- package/dist/components/FlexBox/FlexBox.js.map +1 -0
- package/dist/components/FlexBox/FlexBoxFetch.d.ts +3 -0
- package/dist/components/FlexBox/FlexBoxFetch.js +92 -0
- package/dist/components/FlexBox/FlexBoxFetch.js.map +1 -0
- package/dist/components/FlexBox/FlexBoxView.d.ts +18 -0
- package/dist/components/FlexBox/FlexBoxView.js +42 -0
- package/dist/components/FlexBox/FlexBoxView.js.map +1 -0
- package/dist/components/FlexBox/defaultColumns.d.ts +7 -0
- package/dist/components/FlexBox/defaultColumns.js +26 -0
- package/dist/components/FlexBox/defaultColumns.js.map +1 -0
- package/dist/components/FlexBox/index.d.ts +79 -0
- package/dist/components/FlexBox/useFlexBox.d.ts +5 -0
- package/dist/components/FlexBox/useFlexBox.js +19 -0
- package/dist/components/FlexBox/useFlexBox.js.map +1 -0
- package/dist/components/Form/FormDataSync.d.ts +3 -0
- package/dist/components/Form/FormDataSync.js +29 -15
- package/dist/components/Form/FormDataSync.js.map +1 -1
- package/dist/components/Form/InputRange.d.ts +19 -0
- package/dist/components/Form/InputRange.js +84 -0
- package/dist/components/Form/InputRange.js.map +1 -0
- package/dist/components/Form/InputRange.module.scss.js +9 -0
- package/dist/components/Form/InputRange.module.scss.js.map +1 -0
- package/dist/components/Form/index.d.ts +4 -0
- package/dist/components/Form/inputRangeRules.d.ts +15 -0
- package/dist/components/Form/inputRangeRules.js +23 -0
- package/dist/components/Form/inputRangeRules.js.map +1 -0
- package/dist/components/Form/kneFormInfo.js +7 -7
- package/dist/components/FormInfo/ErrorTip.d.ts +7 -0
- package/dist/components/FormInfo/ErrorTip.js +89 -0
- package/dist/components/FormInfo/ErrorTip.js.map +1 -0
- package/dist/components/FormInfo/Form.d.ts +7 -0
- package/dist/components/FormInfo/Form.js +23 -0
- package/dist/components/FormInfo/Form.js.map +1 -0
- package/dist/components/FormInfo/FormApiButton.d.ts +7 -0
- package/dist/components/FormInfo/FormApiButton.js +28 -0
- package/dist/components/FormInfo/FormApiButton.js.map +1 -0
- package/dist/components/FormInfo/FormDrawer.d.ts +9 -0
- package/dist/components/FormInfo/FormDrawer.js +42 -0
- package/dist/components/FormInfo/FormDrawer.js.map +1 -0
- package/dist/components/FormInfo/FormInfo.d.ts +4 -0
- package/dist/components/FormInfo/FormInfo.js +61 -0
- package/dist/components/FormInfo/FormInfo.js.map +1 -0
- package/dist/components/FormInfo/FormItem.d.ts +4 -0
- package/dist/components/FormInfo/FormItem.js +10 -0
- package/dist/components/FormInfo/FormItem.js.map +1 -0
- package/dist/components/FormInfo/FormModal.d.ts +11 -0
- package/dist/components/FormInfo/FormModal.js +43 -0
- package/dist/components/FormInfo/FormModal.js.map +1 -0
- package/dist/components/FormInfo/FormSteps.d.ts +9 -0
- package/dist/components/FormInfo/FormSteps.js +96 -0
- package/dist/components/FormInfo/FormSteps.js.map +1 -0
- package/dist/components/FormInfo/FormStepsModal.d.ts +14 -0
- package/dist/components/FormInfo/FormStepsModal.js +96 -0
- package/dist/components/FormInfo/FormStepsModal.js.map +1 -0
- package/dist/components/FormInfo/List.d.ts +6 -0
- package/dist/components/FormInfo/List.js +180 -0
- package/dist/components/FormInfo/List.js.map +1 -0
- package/dist/components/FormInfo/MultiField.d.ts +6 -0
- package/dist/components/FormInfo/MultiField.js +76 -0
- package/dist/components/FormInfo/MultiField.js.map +1 -0
- package/dist/components/FormInfo/Steps.d.ts +26 -0
- package/dist/components/FormInfo/Steps.js +178 -0
- package/dist/components/FormInfo/Steps.js.map +1 -0
- package/dist/components/FormInfo/TableList.d.ts +6 -0
- package/dist/components/FormInfo/TableList.js +216 -0
- package/dist/components/FormInfo/TableList.js.map +1 -0
- package/dist/components/FormInfo/buildFormOverlayProps.d.ts +27 -0
- package/dist/components/FormInfo/buildFormOverlayProps.js +55 -0
- package/dist/components/FormInfo/buildFormOverlayProps.js.map +1 -0
- package/dist/components/FormInfo/fields.d.ts +33 -0
- package/dist/components/FormInfo/fields.js +30 -0
- package/dist/components/FormInfo/fields.js.map +1 -0
- package/dist/components/FormInfo/index.d.ts +21 -0
- package/dist/components/FormInfo/locale/zh-CN.d.ts +16 -0
- package/dist/components/FormInfo/locale/zh-CN.js +17 -0
- package/dist/components/FormInfo/locale/zh-CN.js.map +1 -0
- package/dist/components/FormInfo/nestBlock.d.ts +15 -0
- package/dist/components/FormInfo/nestBlock.js +19 -0
- package/dist/components/FormInfo/nestBlock.js.map +1 -0
- package/dist/components/FormInfo/style.module.scss.js +57 -0
- package/dist/components/FormInfo/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/types.d.ts +213 -0
- package/dist/components/FormInfo/withLocale.d.ts +14 -0
- package/dist/components/FormInfo/withLocale.js +25 -0
- package/dist/components/FormInfo/withLocale.js.map +1 -0
- package/dist/components/InfoPage/CentralContent/boxComputed.d.ts +2 -0
- package/dist/components/InfoPage/CentralContent/boxComputed.js +15 -0
- package/dist/components/InfoPage/CentralContent/boxComputed.js.map +1 -0
- package/dist/components/InfoPage/CentralContent/index.d.ts +3 -0
- package/dist/components/InfoPage/CentralContent/index.js +102 -0
- package/dist/components/InfoPage/CentralContent/index.js.map +1 -0
- package/dist/components/InfoPage/CentralContent/style.module.scss.js +15 -0
- package/dist/components/InfoPage/CentralContent/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/Content/index.d.ts +16 -0
- package/dist/components/InfoPage/Content/index.js +72 -0
- package/dist/components/InfoPage/Content/index.js.map +1 -0
- package/dist/components/InfoPage/Content/style.module.scss.js +14 -0
- package/dist/components/InfoPage/Content/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/Descriptions/index.d.ts +9 -0
- package/dist/components/InfoPage/Descriptions/index.js +48 -0
- package/dist/components/InfoPage/Descriptions/index.js.map +1 -0
- package/dist/components/InfoPage/Descriptions/style.module.scss.js +11 -0
- package/dist/components/InfoPage/Descriptions/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/Flow/index.d.ts +9 -0
- package/dist/components/InfoPage/Flow/index.js +165 -0
- package/dist/components/InfoPage/Flow/index.js.map +1 -0
- package/dist/components/InfoPage/Flow/style.module.scss.js +19 -0
- package/dist/components/InfoPage/Flow/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/InfoPage/Collapse.d.ts +10 -0
- package/dist/components/InfoPage/InfoPage/Collapse.js +11 -0
- package/dist/components/InfoPage/InfoPage/Collapse.js.map +1 -0
- package/dist/components/InfoPage/InfoPage/index.d.ts +21 -0
- package/dist/components/InfoPage/InfoPage/index.js +35 -0
- package/dist/components/InfoPage/InfoPage/index.js.map +1 -0
- package/dist/components/InfoPage/InfoPage/style.module.scss.js +15 -0
- package/dist/components/InfoPage/InfoPage/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/Report/List.d.ts +6 -0
- package/dist/components/InfoPage/Report/List.js +26 -0
- package/dist/components/InfoPage/Report/List.js.map +1 -0
- package/dist/components/InfoPage/Report/Part.d.ts +6 -0
- package/dist/components/InfoPage/Report/Part.js +42 -0
- package/dist/components/InfoPage/Report/Part.js.map +1 -0
- package/dist/components/InfoPage/Report/PrintPageBreak.d.ts +3 -0
- package/dist/components/InfoPage/Report/PrintPageBreak.js +8 -0
- package/dist/components/InfoPage/Report/PrintPageBreak.js.map +1 -0
- package/dist/components/InfoPage/Report/Result.d.ts +6 -0
- package/dist/components/InfoPage/Report/Result.js +26 -0
- package/dist/components/InfoPage/Report/Result.js.map +1 -0
- package/dist/components/InfoPage/Report/Table.d.ts +6 -0
- package/dist/components/InfoPage/Report/Table.js +125 -0
- package/dist/components/InfoPage/Report/Table.js.map +1 -0
- package/dist/components/InfoPage/Report/index.d.ts +26 -0
- package/dist/components/InfoPage/Report/index.js +61 -0
- package/dist/components/InfoPage/Report/index.js.map +1 -0
- package/dist/components/InfoPage/Report/style.module.scss.js +47 -0
- package/dist/components/InfoPage/Report/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/Score/index.d.ts +8 -0
- package/dist/components/InfoPage/Score/index.js +50 -0
- package/dist/components/InfoPage/Score/index.js.map +1 -0
- package/dist/components/InfoPage/Score/style.module.scss.js +10 -0
- package/dist/components/InfoPage/Score/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/SplitLine/index.d.ts +17 -0
- package/dist/components/InfoPage/SplitLine/index.js +67 -0
- package/dist/components/InfoPage/SplitLine/index.js.map +1 -0
- package/dist/components/InfoPage/SplitLine/style.module.scss.js +8 -0
- package/dist/components/InfoPage/SplitLine/style.module.scss.js.map +1 -0
- package/dist/components/InfoPage/computeColumnsValue.d.ts +28 -0
- package/dist/components/InfoPage/computeColumnsValue.js +60 -0
- package/dist/components/InfoPage/computeColumnsValue.js.map +1 -0
- package/dist/components/InfoPage/formatView.d.ts +23 -0
- package/dist/components/InfoPage/formatView.js +119 -0
- package/dist/components/InfoPage/formatView.js.map +1 -0
- package/dist/components/InfoPage/index.d.ts +262 -0
- package/dist/components/OrgTree/OrgTree.js +103 -89
- package/dist/components/OrgTree/OrgTree.js.map +1 -1
- package/dist/components/ReactModal/ColumnsLayout.d.ts +7 -0
- package/dist/components/ReactModal/ColumnsLayout.js +20 -0
- package/dist/components/ReactModal/ColumnsLayout.js.map +1 -0
- package/dist/components/ReactModal/Drawer.d.ts +73 -0
- package/dist/components/ReactModal/Drawer.js +292 -0
- package/dist/components/ReactModal/Drawer.js.map +1 -0
- package/dist/components/ReactModal/Footer.d.ts +12 -0
- package/dist/components/ReactModal/Footer.js +53 -0
- package/dist/components/ReactModal/Footer.js.map +1 -0
- package/dist/components/ReactModal/Modal.d.ts +14 -0
- package/dist/components/ReactModal/Modal.js +366 -0
- package/dist/components/ReactModal/Modal.js.map +1 -0
- package/dist/components/ReactModal/ScrollRegion.d.ts +7 -0
- package/dist/components/ReactModal/ScrollRegion.js +22 -0
- package/dist/components/ReactModal/ScrollRegion.js.map +1 -0
- package/dist/components/ReactModal/SimpleBar.d.ts +2 -0
- package/dist/components/ReactModal/SimpleBar.js +7 -0
- package/dist/components/ReactModal/SimpleBar.js.map +1 -0
- package/dist/components/ReactModal/TabsLayout.d.ts +6 -0
- package/dist/components/ReactModal/TabsLayout.js +16 -0
- package/dist/components/ReactModal/TabsLayout.js.map +1 -0
- package/dist/components/ReactModal/confirmModal.module.scss.js +30 -0
- package/dist/components/ReactModal/confirmModal.module.scss.js.map +1 -0
- package/dist/components/ReactModal/createDrawerRender.d.ts +2 -0
- package/dist/components/ReactModal/createDrawerRender.js +7 -0
- package/dist/components/ReactModal/createDrawerRender.js.map +1 -0
- package/dist/components/ReactModal/createModalRender.d.ts +2 -0
- package/dist/components/ReactModal/createModalRender.js +7 -0
- package/dist/components/ReactModal/createModalRender.js.map +1 -0
- package/dist/components/ReactModal/drawer.module.scss.js +36 -0
- package/dist/components/ReactModal/drawer.module.scss.js.map +1 -0
- package/dist/components/ReactModal/index.d.ts +57 -0
- package/dist/components/ReactModal/intlStub.d.ts +15 -0
- package/dist/components/ReactModal/intlStub.js +21 -0
- package/dist/components/ReactModal/intlStub.js.map +1 -0
- package/dist/components/ReactModal/layouts.module.scss.js +12 -0
- package/dist/components/ReactModal/layouts.module.scss.js.map +1 -0
- package/dist/components/ReactModal/locale/en-US.d.ts +5 -0
- package/dist/components/ReactModal/locale/zh-CN.d.ts +5 -0
- package/dist/components/ReactModal/locale/zh-CN.js +8 -0
- package/dist/components/ReactModal/locale/zh-CN.js.map +1 -0
- package/dist/components/ReactModal/lockParentScroll.d.ts +3 -0
- package/dist/components/ReactModal/modalClassNames.d.ts +5 -0
- package/dist/components/ReactModal/modalClassNames.js +8 -0
- package/dist/components/ReactModal/modalClassNames.js.map +1 -0
- package/dist/components/ReactModal/style.module.scss.js +38 -0
- package/dist/components/ReactModal/style.module.scss.js.map +1 -0
- package/dist/components/ReactModal/useConfirmModal.d.ts +4 -0
- package/dist/components/ReactModal/useConfirmModal.js +161 -0
- package/dist/components/ReactModal/useConfirmModal.js.map +1 -0
- package/dist/components/ReactModal/useDrawer.d.ts +5 -0
- package/dist/components/ReactModal/useDrawer.js +123 -0
- package/dist/components/ReactModal/useDrawer.js.map +1 -0
- package/dist/components/ReactModal/usePatchElement.d.ts +2 -0
- package/dist/components/ReactModal/usePatchElement.js +11 -0
- package/dist/components/ReactModal/usePatchElement.js.map +1 -0
- package/dist/components/ReactModal/withLocale.d.ts +5 -0
- package/dist/components/ReactModal/withLocale.js +6 -0
- package/dist/components/ReactModal/withLocale.js.map +1 -0
- package/dist/components/VirtualScrollbar/VirtualScrollbar/index.d.ts +5 -0
- package/dist/components/VirtualScrollbar/VirtualScrollbar/index.js +75 -51
- package/dist/components/VirtualScrollbar/VirtualScrollbar/index.js.map +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/form-info.d.ts +17 -0
- package/dist/form-info.js +68 -0
- package/dist/form-info.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +700 -632
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/utils/date.d.ts +4 -1
- package/dist/utils/date.js +35 -27
- package/dist/utils/date.js.map +1 -1
- package/package.json +16 -2
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as o, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import C, { useRef as d, useState as g, useLayoutEffect as j } from "react";
|
|
3
|
+
import { Row as w, Col as z, Space as O } from "antd";
|
|
4
|
+
import u from "classnames";
|
|
5
|
+
import c from "./style.module.scss.js";
|
|
6
|
+
const W = ({ className: s, children: l, setWidth: t }) => {
|
|
7
|
+
const n = d(null), m = d(t);
|
|
8
|
+
return m.current = t, j(() => {
|
|
9
|
+
const a = () => {
|
|
10
|
+
if (!n.current)
|
|
11
|
+
return;
|
|
12
|
+
const { width: i } = n.current.getBoundingClientRect();
|
|
13
|
+
t(i);
|
|
14
|
+
}, r = new ResizeObserver(a);
|
|
15
|
+
return r.observe(n.current), a(), () => {
|
|
16
|
+
r.disconnect();
|
|
17
|
+
};
|
|
18
|
+
}, [t]), /* @__PURE__ */ y("div", { ref: n, className: s, children: [
|
|
19
|
+
l,
|
|
20
|
+
":"
|
|
21
|
+
] });
|
|
22
|
+
}, q = ({
|
|
23
|
+
list: s = [],
|
|
24
|
+
labelAlign: l = "left",
|
|
25
|
+
col: t = 1,
|
|
26
|
+
gutter: n = 0,
|
|
27
|
+
className: m,
|
|
28
|
+
size: a,
|
|
29
|
+
itemRender: r
|
|
30
|
+
}) => {
|
|
31
|
+
const i = d([]), [p, v] = g(0);
|
|
32
|
+
return /* @__PURE__ */ o(
|
|
33
|
+
w,
|
|
34
|
+
{
|
|
35
|
+
"data-testid": "components-core-content",
|
|
36
|
+
className: u(c.content, "content", m, {
|
|
37
|
+
[c["size-small"]]: a === "small"
|
|
38
|
+
}),
|
|
39
|
+
gutter: n,
|
|
40
|
+
children: s.filter((e) => typeof e.display == "function" ? e.display(e, s) : e.display !== !1).map((e, f) => {
|
|
41
|
+
const { label: h, content: N, block: R } = e, b = /* @__PURE__ */ o(z, { span: R === !0 ? 24 : 24 / t, className: c.item, children: /* @__PURE__ */ y(O, { className: u(c.item, "content-item"), children: [
|
|
42
|
+
h ? /* @__PURE__ */ o(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
style: p && l !== "auto" ? {
|
|
46
|
+
minWidth: p,
|
|
47
|
+
textAlign: l
|
|
48
|
+
} : null,
|
|
49
|
+
children: /* @__PURE__ */ o(
|
|
50
|
+
W,
|
|
51
|
+
{
|
|
52
|
+
className: u(c.label, "content-label"),
|
|
53
|
+
setWidth: (L) => {
|
|
54
|
+
i.current[f] = L, v(Math.max(...i.current));
|
|
55
|
+
},
|
|
56
|
+
children: h
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
) : null,
|
|
61
|
+
/* @__PURE__ */ o("div", { className: u(c["content-content"], "content-content"), children: N })
|
|
62
|
+
] }) }), x = typeof r == "function" ? r(b, Object.assign({}, e, { index: f })) : b;
|
|
63
|
+
return C.cloneElement(x, { key: f });
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
W as Label,
|
|
70
|
+
q as default
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/InfoPage/Content/index.jsx"],"sourcesContent":["// @ts-nocheck\n// Ported from https://github.com/kne-union/info-page/blob/master/src/Content/index.js\nimport { useLayoutEffect, useRef, useState } from 'react';\nimport { Col, Row, Space } from 'antd';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport style from './style.module.scss';\n\nexport const Label = ({ className, children, setWidth }) => {\n const ref = useRef(null);\n const setWidthRef = useRef(setWidth);\n setWidthRef.current = setWidth;\n useLayoutEffect(() => {\n const computed = () => {\n if (!ref.current) {\n return;\n }\n const { width } = ref.current.getBoundingClientRect();\n setWidth(width);\n };\n const resizeObserver = new ResizeObserver(computed);\n resizeObserver.observe(ref.current);\n computed();\n return () => {\n resizeObserver.disconnect();\n };\n }, [setWidth]);\n return (\n <div ref={ref} className={className}>\n {children}:\n </div>\n );\n};\n\nconst Content = ({\n list = [],\n labelAlign = 'left',\n col = 1,\n gutter = 0,\n className,\n size,\n itemRender,\n}) => {\n const labelWidthListRef = useRef([]);\n const [maxLabelWidth, setMaxLabelWidth] = useState(0);\n return (\n <Row\n data-testid=\"components-core-content\"\n className={classnames(style['content'], 'content', className, {\n [style['size-small']]: size === 'small',\n })}\n gutter={gutter}\n >\n {list\n .filter((item) => {\n if (typeof item.display === 'function') {\n return item.display(item, list);\n }\n return item.display !== false;\n })\n .map((listItem, index) => {\n const { label, content, block } = listItem;\n const innerComponent = (\n <Col span={block === true ? 24 : 24 / col} className={style['item']}>\n <Space className={classnames(style['item'], 'content-item')}>\n {label ? (\n <div\n style={\n maxLabelWidth && labelAlign !== 'auto'\n ? {\n minWidth: maxLabelWidth,\n textAlign: labelAlign,\n }\n : null\n }\n >\n <Label\n className={classnames(style['label'], 'content-label')}\n setWidth={(width) => {\n labelWidthListRef.current[index] = width;\n setMaxLabelWidth(Math.max(...labelWidthListRef.current));\n }}\n >\n {label}\n </Label>\n </div>\n ) : null}\n <div className={classnames(style['content-content'], 'content-content')}>\n {content}\n </div>\n </Space>\n </Col>\n );\n const item =\n typeof itemRender === 'function'\n ? itemRender(innerComponent, Object.assign({}, listItem, { index }))\n : innerComponent;\n return React.cloneElement(item, { key: index });\n })}\n </Row>\n );\n};\n\nexport default Content;\n"],"names":["Label","className","children","setWidth","ref","useRef","setWidthRef","useLayoutEffect","computed","width","resizeObserver","jsxs","Content","list","labelAlign","col","gutter","size","itemRender","labelWidthListRef","maxLabelWidth","setMaxLabelWidth","useState","jsx","Row","classnames","style","item","listItem","index","label","content","block","innerComponent","Col","Space","React"],"mappings":";;;;;AASO,MAAMA,IAAQ,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,UAAAC,QAAe;AAC1D,QAAMC,IAAMC,EAAO,IAAI,GACjBC,IAAcD,EAAOF,CAAQ;AACnC,SAAAG,EAAY,UAAUH,GACtBI,EAAgB,MAAM;AACpB,UAAMC,IAAW,MAAM;AACrB,UAAI,CAACJ,EAAI;AACP;AAEF,YAAM,EAAE,OAAAK,EAAA,IAAUL,EAAI,QAAQ,sBAAA;AAC9B,MAAAD,EAASM,CAAK;AAAA,IAChB,GACMC,IAAiB,IAAI,eAAeF,CAAQ;AAClD,WAAAE,EAAe,QAAQN,EAAI,OAAO,GAClCI,EAAA,GACO,MAAM;AACX,MAAAE,EAAe,WAAA;AAAA,IACjB;AAAA,EACF,GAAG,CAACP,CAAQ,CAAC,GAEX,gBAAAQ,EAAC,OAAA,EAAI,KAAAP,GAAU,WAAAH,GACZ,UAAA;AAAA,IAAAC;AAAA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OAAO,CAAC;AAAA,kBACzD;AAAA,kBAEC,UAAAW;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH;AAAA,UAAA,IAEA;AAAA,UACJ,gBAAAP,EAAC,SAAI,WAAWE,EAAWC,EAAM,iBAAiB,GAAG,iBAAiB,GACnE,UAAAK,EAAA,CACH;AAAA,QAAA,EAAA,CACF,EAAA,CACF,GAEIJ,IACJ,OAAOT,KAAe,aAClBA,EAAWe,GAAgB,OAAO,OAAO,CAAA,GAAIL,GAAU,EAAE,OAAAC,EAAA,CAAO,CAAC,IACjEI;AACN,eAAOG,EAAM,aAAaT,GAAM,EAAE,KAAKE,GAAO;AAAA,MAChD,CAAC;AAAA,IAAA;AAAA,EAAA;AAGT;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const t = "_content_1av6n_2", n = "_label_1av6n_13", e = "_item_1av6n_21", _ = {
|
|
2
|
+
content: t,
|
|
3
|
+
"size-small": "_size-small_1av6n_10",
|
|
4
|
+
label: n,
|
|
5
|
+
"content-content": "_content-content_1av6n_14",
|
|
6
|
+
item: e
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
t as content,
|
|
10
|
+
_ as default,
|
|
11
|
+
e as item,
|
|
12
|
+
n as label
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export default Descriptions;
|
|
3
|
+
declare function Descriptions({ dataSource, isFull, className, itemRender, ...props }: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
dataSource: any;
|
|
6
|
+
isFull: any;
|
|
7
|
+
className: any;
|
|
8
|
+
itemRender: any;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as t, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { Row as m, Col as c } from "antd";
|
|
3
|
+
import e from "classnames";
|
|
4
|
+
import "react";
|
|
5
|
+
import n from "./style.module.scss.js";
|
|
6
|
+
const $ = ({ dataSource: l, isFull: r, className: f, itemRender: i, ...d }) => /* @__PURE__ */ t(m, { ...d, className: e(n.descriptions, f), children: l.map((h, u) => {
|
|
7
|
+
const o = h.slice(0, 2).filter((s) => typeof s.display == "function" ? s.display(s, l) : s.display !== !1);
|
|
8
|
+
return o.slice(0, 2).map((s, a) => {
|
|
9
|
+
const { label: y, content: N } = s, p = /* @__PURE__ */ t(
|
|
10
|
+
c,
|
|
11
|
+
{
|
|
12
|
+
span: 24 / o.length,
|
|
13
|
+
className: e(n["col-item"], "descriptions-col-item"),
|
|
14
|
+
children: /* @__PURE__ */ b(
|
|
15
|
+
m,
|
|
16
|
+
{
|
|
17
|
+
wrap: !1,
|
|
18
|
+
className: e(n["descriptions-item"], "descriptions-item"),
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ t(
|
|
21
|
+
c,
|
|
22
|
+
{
|
|
23
|
+
span: r ? 8 : 4 * o.length,
|
|
24
|
+
className: e(n["col-label"], "descriptions-col-label"),
|
|
25
|
+
children: y
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ t(
|
|
29
|
+
c,
|
|
30
|
+
{
|
|
31
|
+
span: r ? 16 : 24 - 4 * o.length,
|
|
32
|
+
className: e(n["col-content"], "descriptions-col-content"),
|
|
33
|
+
children: N
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
`${u}-${a}`
|
|
41
|
+
);
|
|
42
|
+
return typeof i == "function" ? i(p, Object.assign({}, s, { index: a })) : p;
|
|
43
|
+
});
|
|
44
|
+
}) });
|
|
45
|
+
export {
|
|
46
|
+
$ as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/InfoPage/Descriptions/index.jsx"],"sourcesContent":["// @ts-nocheck\n// Ported from https://github.com/kne-union/info-page/blob/master/src/Descriptions/index.js\nimport { Col, Row } from 'antd';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport style from './style.module.scss';\n\nconst Descriptions = ({ dataSource, isFull, className, itemRender, ...props }) => {\n return (\n <Row {...props} className={classnames(style['descriptions'], className)}>\n {dataSource.map((colItem, colIndex) => {\n const _colItem = colItem.slice(0, 2).filter((item) => {\n if (typeof item.display === 'function') {\n return item.display(item, dataSource);\n }\n return item.display !== false;\n });\n return _colItem.slice(0, 2).map((listItem, index) => {\n const { label, content } = listItem;\n const innerComponent = (\n <Col\n span={24 / _colItem.length}\n className={classnames(style['col-item'], 'descriptions-col-item')}\n key={`${colIndex}-${index}`}\n >\n <Row\n wrap={false}\n className={classnames(style['descriptions-item'], 'descriptions-item')}\n >\n <Col\n span={isFull ? 8 : 4 * _colItem.length}\n className={classnames(style['col-label'], 'descriptions-col-label')}\n >\n {label}\n </Col>\n <Col\n span={isFull ? 16 : 24 - 4 * _colItem.length}\n className={classnames(style['col-content'], 'descriptions-col-content')}\n >\n {content}\n </Col>\n </Row>\n </Col>\n );\n return typeof itemRender === 'function'\n ? itemRender(innerComponent, Object.assign({}, listItem, { index }))\n : innerComponent;\n });\n })}\n </Row>\n );\n};\n\nexport default Descriptions;\n"],"names":["Descriptions","dataSource","isFull","className","itemRender","props","jsx","Row","classnames","style","colItem","colIndex","_colItem","item","listItem","index","label","content","innerComponent","Col","jsxs"],"mappings":";;;;;AAQA,MAAMA,IAAe,CAAC,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,YAAAC,GAAY,GAAGC,QAElE,gBAAAC,EAACC,GAAA,EAAK,GAAGF,GAAO,WAAWG,EAAWC,EAAM,cAAiBN,CAAS,GACnE,UAAA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|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const o = "_descriptions_122bo_2", t = {
|
|
2
|
+
descriptions: o,
|
|
3
|
+
"descriptions-item": "_descriptions-item_122bo_11",
|
|
4
|
+
"col-label": "_col-label_122bo_15",
|
|
5
|
+
"col-content": "_col-content_122bo_16"
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
t as default,
|
|
9
|
+
o as descriptions
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsx as l, jsxs as d, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as I, createElement as z } from "react";
|
|
3
|
+
import { Empty as F, Steps as T, Space as k, Col as v } from "antd";
|
|
4
|
+
import i from "classnames";
|
|
5
|
+
import E from "lodash/transform";
|
|
6
|
+
import c from "./style.module.scss.js";
|
|
7
|
+
import C from "lodash/get";
|
|
8
|
+
import $ from "../formatView.js";
|
|
9
|
+
import { isEmpty as q } from "@kne/is-empty";
|
|
10
|
+
const B = ({ name: b, action: j, options: t, content: g }) => /* @__PURE__ */ d("div", { className: i("step-content-wrap", c["step-content-wrap"]), children: [
|
|
11
|
+
/* @__PURE__ */ d(k, { align: "center", children: [
|
|
12
|
+
/* @__PURE__ */ d(v, { className: i("step-left", c["step-left"]), children: [
|
|
13
|
+
/* @__PURE__ */ l("span", { className: i("step-name", c["step-name"]), children: b }),
|
|
14
|
+
/* @__PURE__ */ l("span", { className: i("step-action", c["step-action"]), children: j })
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ l(v, { className: i("step-action-time", c["step-action-time"]), children: t })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ l("div", { className: i("step-content", c["step-content"]), children: g })
|
|
19
|
+
] }), Y = (b) => {
|
|
20
|
+
const {
|
|
21
|
+
className: j,
|
|
22
|
+
dataSource: t,
|
|
23
|
+
size: g,
|
|
24
|
+
columns: w,
|
|
25
|
+
empty: L,
|
|
26
|
+
valueIsEmpty: A,
|
|
27
|
+
placeholder: P,
|
|
28
|
+
emptyIsPlaceholder: D,
|
|
29
|
+
...N
|
|
30
|
+
} = Object.assign(
|
|
31
|
+
{},
|
|
32
|
+
{
|
|
33
|
+
size: "small",
|
|
34
|
+
progressDot: !1,
|
|
35
|
+
labelPlacement: "vertical",
|
|
36
|
+
direction: "vertical",
|
|
37
|
+
dataSource: [],
|
|
38
|
+
columns: [],
|
|
39
|
+
empty: /* @__PURE__ */ l(F, {}),
|
|
40
|
+
valueIsEmpty: q,
|
|
41
|
+
placeholder: "-",
|
|
42
|
+
emptyIsPlaceholder: !1
|
|
43
|
+
},
|
|
44
|
+
b
|
|
45
|
+
), M = I(() => {
|
|
46
|
+
const m = (f) => new Map(
|
|
47
|
+
f.map((r) => [
|
|
48
|
+
r.type || r.name,
|
|
49
|
+
Array.isArray(r.children) && r.children.length > 0 ? Object.assign({}, r, { children: m(r.children) }) : r
|
|
50
|
+
])
|
|
51
|
+
);
|
|
52
|
+
return m(w);
|
|
53
|
+
}, [w]);
|
|
54
|
+
return t && t.length > 0 ? /* @__PURE__ */ l(
|
|
55
|
+
T,
|
|
56
|
+
{
|
|
57
|
+
...N,
|
|
58
|
+
items: t.map((m, f) => {
|
|
59
|
+
const r = (e, n, s) => {
|
|
60
|
+
const o = typeof e.getValueOf == "function" ? e.getValueOf(
|
|
61
|
+
n,
|
|
62
|
+
Object.assign({}, s, {
|
|
63
|
+
dataSource: t,
|
|
64
|
+
column: e
|
|
65
|
+
})
|
|
66
|
+
) : C(n, e.name), y = ((u) => {
|
|
67
|
+
if (typeof e.format == "function")
|
|
68
|
+
return e.format(
|
|
69
|
+
u,
|
|
70
|
+
Object.assign({}, s, {
|
|
71
|
+
dataSource: t,
|
|
72
|
+
column: e,
|
|
73
|
+
target: n
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
if (typeof e.format == "string") {
|
|
77
|
+
const p = $(
|
|
78
|
+
u,
|
|
79
|
+
e.format,
|
|
80
|
+
Object.assign({}, s, {
|
|
81
|
+
dataSource: t,
|
|
82
|
+
column: e,
|
|
83
|
+
target: n
|
|
84
|
+
})
|
|
85
|
+
);
|
|
86
|
+
if (p)
|
|
87
|
+
return p;
|
|
88
|
+
}
|
|
89
|
+
return u;
|
|
90
|
+
})(o), O = (e.valueIsEmpty || A)(o, s);
|
|
91
|
+
return e.display === !1 || typeof e.display == "function" && e.display(
|
|
92
|
+
o,
|
|
93
|
+
Object.assign({}, s, {
|
|
94
|
+
dataSource: t,
|
|
95
|
+
column: e,
|
|
96
|
+
target: n
|
|
97
|
+
})
|
|
98
|
+
) === !1 || !(e.hasOwnProperty("emptyIsPlaceholder") ? e.emptyIsPlaceholder : D) && O ? null : O ? typeof e.renderPlaceholder == "function" ? e.renderPlaceholder(
|
|
99
|
+
Object.assign({}, s, {
|
|
100
|
+
column: e,
|
|
101
|
+
dataSource: t,
|
|
102
|
+
placeholder: P
|
|
103
|
+
})
|
|
104
|
+
) : e.placeholder || P : typeof e.render == "function" ? e.render(
|
|
105
|
+
y,
|
|
106
|
+
Object.assign({}, s, {
|
|
107
|
+
column: e,
|
|
108
|
+
dataSource: t,
|
|
109
|
+
target: n
|
|
110
|
+
})
|
|
111
|
+
) : y;
|
|
112
|
+
}, { actionList: h, ...a } = E(
|
|
113
|
+
["title", "subTitle", "description", "status", "content", "actionList"],
|
|
114
|
+
(e, n) => {
|
|
115
|
+
const s = M.get(n) || { name: n };
|
|
116
|
+
if (s.children instanceof Map && n !== "actionList") {
|
|
117
|
+
console.warn("只有actionList允许包含children");
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (s.children instanceof Map && n === "actionList") {
|
|
121
|
+
const o = r(s, m, { index: f });
|
|
122
|
+
if (!(Array.isArray(o) && o.length > 0))
|
|
123
|
+
return o;
|
|
124
|
+
e[n] = o.map((y, O) => E(
|
|
125
|
+
["name", "action", "options", "content"],
|
|
126
|
+
(u, p) => {
|
|
127
|
+
const S = s.children.get(p) || { name: p };
|
|
128
|
+
u[p] = r(S, y, {
|
|
129
|
+
parent: o,
|
|
130
|
+
targetIndex: O,
|
|
131
|
+
index: f
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
{}
|
|
135
|
+
));
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
e[n] = r(s, m, { index: f });
|
|
139
|
+
},
|
|
140
|
+
{}
|
|
141
|
+
);
|
|
142
|
+
return h && h.length > 0 ? Object.assign({}, a, {
|
|
143
|
+
description: /* @__PURE__ */ d(V, { children: [
|
|
144
|
+
a.description,
|
|
145
|
+
h.map((e, n) => /* @__PURE__ */ z(B, { ...Object.assign({}, e), key: n }))
|
|
146
|
+
] })
|
|
147
|
+
}) : a.content ? Object.assign({}, a, {
|
|
148
|
+
description: /* @__PURE__ */ d(V, { children: [
|
|
149
|
+
a.description,
|
|
150
|
+
/* @__PURE__ */ l("div", { className: i("step-content-wrap", c["step-content-wrap"]), children: /* @__PURE__ */ l("div", { className: i("step-content", c["step-content"]), children: a.content }) })
|
|
151
|
+
] })
|
|
152
|
+
}) : a;
|
|
153
|
+
}),
|
|
154
|
+
className: i(j, c.steps, c[`steps-${g}`], {
|
|
155
|
+
"steps-dot": N.progressDot,
|
|
156
|
+
[c["steps-dot"]]: N.progressDot
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
) : L;
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
B as ActionList,
|
|
163
|
+
Y as default
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/InfoPage/Flow/index.jsx"],"sourcesContent":["// @ts-nocheck\n// Ported from https://github.com/kne-union/info-page/blob/master/src/Flow/index.js\nimport React, { useMemo } from 'react';\nimport { Col, Empty, Space, Steps } from 'antd';\nimport classnames from 'classnames';\nimport transform from 'lodash/transform';\nimport style from './style.module.scss';\nimport get from 'lodash/get';\nimport formatView from '../formatView';\nimport { isEmpty } from '@kne/is-empty';\n\nexport const ActionList = ({ name, action, options, content }) => {\n return (\n <div className={classnames('step-content-wrap', style['step-content-wrap'])}>\n <Space align=\"center\">\n <Col className={classnames('step-left', style['step-left'])}>\n <span className={classnames('step-name', style['step-name'])}>{name}</span>\n <span className={classnames('step-action', style['step-action'])}>{action}</span>\n </Col>\n <Col className={classnames('step-action-time', style['step-action-time'])}>{options}</Col>\n </Space>\n <div className={classnames('step-content', style['step-content'])}>{content}</div>\n </div>\n );\n};\n\nconst Flow = (p) => {\n const {\n className,\n dataSource,\n size,\n columns,\n empty,\n valueIsEmpty,\n placeholder,\n emptyIsPlaceholder,\n ...props\n } = Object.assign(\n {},\n {\n size: 'small',\n progressDot: false,\n labelPlacement: 'vertical',\n direction: 'vertical',\n dataSource: [],\n columns: [],\n empty: <Empty />,\n valueIsEmpty: isEmpty,\n placeholder: '-',\n emptyIsPlaceholder: false,\n },\n p,\n );\n\n const columnsMap = useMemo(() => {\n const core = (columns) => {\n return new Map(\n columns.map((item) => {\n const name = item.type || item.name;\n return [\n name,\n Array.isArray(item.children) && item.children.length > 0\n ? Object.assign({}, item, { children: core(item.children) })\n : item,\n ];\n }),\n );\n };\n return core(columns);\n }, [columns]);\n\n if (!(dataSource && dataSource.length > 0)) {\n return empty;\n }\n\n return (\n <Steps\n {...props}\n items={dataSource.map((dataItem, index) => {\n const computedDisplayValue = (target, dataItem, context) => {\n const itemValue =\n typeof target.getValueOf === 'function'\n ? target.getValueOf(\n dataItem,\n Object.assign({}, context, {\n dataSource,\n column: target,\n }),\n )\n : get(dataItem, target.name);\n\n const displayValue = ((value) => {\n if (typeof target.format === 'function') {\n return target.format(\n value,\n Object.assign({}, context, {\n dataSource,\n column: target,\n target: dataItem,\n }),\n );\n }\n if (typeof target.format === 'string') {\n const formatValue = formatView(\n value,\n target.format,\n Object.assign({}, context, {\n dataSource,\n column: target,\n target: dataItem,\n }),\n );\n if (formatValue) {\n return formatValue;\n }\n }\n return value;\n })(itemValue);\n\n const itemIsEmpty = (target.valueIsEmpty || valueIsEmpty)(itemValue, context);\n\n if (\n target.display === false ||\n (typeof target.display === 'function' &&\n target.display(\n itemValue,\n Object.assign({}, context, {\n dataSource,\n column: target,\n target: dataItem,\n }),\n ) === false)\n ) {\n return null;\n }\n\n if (\n !(target.hasOwnProperty('emptyIsPlaceholder')\n ? target.emptyIsPlaceholder\n : emptyIsPlaceholder) &&\n itemIsEmpty\n ) {\n return null;\n }\n\n if (itemIsEmpty) {\n return typeof target.renderPlaceholder === 'function'\n ? target.renderPlaceholder(\n Object.assign({}, context, {\n column: target,\n dataSource,\n placeholder,\n }),\n )\n : target.placeholder || placeholder;\n }\n\n if (typeof target.render === 'function') {\n return target.render(\n displayValue,\n Object.assign({}, context, {\n column: target,\n dataSource,\n target: dataItem,\n }),\n );\n }\n\n return displayValue;\n };\n const { actionList, ...renderData } = transform(\n ['title', 'subTitle', 'description', 'status', 'content', 'actionList'],\n (result, name) => {\n const target = columnsMap.get(name) || { name };\n if (target.children instanceof Map && name !== 'actionList') {\n console.warn('只有actionList允许包含children');\n return;\n }\n if (target.children instanceof Map && name === 'actionList') {\n const targetValue = computedDisplayValue(target, dataItem, { index });\n if (!(Array.isArray(targetValue) && targetValue.length > 0)) {\n return targetValue;\n }\n result[name] = targetValue.map((dataItem, itemIndex) => {\n return transform(\n ['name', 'action', 'options', 'content'],\n (result, name) => {\n const childrenTarget = target.children.get(name) || { name };\n result[name] = computedDisplayValue(childrenTarget, dataItem, {\n parent: targetValue,\n targetIndex: itemIndex,\n index,\n });\n },\n {},\n );\n });\n return;\n }\n result[name] = computedDisplayValue(target, dataItem, { index });\n },\n {},\n );\n\n if (actionList && actionList.length > 0) {\n return Object.assign({}, renderData, {\n description: (\n <>\n {renderData.description}\n {actionList.map((item, index) => (\n <ActionList {...Object.assign({}, item)} key={index} />\n ))}\n </>\n ),\n });\n }\n\n if (renderData.content) {\n return Object.assign({}, renderData, {\n description: (\n <>\n {renderData.description}\n <div className={classnames('step-content-wrap', style['step-content-wrap'])}>\n <div className={classnames('step-content', style['step-content'])}>\n {renderData.content}\n </div>\n </div>\n </>\n ),\n });\n }\n\n return renderData;\n })}\n className={classnames(className, style['steps'], style[`steps-${size}`], {\n 'steps-dot': props.progressDot,\n [style['steps-dot']]: props.progressDot,\n })}\n />\n );\n};\n\nexport default Flow;\n"],"names":["ActionList","name","action","options","content","jsxs","classnames","style","Space","Col","jsx","Flow","p","className","dataSource","size","columns","empty","valueIsEmpty","placeholder","emptyIsPlaceholder","props","Empty","isEmpty","columnsMap","useMemo","core","item","Steps","dataItem","index","computedDisplayValue","target","context","itemValue","get","displayValue","value","formatValue","formatView","itemIsEmpty","actionList","renderData","transform","result","targetValue","itemIndex","childrenTarget","Fragment"],"mappings":";;;;;;;;;AAWO,MAAMA,IAAa,CAAC,EAAE,MAAAC,GAAM,QAAAC,GAAQ,SAAAC,GAAS,SAAAC,QAEhD,gBAAAC,EAAC,SAAI,WAAWC,EAAW,qBAAqBC,EAAM,mBAAmB,CAAC,GACxE,UAAA;AAAA,EAAA,gBAAAF,EAACG,GAAA,EAAM,OAAM,UACX,UAAA;AAAA,IAAA,gBAAAH,EAACI,KAAI,WAAWH,EAAW,aAAaC,EAAM,WAAW,CAAC,GACxD,UAAA;AAAA,MAAA,gBAAAG,EAAC,QAAA,EAAK,WAAWJ,EAAW,aAAaC,EAAM,WAAW,CAAC,GAAI,UAAAN,EAAA,CAAK;AAAA,MACpE,gBAAAS,EAAC,UAAK,WAAWJ,EAAW,eAAeC,EAAM,aAAa,CAAC,GAAI,UAAAL,EAAA,CAAO;AAAA,IAAA,GAC5E;AAAA,IACA,gBAAAQ,EAACD,KAAI,WAAWH,EAAW,oBAAoBC,EAAM,kBAAkB,CAAC,GAAI,UA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ACjE;AAAA,UACA,CAAA;AAAA,QAAC;AAGH,eAAIW,KAAcA,EAAW,SAAS,IAC7B,OAAO,OAAO,CAAA,GAAIC,GAAY;AAAA,UACnC,aACE,gBAAArC,EAAA2C,GAAA,EACG,UAAA;AAAA,YAAAN,EAAW;AAAA,YACXD,EAAW,IAAI,CAACd,GAAMG,wBACpB9B,GAAA,EAAY,GAAG,OAAO,OAAO,CAAA,GAAI2B,CAAI,GAAG,KAAKG,GAAO,CACtD;AAAA,UAAA,EAAA,CACH;AAAA,QAAA,CAEH,IAGCY,EAAW,UACN,OAAO,OAAO,CAAA,GAAIA,GAAY;AAAA,UACnC,aACE,gBAAArC,EAAA2C,GAAA,EACG,UAAA;AAAA,YAAAN,EAAW;AAAA,YACZ,gBAAAhC,EAAC,SAAI,WAAWJ,EAAW,qBAAqBC,EAAM,mBAAmB,CAAC,GACxE,UAAA,gBAAAG,EAAC,SAAI,WAAWJ,EAAW,gBAAgBC,EAAM,cAAc,CAAC,GAC7D,UAAAmC,EAAW,SACd,EAAA,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA,CAEH,IAGIA;AAAA,MACT,CAAC;AAAA,MACD,WAAWpC,EAAWO,GAAWN,EAAM,OAAUA,EAAM,SAASQ,CAAI,EAAE,GAAG;AAAA,QACvE,aAAaM,EAAM;AAAA,QACnB,CAACd,EAAM,WAAW,CAAC,GAAGc,EAAM;AAAA,MAAA,CAC7B;AAAA,IAAA;AAAA,EAAA,IArKIJ;AAwKX;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const t = "_steps_quuvz_2", s = {
|
|
2
|
+
steps: t,
|
|
3
|
+
"steps-dot": "_steps-dot_quuvz_65",
|
|
4
|
+
"ant-steps-icon-dot": "_ant-steps-icon-dot_quuvz_55",
|
|
5
|
+
"steps-default": "_steps-default_quuvz_122",
|
|
6
|
+
"steps-small": "_steps-small_quuvz_153",
|
|
7
|
+
"steps-record": "_steps-record_quuvz_203",
|
|
8
|
+
"step-content-wrap": "_step-content-wrap_quuvz_213",
|
|
9
|
+
"step-left": "_step-left_quuvz_221",
|
|
10
|
+
"step-name": "_step-name_quuvz_224",
|
|
11
|
+
"step-action": "_step-action_quuvz_228",
|
|
12
|
+
"step-action-time": "_step-action-time_quuvz_232",
|
|
13
|
+
"step-content": "_step-content_quuvz_213"
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
s as default,
|
|
17
|
+
t as steps
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export default Collapse;
|
|
3
|
+
declare function Collapse({ children, className, ...props }: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
children: any;
|
|
6
|
+
className: any;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare namespace Collapse {
|
|
9
|
+
let Panel: React.ForwardRefExoticComponent<import("antd").CollapsePanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Collapse as l } from "antd";
|
|
3
|
+
import r from "classnames";
|
|
4
|
+
import "react";
|
|
5
|
+
import m from "./style.module.scss.js";
|
|
6
|
+
const p = ({ children: o, className: s, ...a }) => /* @__PURE__ */ e(l, { ...a, className: r(m.collapse, "collapse", s), children: o });
|
|
7
|
+
p.Panel = l.Panel;
|
|
8
|
+
export {
|
|
9
|
+
p as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=Collapse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapse.js","sources":["../../../../src/components/InfoPage/InfoPage/Collapse.jsx"],"sourcesContent":["// @ts-nocheck\n// Ported from https://github.com/kne-union/info-page/blob/master/src/InfoPage/Collapse.js\nimport { Collapse as CollapseAntd } from 'antd';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport style from './style.module.scss';\n\nconst Collapse = ({ children, className, ...props }) => {\n return (\n <CollapseAntd {...props} className={classnames(style['collapse'], 'collapse', className)}>\n {children}\n </CollapseAntd>\n );\n};\n\nCollapse.Panel = CollapseAntd.Panel;\n\nexport default Collapse;\n"],"names":["Collapse","children","className","props","jsx","CollapseAntd","classnames","style"],"mappings":";;;;;AAQA,MAAMA,IAAW,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,QAExC,gBAAAC,EAACC,GAAA,EAAc,GAAGF,GAAO,WAAWG,EAAWC,EAAM,UAAa,YAAYL,CAAS,GACpF,UAAAD,EAAA,CACH;AAIJD,EAAS,QAAQK,EAAa;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as Collapse } from './Collapse';
|
|
3
|
+
export default InfoPage;
|
|
4
|
+
declare function InfoPage({ className, children, ...props }: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
className: any;
|
|
7
|
+
children: any;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare namespace InfoPage {
|
|
10
|
+
export { Part };
|
|
11
|
+
export { Collapse };
|
|
12
|
+
}
|
|
13
|
+
declare function Part({ className, title, subtitle, extra, children, bordered, ...props }: {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
className: any;
|
|
16
|
+
title: any;
|
|
17
|
+
subtitle: any;
|
|
18
|
+
extra: any;
|
|
19
|
+
children: any;
|
|
20
|
+
bordered: any;
|
|
21
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { useIsMobile as f } from "@kne/responsive-utils";
|
|
3
|
+
import { Flex as u, Card as b } from "antd";
|
|
4
|
+
import l from "classnames";
|
|
5
|
+
import "react";
|
|
6
|
+
import v from "./Collapse.js";
|
|
7
|
+
import t from "./style.module.scss.js";
|
|
8
|
+
const x = ({ className: o, title: r, subtitle: a, extra: s, children: p, bordered: i, ...n }) => /* @__PURE__ */ e(
|
|
9
|
+
b,
|
|
10
|
+
{
|
|
11
|
+
className: l(t.part, "part", o, {
|
|
12
|
+
"no-title": !r,
|
|
13
|
+
[t["no-title"]]: !r,
|
|
14
|
+
bordered: i,
|
|
15
|
+
[t.bordered]: i
|
|
16
|
+
}),
|
|
17
|
+
variant: "borderless",
|
|
18
|
+
title: r && /* @__PURE__ */ c(d, { children: [
|
|
19
|
+
/* @__PURE__ */ e("div", { className: l("part-title", t["part-title"]), children: r }),
|
|
20
|
+
a && /* @__PURE__ */ e("div", { className: l("part-title-sub", t["part-title-sub"]), children: a })
|
|
21
|
+
] }),
|
|
22
|
+
extra: s,
|
|
23
|
+
...n,
|
|
24
|
+
children: p
|
|
25
|
+
}
|
|
26
|
+
), m = ({ className: o, children: r, ...a }) => {
|
|
27
|
+
const s = f();
|
|
28
|
+
return /* @__PURE__ */ e(u, { ...a, className: o, vertical: !0, gap: s ? 12 : 24, children: r });
|
|
29
|
+
};
|
|
30
|
+
m.Part = x;
|
|
31
|
+
m.Collapse = v;
|
|
32
|
+
export {
|
|
33
|
+
m as default
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/InfoPage/InfoPage/index.jsx"],"sourcesContent":["// @ts-nocheck\n// Ported from https://github.com/kne-union/info-page/blob/master/src/InfoPage/index.js\nimport { useIsMobile } from '@kne/responsive-utils';\nimport { Card, Flex } from 'antd';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport Collapse from './Collapse';\nimport style from './style.module.scss';\n\nconst Part = ({ className, title, subtitle, extra, children, bordered, ...props }) => {\n return (\n <Card\n className={classnames(style['part'], 'part', className, {\n 'no-title': !title,\n [style['no-title']]: !title,\n bordered: bordered,\n [style['bordered']]: bordered,\n })}\n variant=\"borderless\"\n title={\n title && (\n <>\n <div className={classnames('part-title', style['part-title'])}>{title}</div>\n {subtitle && (\n <div className={classnames('part-title-sub', style['part-title-sub'])}>\n {subtitle}\n </div>\n )}\n </>\n )\n }\n extra={extra}\n {...props}\n >\n {children}\n </Card>\n );\n};\n\nconst InfoPage = ({ className, children, ...props }) => {\n const isMobile = useIsMobile();\n return (\n <Flex {...props} className={className} vertical gap={isMobile ? 12 : 24}>\n {children}\n </Flex>\n );\n};\n\nInfoPage.Part = Part;\nInfoPage.Collapse = Collapse;\nexport default InfoPage;\n"],"names":["Part","className","title","subtitle","extra","children","bordered","props","jsx","Card","classnames","style","jsxs","Fragment","InfoPage","isMobile","useIsMobile","Flex","Collapse"],"mappings":";;;;;;;AAUA,MAAMA,IAAO,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,OAAAC,GAAO,UAAAC,GAAU,UAAAC,GAAU,GAAGC,QAEtE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAM,MAAS,QAAQV,GAAW;AAAA,MACtD,YAAY,CAACC;AAAA,MACb,CAACS,EAAM,UAAU,CAAC,GAAG,CAACT;AAAA,MACtB,UAAAI;AAAA,MACA,CAACK,EAAM,QAAW,GAAGL;AAAA,IAAA,CACtB;AAAA,IACD,SAAQ;AAAA,IACR,OACEJ,KACE,gBAAAU,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAL,EAAC,OAAA,EAAI,WAAWE,EAAW,cAAcC,EAAM,YAAY,CAAC,GAAI,UAAAT,EAAA,CAAM;AAAA,MACrEC,KACC,gBAAAK,EAAC,OAAA,EAAI,WAAWE,EAAW,kBAAkBC,EAAM,gBAAgB,CAAC,GACjE,UAAAR,EAAA,CACH;AAAA,IAAA,GAEJ;AAAA,IAGJ,OAAAC;AAAA,IACC,GAAGG;AAAA,IAEH,UAAAF;AAAA,EAAA;AAAA,GAKDS,IAAW,CAAC,EAAE,WAAAb,GAAW,UAAAI,GAAU,GAAGE,QAAY;AACtD,QAAMQ,IAAWC,EAAA;AACjB,SACE,gBAAAR,EAACS,GAAA,EAAM,GAAGV,GAAO,WAAAN,GAAsB,UAAQ,IAAC,KAAKc,IAAW,KAAK,IAClE,UAAAV,EAAA,CACH;AAEJ;AAEAS,EAAS,OAAOd;AAChBc,EAAS,WAAWI;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const t = "_part_94u3t_24", e = "_bordered_94u3t_31", _ = "_collapse_94u3t_164", l = {
|
|
2
|
+
part: t,
|
|
3
|
+
bordered: e,
|
|
4
|
+
"part-title": "_part-title_94u3t_39",
|
|
5
|
+
"part-title-sub": "_part-title-sub_94u3t_43",
|
|
6
|
+
"no-title": "_no-title_94u3t_107",
|
|
7
|
+
collapse: _
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
e as bordered,
|
|
11
|
+
_ as collapse,
|
|
12
|
+
l as default,
|
|
13
|
+
t as part
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useIsMobile as n } from "@kne/responsive-utils";
|
|
3
|
+
import { Flex as d } from "antd";
|
|
4
|
+
import l from "classnames";
|
|
5
|
+
import p from "lodash/get";
|
|
6
|
+
import "react";
|
|
7
|
+
import t from "./style.module.scss.js";
|
|
8
|
+
const g = ({ className: s, report: e }) => {
|
|
9
|
+
const o = n();
|
|
10
|
+
return /* @__PURE__ */ i(
|
|
11
|
+
d,
|
|
12
|
+
{
|
|
13
|
+
vertical: !0,
|
|
14
|
+
gap: o ? 12 : 16,
|
|
15
|
+
className: l("list-view", t["list-view"], s),
|
|
16
|
+
children: p(e, "list", []).map(({ label: r, content: c }, a) => /* @__PURE__ */ m("div", { className: l(t["list-item"], "list-item"), children: [
|
|
17
|
+
/* @__PURE__ */ i("div", { className: l("list-label-col", t["list-label-col"]), children: /* @__PURE__ */ i("div", { className: l("list-label", t["list-label"]), children: r }) }),
|
|
18
|
+
/* @__PURE__ */ i("div", { className: l("list-content-col", t["list-content-col"]), children: /* @__PURE__ */ i("div", { className: l("list-content", t["list-content"]), children: c }) })
|
|
19
|
+
] }, a))
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
g as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=List.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../src/components/InfoPage/Report/List.jsx"],"sourcesContent":["// @ts-nocheck\n// Ported from https://github.com/kne-union/info-page/blob/master/src/Report/List.js\nimport { useIsMobile } from '@kne/responsive-utils';\nimport { Flex } from 'antd';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport React from 'react';\nimport style from './style.module.scss';\n\nconst List = ({ className, report }) => {\n const isMobile = useIsMobile();\n return (\n <Flex\n vertical\n gap={isMobile ? 12 : 16}\n className={classnames('list-view', style['list-view'], className)}\n >\n {get(report, 'list', []).map(({ label, content }, index) => {\n return (\n <div className={classnames(style['list-item'], 'list-item')} key={index}>\n <div className={classnames('list-label-col', style['list-label-col'])}>\n <div className={classnames('list-label', style['list-label'])}>{label}</div>\n </div>\n <div className={classnames('list-content-col', style['list-content-col'])}>\n <div className={classnames('list-content', style['list-content'])}>{content}</div>\n </div>\n </div>\n );\n })}\n </Flex>\n );\n};\n\nexport default List;\n"],"names":["List","className","report","isMobile","useIsMobile","jsx","Flex","classnames","style","get","label","content","index","jsxs"],"mappings":";;;;;;;AASA,MAAMA,IAAO,CAAC,EAAE,WAAAC,GAAW,QAAAC,QAAa;AACtC,QAAMC,IAAWC,EAAA;AACjB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAQ;AAAA,MACR,KAAKH,IAAW,KAAK;AAAA,MACrB,WAAWI,EAAW,aAAaC,EAAM,WAAW,GAAGP,CAAS;AAAA,MAE/D,UAAAQ,EAAIP,GAAQ,QAAQ,CAAA,CAAE,EAAE,IAAI,CAAC,EAAE,OAAAQ,GAAO,SAAAC,EAAA,GAAWC,MAE9C,gBAAAC,EAAC,SAAI,WAAWN,EAAWC,EAAM,WAAW,GAAG,WAAW,GACxD,UAAA;AAAA,QAAA,gBAAAH,EAAC,SAAI,WAAWE,EAAW,kBAAkBC,EAAM,gBAAgB,CAAC,GAClE,UAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWE,EAAW,cAAcC,EAAM,YAAY,CAAC,GAAI,aAAM,GACxE;AAAA,0BACC,OAAA,EAAI,WAAWD,EAAW,oBAAoBC,EAAM,kBAAkB,CAAC,GACtE,4BAAC,OAAA,EAAI,WAAWD,EAAW,gBAAgBC,EAAM,cAAc,CAAC,GAAI,aAAQ,EAAA,CAC9E;AAAA,MAAA,EAAA,GANgEI,CAOlE,CAEH;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as n } from "react";
|
|
3
|
+
import { useIsMobile as d } from "@kne/responsive-utils";
|
|
4
|
+
import { Space as f } from "antd";
|
|
5
|
+
import e from "classnames";
|
|
6
|
+
import b from "lodash/get";
|
|
7
|
+
import t from "./style.module.scss.js";
|
|
8
|
+
const x = ({ className: m, report: s }) => {
|
|
9
|
+
const o = d();
|
|
10
|
+
return /* @__PURE__ */ r(
|
|
11
|
+
f,
|
|
12
|
+
{
|
|
13
|
+
direction: "vertical",
|
|
14
|
+
size: o ? 28 : 32,
|
|
15
|
+
className: e("part-view", t["part-view"], m),
|
|
16
|
+
style: { width: "100%" },
|
|
17
|
+
children: b(s, "list", []).map(({ label: l, content: c, hasBgColor: a, ...i }, p) => /* @__PURE__ */ n(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
...i,
|
|
21
|
+
key: p,
|
|
22
|
+
className: e(t["part-item"], "part-item", i.className)
|
|
23
|
+
},
|
|
24
|
+
/* @__PURE__ */ r("div", { className: e("part-label", t["part-label"]), children: l }),
|
|
25
|
+
/* @__PURE__ */ r(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: e("part-content", t["part-content"], {
|
|
29
|
+
[t["part-content-bg"]]: a,
|
|
30
|
+
"has-bg-color": a
|
|
31
|
+
}),
|
|
32
|
+
children: c
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
))
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
x as default
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=Part.js.map
|