@guorui20/typical-page-shells 0.1.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.
Files changed (111) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +17 -0
  3. package/dist/host.d.ts +1 -0
  4. package/dist/host.js +7 -0
  5. package/dist/index.d.ts +10 -0
  6. package/dist/index.js +75 -0
  7. package/dist/pro-detail-drawer/entry.d.ts +12 -0
  8. package/dist/pro-detail-drawer/entry.js +23 -0
  9. package/dist/pro-detail-drawer/index.d.ts +1 -0
  10. package/dist/pro-detail-drawer/index.js +7 -0
  11. package/dist/pro-detail-drawer/index.module.scss.js +9 -0
  12. package/dist/pro-detail-page/ProDetailPage.d.ts +3 -0
  13. package/dist/pro-detail-page/ProDetailPage.js +13 -0
  14. package/dist/pro-detail-page/context/entry.d.ts +15 -0
  15. package/dist/pro-detail-page/context/entry.js +29 -0
  16. package/dist/pro-detail-page/context/index.d.ts +2 -0
  17. package/dist/pro-detail-page/context/inner.d.ts +10 -0
  18. package/dist/pro-detail-page/context/inner.js +9 -0
  19. package/dist/pro-detail-page/hooks/use-fetch-detail.d.ts +11 -0
  20. package/dist/pro-detail-page/hooks/use-fetch-detail.js +18 -0
  21. package/dist/pro-detail-page/hooks/use-props.d.ts +9 -0
  22. package/dist/pro-detail-page/hooks/use-props.js +12 -0
  23. package/dist/pro-detail-page/index.d.ts +3 -0
  24. package/dist/pro-detail-page/index.js +7 -0
  25. package/dist/pro-detail-page/index.module.scss.js +7 -0
  26. package/dist/pro-detail-page/types.d.ts +3 -0
  27. package/dist/pro-edit-page/ProEditPage.d.ts +3 -0
  28. package/dist/pro-edit-page/ProEditPage.js +11 -0
  29. package/dist/pro-edit-page/StableProTextArea.d.ts +8 -0
  30. package/dist/pro-edit-page/StableProTextArea.js +47 -0
  31. package/dist/pro-edit-page/bridge/form.d.ts +6 -0
  32. package/dist/pro-edit-page/bridge/form.js +15 -0
  33. package/dist/pro-edit-page/components/cancel-button.d.ts +2 -0
  34. package/dist/pro-edit-page/components/cancel-button.js +10 -0
  35. package/dist/pro-edit-page/components/index.d.ts +3 -0
  36. package/dist/pro-edit-page/components/stash-button.d.ts +2 -0
  37. package/dist/pro-edit-page/components/stash-button.js +22 -0
  38. package/dist/pro-edit-page/components/submit-button.d.ts +2 -0
  39. package/dist/pro-edit-page/components/submit-button.js +22 -0
  40. package/dist/pro-edit-page/context/entry.d.ts +27 -0
  41. package/dist/pro-edit-page/context/entry.js +37 -0
  42. package/dist/pro-edit-page/context/index.d.ts +2 -0
  43. package/dist/pro-edit-page/context/inner.d.ts +9 -0
  44. package/dist/pro-edit-page/context/inner.js +16 -0
  45. package/dist/pro-edit-page/hooks/use-detail-load.d.ts +11 -0
  46. package/dist/pro-edit-page/hooks/use-detail-load.js +23 -0
  47. package/dist/pro-edit-page/hooks/use-props.d.ts +31 -0
  48. package/dist/pro-edit-page/hooks/use-props.js +24 -0
  49. package/dist/pro-edit-page/hooks/use-stash-action.d.ts +9 -0
  50. package/dist/pro-edit-page/hooks/use-stash-action.js +19 -0
  51. package/dist/pro-edit-page/hooks/use-submit-action.d.ts +9 -0
  52. package/dist/pro-edit-page/hooks/use-submit-action.js +19 -0
  53. package/dist/pro-edit-page/index.d.ts +7 -0
  54. package/dist/pro-edit-page/index.js +19 -0
  55. package/dist/pro-edit-page/index.module.scss.js +11 -0
  56. package/dist/pro-edit-page/types.d.ts +27 -0
  57. package/dist/pro-edit-page/utils/resolve-form-data.d.ts +13 -0
  58. package/dist/pro-edit-page/utils/resolve-form-data.js +10 -0
  59. package/dist/pro-form-drawer/entry.d.ts +12 -0
  60. package/dist/pro-form-drawer/entry.js +23 -0
  61. package/dist/pro-form-drawer/index.d.ts +1 -0
  62. package/dist/pro-form-drawer/index.js +7 -0
  63. package/dist/pro-form-drawer/index.module.scss.js +9 -0
  64. package/dist/pro-list-page/ProListPage.d.ts +3 -0
  65. package/dist/pro-list-page/ProListPage.js +11 -0
  66. package/dist/pro-list-page/bridge/index.d.ts +2 -0
  67. package/dist/pro-list-page/bridge/query-filter.d.ts +23 -0
  68. package/dist/pro-list-page/bridge/query-filter.js +146 -0
  69. package/dist/pro-list-page/bridge/table.d.ts +7 -0
  70. package/dist/pro-list-page/bridge/table.js +62 -0
  71. package/dist/pro-list-page/context/entry.d.ts +24 -0
  72. package/dist/pro-list-page/context/entry.js +42 -0
  73. package/dist/pro-list-page/context/index.d.ts +2 -0
  74. package/dist/pro-list-page/context/inner.d.ts +10 -0
  75. package/dist/pro-list-page/context/inner.js +16 -0
  76. package/dist/pro-list-page/hooks/use-fetch-list.d.ts +25 -0
  77. package/dist/pro-list-page/hooks/use-fetch-list.js +64 -0
  78. package/dist/pro-list-page/hooks/use-filter-height.d.ts +7 -0
  79. package/dist/pro-list-page/hooks/use-filter-height.js +22 -0
  80. package/dist/pro-list-page/hooks/use-props.d.ts +9 -0
  81. package/dist/pro-list-page/hooks/use-props.js +16 -0
  82. package/dist/pro-list-page/index.d.ts +6 -0
  83. package/dist/pro-list-page/index.js +16 -0
  84. package/dist/pro-list-page/index.module.scss.js +7 -0
  85. package/dist/pro-list-page/query-filter-picker-overlay.d.ts +23 -0
  86. package/dist/pro-list-page/query-filter-picker-overlay.js +8 -0
  87. package/dist/pro-list-page/types.d.ts +8 -0
  88. package/dist/pro-stat-page/entry.d.ts +30 -0
  89. package/dist/pro-stat-page/entry.js +101 -0
  90. package/dist/pro-stat-page/index.d.ts +1 -0
  91. package/dist/pro-stat-page/index.js +8 -0
  92. package/dist/pro-stat-page/index.module.scss.js +31 -0
  93. package/dist/pro-table-page/entry.d.ts +17 -0
  94. package/dist/pro-table-page/entry.js +70 -0
  95. package/dist/pro-table-page/index.d.ts +1 -0
  96. package/dist/pro-table-page/index.js +8 -0
  97. package/dist/pro-table-page/index.module.scss.js +23 -0
  98. package/dist/pro-tree-split-page/entry.d.ts +20 -0
  99. package/dist/pro-tree-split-page/entry.js +107 -0
  100. package/dist/pro-tree-split-page/index.d.ts +1 -0
  101. package/dist/pro-tree-split-page/index.js +6 -0
  102. package/dist/pro-tree-split-page/index.module.scss.js +25 -0
  103. package/dist/schema-field-map/StableProCheckSelect.d.ts +9 -0
  104. package/dist/schema-field-map/StableProCheckSelect.js +16 -0
  105. package/dist/schema-field-map/field-map.d.ts +9 -0
  106. package/dist/schema-field-map/field-map.js +33 -0
  107. package/dist/schema-field-map/index.d.ts +2 -0
  108. package/dist/styles.css +1 -0
  109. package/dist/typical-page-host/index.d.ts +18 -0
  110. package/dist/typical-page-host/index.js +40 -0
  111. package/package.json +101 -0
@@ -0,0 +1,101 @@
1
+ import { jsx as t, jsxs as C } from "react/jsx-runtime";
2
+ import { useRef as P, useState as S, useLayoutEffect as T, useEffect as L } from "react";
3
+ import x from "@hi-ui/ellipsis-tooltip";
4
+ import { PageHeader as H } from "@hi-ui/hiui";
5
+ import { ProListPage as $ } from "../pro-list-page/ProListPage.js";
6
+ import { useProListPageContext as B } from "../pro-list-page/context/entry.js";
7
+ import { TypicalPageHeaderPortal as O } from "../typical-page-host/index.js";
8
+ import i from "./index.module.scss.js";
9
+ import { QueryFilter as E } from "../pro-list-page/bridge/query-filter.js";
10
+ import { Table as M } from "../pro-list-page/bridge/table.js";
11
+ function I(r) {
12
+ const a = r != null && r !== "" ? String(r) : "—";
13
+ return /* @__PURE__ */ t("div", { className: i.tableCellTextEllipsis, children: /* @__PURE__ */ t(x, { numberOfLines: 1, children: a }) });
14
+ }
15
+ function z(r, a, c) {
16
+ return r <= 0 ? 0 : r * a + (r - 1) * c;
17
+ }
18
+ function J({
19
+ request: r,
20
+ minCardWidth: a = 100,
21
+ cardGap: c = 12,
22
+ renderCard: p,
23
+ getKey: g
24
+ }) {
25
+ const [l, v] = S([]), [d, N] = S(0), u = P(null);
26
+ L(() => {
27
+ r().then((e) => v(e.list)).catch(() => v([]));
28
+ }, [r]), T(() => {
29
+ const e = u.current;
30
+ if (!e) return;
31
+ const s = () => N(Math.round(e.getBoundingClientRect().width));
32
+ s();
33
+ const y = new ResizeObserver(s);
34
+ return y.observe(e), () => y.disconnect();
35
+ }, [l.length]);
36
+ const n = l.length, b = z(n, a, c), o = d === 0 || b <= d, f = o ? n : Math.ceil(n / 2), h = o ? 0 : f * 2 - n, m = {
37
+ gridTemplateColumns: `repeat(${f}, minmax(${a}px, 1fr))`
38
+ };
39
+ return n === 0 ? null : /* @__PURE__ */ C("div", { ref: u, className: i.statCards, style: m, children: [
40
+ l.map(
41
+ (e, s) => p ? /* @__PURE__ */ t("div", { children: p(e) }, g?.(e, s) ?? `${e.title}-${s}`) : /* @__PURE__ */ C("div", { className: i.statCard, children: [
42
+ /* @__PURE__ */ t(x, { className: i.statCardTitle, numberOfLines: 1, children: e.title }),
43
+ /* @__PURE__ */ t("div", { className: i.statCardValue, children: typeof e.value == "number" ? e.value.toLocaleString("zh-CN") : e.value ?? "—" })
44
+ ] }, g?.(e, s) ?? `${e.title}-${s}`)
45
+ ),
46
+ h > 0 && Array.from({ length: h }, (e, s) => /* @__PURE__ */ t("div", { className: i.statCardPlaceholder, "aria-hidden": !0 }, `stat-grid-slot-${s}`))
47
+ ] });
48
+ }
49
+ function U({
50
+ title: r,
51
+ extra: a,
52
+ queryFields: c,
53
+ tableFields: p,
54
+ searchPlaceholder: g,
55
+ statSection: l,
56
+ tableProps: v
57
+ }) {
58
+ const { listData: d, isListDataLoading: N } = B(), u = P(null), [n, b] = S(void 0);
59
+ return T(() => {
60
+ const o = u.current;
61
+ if (!o) return;
62
+ const f = () => {
63
+ const m = o.clientHeight;
64
+ if (m <= 0) return;
65
+ const e = o.querySelector(".hi-v5-table");
66
+ if (!e) {
67
+ b(Math.max(120, m - 80));
68
+ return;
69
+ }
70
+ const s = e.querySelector(".hi-v5-table-footer"), y = e.querySelector(".hi-v5-table__wrapper");
71
+ let R = 0;
72
+ const w = y?.firstElementChild;
73
+ w && (R += w.offsetHeight), s && (R += s.offsetHeight), b(Math.max(80, m - R));
74
+ };
75
+ f();
76
+ const h = new ResizeObserver(f);
77
+ return h.observe(o), () => h.disconnect();
78
+ }, [d.list.length, d.total, N]), /* @__PURE__ */ t("div", { className: `pro-stat-page ${i.statPageRoot}`, children: /* @__PURE__ */ C($, { queryFields: c, tableFields: p, children: [
79
+ /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(H, { className: i.pageHeader, title: r, extra: a }) }),
80
+ /* @__PURE__ */ C("div", { className: i.whiteBody, children: [
81
+ l ? /* @__PURE__ */ t("div", { className: i.statRow, children: l }) : null,
82
+ /* @__PURE__ */ t("div", { className: i.filterContainer, children: /* @__PURE__ */ t(E, { searchPlaceholder: g }) }),
83
+ /* @__PURE__ */ t("div", { ref: u, className: i.tableContainer, children: /* @__PURE__ */ t(
84
+ M,
85
+ {
86
+ ...n != null ? { maxHeight: n } : {},
87
+ stickyTop: 0,
88
+ size: "md",
89
+ striped: !1,
90
+ ...v
91
+ }
92
+ ) })
93
+ ] })
94
+ ] }) });
95
+ }
96
+ export {
97
+ U as StatListPageFrame,
98
+ J as StatOverviewGrid,
99
+ i as proStatPageStyles,
100
+ I as renderStatTableTextEllipsis
101
+ };
@@ -0,0 +1 @@
1
+ export { StatListPageFrame, StatOverviewGrid, proStatPageStyles, renderStatTableTextEllipsis, } from './entry';
@@ -0,0 +1,8 @@
1
+ import { StatListPageFrame as a, StatOverviewGrid as r, renderStatTableTextEllipsis as i } from "./entry.js";
2
+ import { default as o } from "./index.module.scss.js";
3
+ export {
4
+ a as StatListPageFrame,
5
+ r as StatOverviewGrid,
6
+ o as proStatPageStyles,
7
+ i as renderStatTableTextEllipsis
8
+ };
@@ -0,0 +1,31 @@
1
+ const t = "_statPageRoot_2ebon_1", a = "_pageHeader_2ebon_22", e = "_headerExtra_2ebon_36", o = "_whiteBody_2ebon_40", s = "_statRow_2ebon_50", n = "_filterContainer_2ebon_55", _ = "_tableContainer_2ebon_68", r = "_statCards_2ebon_81", l = "_statCard_2ebon_81", d = "_statCardTitle_2ebon_99", C = "_statCardValue_2ebon_109", i = "_statCardPlaceholder_2ebon_119", b = "_tableCellTextEllipsis_2ebon_125", c = {
2
+ statPageRoot: t,
3
+ pageHeader: a,
4
+ headerExtra: e,
5
+ whiteBody: o,
6
+ statRow: s,
7
+ filterContainer: n,
8
+ tableContainer: _,
9
+ statCards: r,
10
+ statCard: l,
11
+ statCardTitle: d,
12
+ statCardValue: C,
13
+ statCardPlaceholder: i,
14
+ tableCellTextEllipsis: b
15
+ };
16
+ export {
17
+ c as default,
18
+ n as filterContainer,
19
+ e as headerExtra,
20
+ a as pageHeader,
21
+ l as statCard,
22
+ i as statCardPlaceholder,
23
+ d as statCardTitle,
24
+ C as statCardValue,
25
+ r as statCards,
26
+ t as statPageRoot,
27
+ s as statRow,
28
+ b as tableCellTextEllipsis,
29
+ _ as tableContainer,
30
+ o as whiteBody
31
+ };
@@ -0,0 +1,17 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import type { FieldConfigType } from '@hi-ui/schema-core';
3
+ import { Table } from '../pro-list-page';
4
+ import styles from './index.module.scss';
5
+ export declare function renderTableTextEllipsis(cellValue: unknown): import("react/jsx-runtime").JSX.Element;
6
+ export declare function renderTreeTableTextEllipsis(cellValue: unknown): import("react/jsx-runtime").JSX.Element;
7
+ type TablePageFrameProps = {
8
+ title: string;
9
+ extra?: ReactNode;
10
+ queryFields: FieldConfigType[];
11
+ tableFields: FieldConfigType[];
12
+ searchPlaceholder: string;
13
+ tableProps?: Partial<ComponentProps<typeof Table>>;
14
+ children?: ReactNode;
15
+ };
16
+ export declare function TablePageFrame({ title, extra, queryFields, tableFields, searchPlaceholder, tableProps, children, }: TablePageFrameProps): import("react/jsx-runtime").JSX.Element;
17
+ export { styles as proTablePageStyles };
@@ -0,0 +1,70 @@
1
+ import { jsx as e, jsxs as b } from "react/jsx-runtime";
2
+ import { useRef as C, useState as N, useLayoutEffect as B } from "react";
3
+ import E from "@hi-ui/ellipsis-tooltip";
4
+ import { PageHeader as L } from "@hi-ui/hiui";
5
+ import { ProListPage as S } from "../pro-list-page/ProListPage.js";
6
+ import { useProListPageContext as R } from "../pro-list-page/context/entry.js";
7
+ import { TypicalPageHeaderPortal as w } from "../typical-page-host/index.js";
8
+ import r from "./index.module.scss.js";
9
+ import { QueryFilter as M } from "../pro-list-page/bridge/query-filter.js";
10
+ import { Table as q } from "../pro-list-page/bridge/table.js";
11
+ function F(t) {
12
+ const o = t != null && t !== "" ? String(t) : "—";
13
+ return /* @__PURE__ */ e("div", { className: r.tableCellTextEllipsis, children: /* @__PURE__ */ e(E, { numberOfLines: 1, children: o }) });
14
+ }
15
+ function I(t) {
16
+ return /* @__PURE__ */ e("div", { className: r.treeTableCellText, children: F(t) });
17
+ }
18
+ function J({
19
+ title: t,
20
+ extra: o,
21
+ queryFields: g,
22
+ tableFields: T,
23
+ searchPlaceholder: v,
24
+ tableProps: x,
25
+ children: y
26
+ }) {
27
+ const { listData: n, isListDataLoading: H } = R(), c = C(null), [m, d] = N(void 0);
28
+ return B(() => {
29
+ const i = c.current;
30
+ if (!i) return;
31
+ const f = () => {
32
+ const a = i.clientHeight;
33
+ if (a <= 0) return;
34
+ const s = i.querySelector(".hi-v5-table");
35
+ if (!s) {
36
+ d(Math.max(120, a - 80));
37
+ return;
38
+ }
39
+ const h = s.querySelector(".hi-v5-table-footer"), P = s.querySelector(".hi-v5-table__wrapper");
40
+ let l = 0;
41
+ const u = P?.firstElementChild;
42
+ u && (l += u.offsetHeight), h && (l += h.offsetHeight), d(Math.max(80, a - l));
43
+ };
44
+ f();
45
+ const p = new ResizeObserver(f);
46
+ return p.observe(i), () => p.disconnect();
47
+ }, [n.list.length, n.total, H]), /* @__PURE__ */ e("div", { className: `pro-table-page ${r.pageRoot}`, children: /* @__PURE__ */ b(S, { queryFields: g, tableFields: T, children: [
48
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(L, { className: r.pageHeader, title: t, extra: o }) }),
49
+ /* @__PURE__ */ b("div", { className: r.whiteBody, children: [
50
+ /* @__PURE__ */ e("div", { className: r.filterContainer, children: /* @__PURE__ */ e(M, { searchPlaceholder: v }) }),
51
+ /* @__PURE__ */ e("div", { ref: c, className: r.tableContainer, children: /* @__PURE__ */ e(
52
+ q,
53
+ {
54
+ ...m != null ? { maxHeight: m } : {},
55
+ stickyTop: 0,
56
+ size: "md",
57
+ striped: !1,
58
+ ...x
59
+ }
60
+ ) })
61
+ ] }),
62
+ y
63
+ ] }) });
64
+ }
65
+ export {
66
+ J as TablePageFrame,
67
+ r as proTablePageStyles,
68
+ F as renderTableTextEllipsis,
69
+ I as renderTreeTableTextEllipsis
70
+ };
@@ -0,0 +1 @@
1
+ export { TablePageFrame, proTablePageStyles, renderTableTextEllipsis, renderTreeTableTextEllipsis, } from './entry';
@@ -0,0 +1,8 @@
1
+ import { TablePageFrame as l, renderTableTextEllipsis as a, renderTreeTableTextEllipsis as T } from "./entry.js";
2
+ import { default as t } from "./index.module.scss.js";
3
+ export {
4
+ l as TablePageFrame,
5
+ t as proTablePageStyles,
6
+ a as renderTableTextEllipsis,
7
+ T as renderTreeTableTextEllipsis
8
+ };
@@ -0,0 +1,23 @@
1
+ const e = "_pageRoot_1seat_1", t = "_pageHeader_1seat_22", a = "_headerExtra_1seat_36", l = "_whiteBody_1seat_40", o = "_filterContainer_1seat_50", r = "_tableContainer_1seat_63", s = "_tableCellTextEllipsis_1seat_76", _ = "_treeSwitcherCol_1seat_81", n = "_treeTableCellText_1seat_89", i = {
2
+ pageRoot: e,
3
+ pageHeader: t,
4
+ headerExtra: a,
5
+ whiteBody: l,
6
+ filterContainer: o,
7
+ tableContainer: r,
8
+ tableCellTextEllipsis: s,
9
+ treeSwitcherCol: _,
10
+ treeTableCellText: n
11
+ };
12
+ export {
13
+ i as default,
14
+ o as filterContainer,
15
+ a as headerExtra,
16
+ t as pageHeader,
17
+ e as pageRoot,
18
+ s as tableCellTextEllipsis,
19
+ r as tableContainer,
20
+ _ as treeSwitcherCol,
21
+ n as treeTableCellText,
22
+ l as whiteBody
23
+ };
@@ -0,0 +1,20 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import type { FieldConfigType } from '@hi-ui/schema-core';
3
+ import { Table } from '../pro-list-page';
4
+ import styles from './index.module.scss';
5
+ type TreeSplitPageFrameProps = {
6
+ title: string;
7
+ extra?: ReactNode;
8
+ queryFields: FieldConfigType[];
9
+ tableFields: FieldConfigType[];
10
+ searchPlaceholder: string;
11
+ leftPane: ReactNode;
12
+ defaultLeftWidth?: number;
13
+ minLeftWidth?: number;
14
+ maxLeftWidth?: number;
15
+ storageKey?: string;
16
+ tableProps?: Partial<ComponentProps<typeof Table>>;
17
+ children?: ReactNode;
18
+ };
19
+ export declare function TreeSplitPageFrame({ title, extra, queryFields, tableFields, searchPlaceholder, leftPane, defaultLeftWidth, minLeftWidth, maxLeftWidth, storageKey, tableProps, children, }: TreeSplitPageFrameProps): import("react/jsx-runtime").JSX.Element;
20
+ export { styles as proTreeSplitPageStyles };
@@ -0,0 +1,107 @@
1
+ import { jsx as e, jsxs as S } from "react/jsx-runtime";
2
+ import { useRef as R, useState as w, useMemo as F, useLayoutEffect as q } from "react";
3
+ import { PageHeader as X } from "@hi-ui/hiui";
4
+ import { ProListPage as j } from "../pro-list-page/ProListPage.js";
5
+ import { useProListPageContext as z } from "../pro-list-page/context/entry.js";
6
+ import { TypicalPageHeaderPortal as I } from "../typical-page-host/index.js";
7
+ import t from "./index.module.scss.js";
8
+ import { QueryFilter as Q } from "../pro-list-page/bridge/query-filter.js";
9
+ import { Table as _ } from "../pro-list-page/bridge/table.js";
10
+ function $(m, a, f, v) {
11
+ if (!m) return a;
12
+ try {
13
+ const u = localStorage.getItem(m), d = u ? Number(u) : Number.NaN;
14
+ return Number.isFinite(d) ? Math.min(v, Math.max(f, d)) : a;
15
+ } catch {
16
+ return a;
17
+ }
18
+ }
19
+ function Z({
20
+ title: m,
21
+ extra: a,
22
+ queryFields: f,
23
+ tableFields: v,
24
+ searchPlaceholder: u,
25
+ leftPane: d,
26
+ defaultLeftWidth: C = 200,
27
+ minLeftWidth: g = 120,
28
+ maxLeftWidth: b = 560,
29
+ storageKey: h,
30
+ tableProps: T,
31
+ children: B
32
+ }) {
33
+ const { listData: y, isListDataLoading: E } = z(), M = R(null), [x, H] = w(void 0), [n, L] = w(
34
+ () => $(h, C, g, b)
35
+ ), D = F(
36
+ () => (r) => {
37
+ r.preventDefault();
38
+ const p = r.clientX, s = n;
39
+ let o = s;
40
+ const i = (N) => {
41
+ const c = N.clientX - p;
42
+ o = Math.min(b, Math.max(g, s + c)), L(o);
43
+ }, l = () => {
44
+ if (document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", l), !!h)
45
+ try {
46
+ localStorage.setItem(h, String(o));
47
+ } catch {
48
+ }
49
+ };
50
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", l);
51
+ },
52
+ [n, b, g, h]
53
+ );
54
+ return q(() => {
55
+ const r = M.current;
56
+ if (!r) return;
57
+ const p = () => {
58
+ const o = r.clientHeight;
59
+ if (o <= 0) return;
60
+ const i = r.querySelector(".hi-v5-table");
61
+ if (!i) {
62
+ H(Math.max(120, o - 80));
63
+ return;
64
+ }
65
+ const l = i.querySelector(".hi-v5-table-footer"), N = i.querySelector(".hi-v5-table__wrapper");
66
+ let c = 0;
67
+ const P = N?.firstElementChild;
68
+ P && (c += P.offsetHeight), l && (c += l.offsetHeight), H(Math.max(80, o - c));
69
+ };
70
+ p();
71
+ const s = new ResizeObserver(p);
72
+ return s.observe(r), () => s.disconnect();
73
+ }, [n, y.list.length, y.total, E]), /* @__PURE__ */ e("div", { className: `pro-tree-split-page ${t.pageRoot}`, children: /* @__PURE__ */ S(j, { queryFields: f, tableFields: v, children: [
74
+ /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(X, { className: t.pageHeader, title: m, extra: a }) }),
75
+ /* @__PURE__ */ e("div", { className: t.whiteBody, children: /* @__PURE__ */ S("div", { className: t.mainSplit, children: [
76
+ /* @__PURE__ */ e("div", { className: t.leftColumn, style: { flex: `0 0 ${n}px`, width: n }, children: d }),
77
+ /* @__PURE__ */ e(
78
+ "div",
79
+ {
80
+ className: t.splitter,
81
+ role: "separator",
82
+ "aria-orientation": "vertical",
83
+ "aria-label": "拖动调节左侧宽度",
84
+ onMouseDown: D
85
+ }
86
+ ),
87
+ /* @__PURE__ */ S("div", { className: t.rightColumn, children: [
88
+ /* @__PURE__ */ e("div", { className: t.filterContainer, children: /* @__PURE__ */ e(Q, { searchPlaceholder: u }) }),
89
+ /* @__PURE__ */ e("div", { ref: M, className: t.tableContainer, children: /* @__PURE__ */ e(
90
+ _,
91
+ {
92
+ ...x != null ? { maxHeight: x } : {},
93
+ stickyTop: 0,
94
+ size: "md",
95
+ striped: !1,
96
+ ...T
97
+ }
98
+ ) })
99
+ ] })
100
+ ] }) }),
101
+ B
102
+ ] }) });
103
+ }
104
+ export {
105
+ Z as TreeSplitPageFrame,
106
+ t as proTreeSplitPageStyles
107
+ };
@@ -0,0 +1 @@
1
+ export { TreeSplitPageFrame, proTreeSplitPageStyles } from './entry';
@@ -0,0 +1,6 @@
1
+ import { TreeSplitPageFrame as t } from "./entry.js";
2
+ import { default as o } from "./index.module.scss.js";
3
+ export {
4
+ t as TreeSplitPageFrame,
5
+ o as proTreeSplitPageStyles
6
+ };
@@ -0,0 +1,25 @@
1
+ const e = "_pageRoot_15vey_1", t = "_pageHeader_15vey_22", o = "_headerExtra_15vey_36", n = "_whiteBody_15vey_40", _ = "_mainSplit_15vey_50", a = "_leftColumn_15vey_58", r = "_splitter_15vey_68", i = "_rightColumn_15vey_93", l = "_filterContainer_15vey_101", s = "_tableContainer_15vey_111", y = {
2
+ pageRoot: e,
3
+ pageHeader: t,
4
+ headerExtra: o,
5
+ whiteBody: n,
6
+ mainSplit: _,
7
+ leftColumn: a,
8
+ splitter: r,
9
+ rightColumn: i,
10
+ filterContainer: l,
11
+ tableContainer: s
12
+ };
13
+ export {
14
+ y as default,
15
+ l as filterContainer,
16
+ o as headerExtra,
17
+ a as leftColumn,
18
+ _ as mainSplit,
19
+ t as pageHeader,
20
+ e as pageRoot,
21
+ i as rightColumn,
22
+ r as splitter,
23
+ s as tableContainer,
24
+ n as whiteBody
25
+ };
@@ -0,0 +1,9 @@
1
+ import { ProCheckSelect } from '@hi-ui/schema-fields/bundle';
2
+ /**
3
+ * Schema 表单内 CheckSelect:TagInputMock 依赖 ResizeDetector 量宽。
4
+ * 在 Grid + flex 链上宽度不稳定时,内联 maxWidth 会把标签文案裁成只剩关闭图标或计数。
5
+ * 默认开启 wrap,样式层再兜底覆盖异常的内联 maxWidth。
6
+ */
7
+ export declare class StableProCheckSelect extends ProCheckSelect {
8
+ getSelfFieldProps(ctx: Parameters<ProCheckSelect['getSelfFieldProps']>[0]): ReturnType<ProCheckSelect['getSelfFieldProps']>;
9
+ }
@@ -0,0 +1,16 @@
1
+ import { ProCheckSelect as o } from "@hi-ui/schema-fields/bundle";
2
+ class P extends o {
3
+ getSelfFieldProps(t) {
4
+ const e = super.getSelfFieldProps(t), r = e.fieldProps, s = r.tagInputProps ?? {};
5
+ return {
6
+ ...e,
7
+ fieldProps: {
8
+ ...r,
9
+ tagInputProps: { wrap: !0, ...s }
10
+ }
11
+ };
12
+ }
13
+ }
14
+ export {
15
+ P as StableProCheckSelect
16
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ProFieldMapType } from '@hi-ui/schema-fields';
3
+ export declare const typicalPageFieldMap: Partial<ProFieldMapType>;
4
+ export declare function useTypicalPageFieldMap(): ProFieldMapType;
5
+ type TypicalPageFieldMapProviderProps = React.PropsWithChildren<{
6
+ fields?: Partial<ProFieldMapType>;
7
+ }>;
8
+ export declare function TypicalPageFieldMapProvider(props: TypicalPageFieldMapProviderProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,33 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import r from "react";
3
+ import { FieldMapProvider as l } from "@hi-ui/schema-fields";
4
+ import { ProUpload as c, ProNumber as d, ProRadio as m, ProDate as n, ProSelect as p, ProText as P } from "@hi-ui/schema-fields/bundle";
5
+ import { StableProTextArea as f } from "../pro-edit-page/StableProTextArea.js";
6
+ import { StableProCheckSelect as u } from "./StableProCheckSelect.js";
7
+ const i = {
8
+ text: P,
9
+ select: p,
10
+ date: n,
11
+ radio: m,
12
+ number: d,
13
+ upload: c,
14
+ textarea: f,
15
+ "check-select": u
16
+ }, a = r.createContext(
17
+ i
18
+ );
19
+ function T() {
20
+ return r.useContext(a);
21
+ }
22
+ function b(e) {
23
+ const t = r.useMemo(
24
+ () => ({ ...i, ...e.fields }),
25
+ [e.fields]
26
+ );
27
+ return /* @__PURE__ */ o(a.Provider, { value: t, children: /* @__PURE__ */ o(l, { fields: t, children: e.children }) });
28
+ }
29
+ export {
30
+ b as TypicalPageFieldMapProvider,
31
+ i as typicalPageFieldMap,
32
+ T as useTypicalPageFieldMap
33
+ };
@@ -0,0 +1,2 @@
1
+ export { StableProCheckSelect } from './StableProCheckSelect';
2
+ export { typicalPageFieldMap, TypicalPageFieldMapProvider, useTypicalPageFieldMap } from './field-map';
@@ -0,0 +1 @@
1
+ @charset "UTF-8";._pageContainer_p6ji9_3{display:flex;flex-direction:column;flex:1 1 0%;align-self:stretch;min-height:0;min-width:0;width:100%;overflow:hidden;border-radius:12px 12px 0 0;background-color:#fff}._formScrollBody_p6ji9_2{flex:1 1 0%;min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto}._inlineEditFooter_p6ji9_29{flex:0 0 auto;z-index:5;display:flex;justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box;padding:12px 20px;background-color:#fff;border-top:1px solid var(--hi-v5-color-gray-200, #e6e8eb)}.hi-v5-form.schema-form{--group-panel-gap: 16px}.hi-v5-form.schema-form .group-container[data-el-type=multiple]{gap:16px}.hi-v5-form.schema-form .hi-v5-form-label__content__control .hi-v5-picker.hi-v5-check-select{display:block;flex:1 1 auto;align-self:stretch;width:100%;max-width:100%;min-width:0;box-sizing:border-box}.hi-v5-form.schema-form .hi-v5-picker.hi-v5-check-select .hi-v5-tag-input-mock{display:flex!important;flex:1 1 auto!important;align-self:stretch;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box}.hi-v5-form.schema-form .hi-v5-picker.hi-v5-check-select .hi-v5-tag-input-mock__tags{flex:1 1 0%!important;min-width:0!important}.hi-v5-form.schema-form .hi-v5-picker.hi-v5-check-select .hi-v5-tag-input-mock__tag{flex-shrink:0;max-width:none!important}.hi-v5-form.schema-form .hi-v5-picker.hi-v5-check-select .hi-v5-tag-input-mock__tag-content{min-width:0;max-width:none!important;overflow:visible!important;text-overflow:clip!important}.pro-edit-page .hi-v5-textarea__text{min-height:108px!important}._pageContainer_8v012_1{width:100%;height:calc(100vh - 60px);overflow:auto;border-radius:12px 12px 0 0;background-color:#fff}._pageContainer_8v012_1>div.hi-v5-loading__wrapper{height:100%;overflow:auto}.schema-descriptions.hi-v5-descriptions--placement-vertical.hi-v5-descriptions--label-placement-left .hi-v5-descriptions-item__label{text-align:left}._pageContainer_4xrht_1{width:100%;height:calc(100vh - 60px);overflow:auto;border-radius:12px 12px 0 0;background-color:#fff}._pageContainer_4xrht_1 .pro-list-page__table .hi-v5-table-footer{position:sticky;bottom:0}._drawerRoot_tuec2_1.hi-v5-drawer .hi-v5-drawer__header{padding:16px 20px;border-bottom:1px solid #edeff2}._drawerRoot_tuec2_1.hi-v5-drawer .hi-v5-drawer__body{padding:12px 20px 20px;box-sizing:border-box}._drawerRoot_tuec2_1.hi-v5-drawer .hi-v5-drawer__footer{border-block-start:none;border-top:none;box-shadow:none;padding:0 20px 20px}._drawerFooterActions_tuec2_16{display:flex;justify-content:flex-end;align-items:center;gap:12px;width:100%}._drawerRoot_o6l0g_1.hi-v5-drawer .hi-v5-drawer__header{padding:16px 20px;border-bottom:1px solid #edeff2}._drawerRoot_o6l0g_1.hi-v5-drawer .hi-v5-drawer__body{padding:12px 20px 20px;box-sizing:border-box}._drawerRoot_o6l0g_1.hi-v5-drawer .hi-v5-drawer__footer{border-block-start:none;border-top:none;box-shadow:none}._drawerRoot_o6l0g_1.hi-v5-drawer .hi-v5-descriptions--placement-vertical.hi-v5-descriptions--label-placement-left .hi-v5-descriptions-row>th{text-align:left}._drawerBody_o6l0g_18{min-height:120px}._pageRoot_1seat_1{background:#f5f8fc;box-sizing:border-box;display:flex;flex-direction:column;width:100%;flex:1 1 0%;min-height:0}._pageRoot_1seat_1 .pro-list-page{background:#f5f8fc;border-radius:0;box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0%;min-height:0;overflow-x:hidden;overflow-y:hidden}._pageHeader_1seat_22{background-color:#f5f8fc;box-sizing:border-box;min-height:60px;padding:0!important;display:flex;align-items:center}._pageHeader_1seat_22 .hi-v5-page-header__content{flex:1;min-width:0;gap:40px}._headerExtra_1seat_36 .hi-v5-space{gap:12px}._whiteBody_1seat_40{background:#fff;border-radius:12px 12px 0 0;overflow:hidden;flex:1;min-height:0;display:flex;flex-direction:column}._filterContainer_1seat_50{padding:20px 20px 16px;position:sticky;top:0;z-index:20;background:#fff;flex:0 0 auto}._filterContainer_1seat_50 .hi-v5-query-filter__row,._filterContainer_1seat_50 .hi-v5-form-item{gap:8px}._tableContainer_1seat_63{padding:0 20px;flex:1 1 0%;min-height:0;overflow:hidden}._tableContainer_1seat_63 .hi-v5-table__wrapper{border-block-start:none}._tableContainer_1seat_63 .hi-v5-table__wrapper>div[data-sticky]{border-block-start:var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-300, #e6e8eb)}._tableCellTextEllipsis_1seat_76{min-width:0;max-width:min(360px,100%)}._tableContainer_1seat_63 .hi-v5-table-body tr td._treeSwitcherCol_1seat_81{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;min-width:0}._treeTableCellText_1seat_89{min-width:0;flex:1 1 0;overflow:hidden}._statPageRoot_2ebon_1{background:#f5f8fc;box-sizing:border-box;display:flex;flex-direction:column;width:100%;flex:1 1 0%;min-height:0}._statPageRoot_2ebon_1 .pro-list-page{background:#f5f8fc;border-radius:0;box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0%;min-height:0;overflow-x:hidden;overflow-y:hidden}._pageHeader_2ebon_22{background-color:#f5f8fc;box-sizing:border-box;min-height:60px;padding:0!important;display:flex;align-items:center}._pageHeader_2ebon_22 .hi-v5-page-header__content{flex:1;min-width:0;gap:40px}._headerExtra_2ebon_36 .hi-v5-space{gap:12px}._whiteBody_2ebon_40{background:#fff;border-radius:12px 12px 0 0;overflow:hidden;flex:1;min-height:0;display:flex;flex-direction:column}._statRow_2ebon_50{padding:20px 20px 0;flex:0 0 auto}._filterContainer_2ebon_55{padding:16px 20px;position:sticky;top:0;z-index:20;background:#fff;flex:0 0 auto}._filterContainer_2ebon_55 .hi-v5-query-filter__row,._filterContainer_2ebon_55 .hi-v5-form-item{gap:8px}._tableContainer_2ebon_68{padding:0 20px;flex:1 1 0%;min-height:0;overflow:hidden}._tableContainer_2ebon_68 .hi-v5-table__wrapper{border-block-start:none}._tableContainer_2ebon_68 .hi-v5-table__wrapper>div[data-sticky]{border-block-start:var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-300, #e6e8eb)}._statCards_2ebon_81{display:grid;gap:12px}._statCard_2ebon_81{box-sizing:border-box;min-width:100px;padding:16px;display:flex;flex-direction:column;gap:0;align-items:stretch;background:#fff;border:1px solid #edeff2;border-radius:8px}._statCardTitle_2ebon_99{margin:0;min-width:0;width:100%;font-size:14px;font-weight:400;line-height:22px;color:#1a1d26}._statCardValue_2ebon_109{margin:0;flex-shrink:0;font-size:24px;font-weight:700;line-height:32px;color:#1a1d26;font-family:"DIN Alternate","DIN","Helvetica Neue",var(--hi-v5-font-family, system-ui),sans-serif}._statCardPlaceholder_2ebon_119{min-width:0;min-height:0;pointer-events:none}._tableCellTextEllipsis_2ebon_125{min-width:0;max-width:min(360px,100%)}._pageRoot_15vey_1{background:#f5f8fc;box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0%;width:100%;min-height:0}._pageRoot_15vey_1 .pro-list-page{background:#f5f8fc;border-radius:0;box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0%;min-height:0;overflow-x:hidden;overflow-y:hidden}._pageHeader_15vey_22{background-color:#f5f8fc;box-sizing:border-box;min-height:60px;padding:0!important;display:flex;align-items:center}._pageHeader_15vey_22 .hi-v5-page-header__content{flex:1;min-width:0;gap:40px}._headerExtra_15vey_36 .hi-v5-space{gap:12px}._whiteBody_15vey_40{background:#fff;border-radius:12px 12px 0 0;overflow:hidden;flex:1;min-height:0;display:flex;flex-direction:column}._mainSplit_15vey_50{display:flex;flex-direction:row;align-items:stretch;flex:1;min-height:0}._leftColumn_15vey_58{flex:0 0 auto;box-sizing:border-box;padding:0 8px;display:flex;flex-direction:column;min-width:0;min-height:0}._splitter_15vey_68{flex:0 0 6px;width:6px;margin:0 -3px;cursor:col-resize;align-self:stretch;position:relative;z-index:2;background:transparent}._splitter_15vey_68:after{content:"";position:absolute;left:50%;top:0;bottom:0;width:1px;transform:translate(-50%);background:#edeff2}._splitter_15vey_68:hover:after,._splitter_15vey_68:focus-visible:after{background:#dfe2e8;width:2px}._rightColumn_15vey_93{flex:1 1 0%;min-width:0;min-height:0;display:flex;flex-direction:column}._filterContainer_15vey_101{padding:20px 20px 16px;flex:0 0 auto;background:#fff}._filterContainer_15vey_101 .hi-v5-query-filter__row,._filterContainer_15vey_101 .hi-v5-form-item{gap:8px}._tableContainer_15vey_111{padding:0 20px;flex:1 1 0%;min-height:0;overflow:hidden}._tableContainer_15vey_111 .hi-v5-table__wrapper{border-block-start:none}._tableContainer_15vey_111 .hi-v5-table__wrapper>div[data-sticky]{border-block-start:var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-300, #e6e8eb)}
@@ -0,0 +1,18 @@
1
+ import type { ComponentType, PropsWithChildren, ReactNode } from 'react';
2
+ export type TypicalPagePortalProps = {
3
+ children: ReactNode;
4
+ };
5
+ export type TypicalPagePortalComponent = ComponentType<TypicalPagePortalProps>;
6
+ type TypicalPageHostContextValue = {
7
+ HeaderPortal: TypicalPagePortalComponent;
8
+ FooterPortal: TypicalPagePortalComponent;
9
+ };
10
+ export type TypicalPageHostProviderProps = PropsWithChildren<{
11
+ headerPortal?: TypicalPagePortalComponent;
12
+ footerPortal?: TypicalPagePortalComponent;
13
+ }>;
14
+ export declare function TypicalPageHostProvider({ children, headerPortal, footerPortal, }: TypicalPageHostProviderProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function useTypicalPageHost(): TypicalPageHostContextValue;
16
+ export declare function TypicalPageHeaderPortal({ children }: TypicalPagePortalProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function TypicalPageFooterPortal({ children }: TypicalPagePortalProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,40 @@
1
+ import { jsx as r, Fragment as l } from "react/jsx-runtime";
2
+ import { useMemo as s, useContext as P, createContext as i } from "react";
3
+ function e({ children: t }) {
4
+ return /* @__PURE__ */ r(l, { children: t });
5
+ }
6
+ const p = {
7
+ HeaderPortal: e,
8
+ FooterPortal: e
9
+ }, n = i(p);
10
+ function g({
11
+ children: t,
12
+ headerPortal: o,
13
+ footerPortal: a
14
+ }) {
15
+ const c = s(
16
+ () => ({
17
+ HeaderPortal: o ?? e,
18
+ FooterPortal: a ?? e
19
+ }),
20
+ [a, o]
21
+ );
22
+ return /* @__PURE__ */ r(n.Provider, { value: c, children: t });
23
+ }
24
+ function u() {
25
+ return P(n);
26
+ }
27
+ function d({ children: t }) {
28
+ const { HeaderPortal: o } = u();
29
+ return /* @__PURE__ */ r(o, { children: t });
30
+ }
31
+ function m({ children: t }) {
32
+ const { FooterPortal: o } = u();
33
+ return /* @__PURE__ */ r(o, { children: t });
34
+ }
35
+ export {
36
+ m as TypicalPageFooterPortal,
37
+ d as TypicalPageHeaderPortal,
38
+ g as TypicalPageHostProvider,
39
+ u as useTypicalPageHost
40
+ };