@hkyhy/marsun-components-core 0.1.2
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 +99 -0
- package/dist/components/AgentHub/AgentHubAccessGuard.js +12 -0
- package/dist/components/AgentHub/AgentHubAccessGuard.js.map +1 -0
- package/dist/components/AgentHub/AgentHubIndexRedirect.js +11 -0
- package/dist/components/AgentHub/AgentHubIndexRedirect.js.map +1 -0
- package/dist/components/AgentHub/ChatSessionAccessGuard.js +11 -0
- package/dist/components/AgentHub/ChatSessionAccessGuard.js.map +1 -0
- package/dist/components/Auth/PermissionGuard.js +18 -0
- package/dist/components/Auth/PermissionGuard.js.map +1 -0
- package/dist/components/Auth/ProtectedRoute.js +21 -0
- package/dist/components/Auth/ProtectedRoute.js.map +1 -0
- package/dist/components/Auth/hasPermission.js +7 -0
- package/dist/components/Auth/hasPermission.js.map +1 -0
- package/dist/components/Descriptions/CommonDescriptions.js +14 -0
- package/dist/components/Descriptions/CommonDescriptions.js.map +1 -0
- package/dist/components/File/FileItem/index.js +82 -0
- package/dist/components/File/FileItem/index.js.map +1 -0
- package/dist/components/File/FileItem/style.module.scss.js +18 -0
- package/dist/components/File/FileItem/style.module.scss.js.map +1 -0
- package/dist/components/File/FileLink/index.js +27 -0
- package/dist/components/File/FileLink/index.js.map +1 -0
- package/dist/components/File/FileLink/style.module.scss.js +10 -0
- package/dist/components/File/FileLink/style.module.scss.js.map +1 -0
- package/dist/components/File/FilePreview/index.js +49 -0
- package/dist/components/File/FilePreview/index.js.map +1 -0
- package/dist/components/File/FilePreview/style.module.scss.js +5 -0
- package/dist/components/File/FilePreview/style.module.scss.js.map +1 -0
- package/dist/components/File/FilePreviewModal/index.js +12 -0
- package/dist/components/File/FilePreviewModal/index.js.map +1 -0
- package/dist/components/File/fileDisplay.js +67 -0
- package/dist/components/File/fileDisplay.js.map +1 -0
- package/dist/components/Filter/CommonFilter/index.js +81 -0
- package/dist/components/Filter/CommonFilter/index.js.map +1 -0
- package/dist/components/Filter/CommonFilter/style.module.scss.js +20 -0
- package/dist/components/Filter/CommonFilter/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterDateRange/index.js +97 -0
- package/dist/components/Filter/FilterDateRange/index.js.map +1 -0
- package/dist/components/Filter/FilterDateRange/style.module.scss.js +10 -0
- package/dist/components/Filter/FilterDateRange/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterInput/index.js +56 -0
- package/dist/components/Filter/FilterInput/index.js.map +1 -0
- package/dist/components/Filter/FilterNumberRange/index.js +81 -0
- package/dist/components/Filter/FilterNumberRange/index.js.map +1 -0
- package/dist/components/Filter/FilterNumberRange/style.module.scss.js +9 -0
- package/dist/components/Filter/FilterNumberRange/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterPanel/index.js +21 -0
- package/dist/components/Filter/FilterPanel/index.js.map +1 -0
- package/dist/components/Filter/FilterPanel/style.module.scss.js +8 -0
- package/dist/components/Filter/FilterPanel/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterPopover/index.js +52 -0
- package/dist/components/Filter/FilterPopover/index.js.map +1 -0
- package/dist/components/Filter/FilterSelect/index.js +160 -0
- package/dist/components/Filter/FilterSelect/index.js.map +1 -0
- package/dist/components/Filter/FilterSelect/style.module.scss.js +16 -0
- package/dist/components/Filter/FilterSelect/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterTreeSelect/index.js +249 -0
- package/dist/components/Filter/FilterTreeSelect/index.js.map +1 -0
- package/dist/components/Filter/FilterTreeSelect/style.module.scss.js +19 -0
- package/dist/components/Filter/FilterTreeSelect/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterTrigger/index.js +31 -0
- package/dist/components/Filter/FilterTrigger/index.js.map +1 -0
- package/dist/components/Filter/FilterTrigger/style.module.scss.js +10 -0
- package/dist/components/Filter/FilterTrigger/style.module.scss.js.map +1 -0
- package/dist/components/Filter/types.js +12 -0
- package/dist/components/Filter/types.js.map +1 -0
- package/dist/components/Filter/useFilterState.js +35 -0
- package/dist/components/Filter/useFilterState.js.map +1 -0
- package/dist/components/Form/FetchSelect.js +37 -0
- package/dist/components/Form/FetchSelect.js.map +1 -0
- package/dist/components/Form/FetchTreeSelect.js +28 -0
- package/dist/components/Form/FetchTreeSelect.js.map +1 -0
- package/dist/components/Form/PersonOptionRow/index.js +37 -0
- package/dist/components/Form/PersonOptionRow/index.js.map +1 -0
- package/dist/components/Form/PersonOptionRow/style.module.scss.js +11 -0
- package/dist/components/Form/PersonOptionRow/style.module.scss.js.map +1 -0
- package/dist/components/Form/StepForm.js +34 -0
- package/dist/components/Form/StepForm.js.map +1 -0
- package/dist/components/Icons/index.js +245 -0
- package/dist/components/Icons/index.js.map +1 -0
- package/dist/components/Layout/PageHeaderLayout/index.js +41 -0
- package/dist/components/Layout/PageHeaderLayout/index.js.map +1 -0
- package/dist/components/Layout/PageHeaderLayout/style.module.scss.js +10 -0
- package/dist/components/Layout/PageHeaderLayout/style.module.scss.js.map +1 -0
- package/dist/components/Modal/StepModal/index.js +64 -0
- package/dist/components/Modal/StepModal/index.js.map +1 -0
- package/dist/components/Modal/StepModal/style.module.scss.js +9 -0
- package/dist/components/Modal/StepModal/style.module.scss.js.map +1 -0
- package/dist/components/Stat/StatCard/index.js +34 -0
- package/dist/components/Stat/StatCard/index.js.map +1 -0
- package/dist/components/Stat/StatCard/style.module.scss.js +7 -0
- package/dist/components/Stat/StatCard/style.module.scss.js.map +1 -0
- package/dist/components/Stat/StatCardList.js +20 -0
- package/dist/components/Stat/StatCardList.js.map +1 -0
- package/dist/components/Stat/StatPendingBreakdown/index.js +38 -0
- package/dist/components/Stat/StatPendingBreakdown/index.js.map +1 -0
- package/dist/components/Stat/StatPendingBreakdown/style.module.scss.js +9 -0
- package/dist/components/Stat/StatPendingBreakdown/style.module.scss.js.map +1 -0
- package/dist/components/Tag/FileTags.js +8 -0
- package/dist/components/Tag/FileTags.js.map +1 -0
- package/dist/components/Tag/SemanticTag.js +92 -0
- package/dist/components/Tag/SemanticTag.js.map +1 -0
- package/dist/components/Tag/Tags/index.js +32 -0
- package/dist/components/Tag/Tags/index.js.map +1 -0
- package/dist/components/Tag/Tags/style.module.scss.js +9 -0
- package/dist/components/Tag/Tags/style.module.scss.js.map +1 -0
- package/dist/components/TooltipInfo/TooltipInfo.js +31 -0
- package/dist/components/TooltipInfo/TooltipInfo.js.map +1 -0
- package/dist/components/Tour/AppTour/index.js +40 -0
- package/dist/components/Tour/AppTour/index.js.map +1 -0
- package/dist/components/Tour/AppTour/style.module.scss.js +7 -0
- package/dist/components/Tour/AppTour/style.module.scss.js.map +1 -0
- package/dist/components/VirtualScrollbar/VirtualScrollbar/index.js +97 -0
- package/dist/components/VirtualScrollbar/VirtualScrollbar/index.js.map +1 -0
- package/dist/components/VirtualScrollbar/VirtualScrollbar/style.module.scss.js +12 -0
- package/dist/components/VirtualScrollbar/VirtualScrollbar/style.module.scss.js.map +1 -0
- package/dist/components/VirtualScrollbar/useVirtualScrollbar.js +97 -0
- package/dist/components/VirtualScrollbar/useVirtualScrollbar.js.map +1 -0
- package/dist/hooks/useFetchData.js +69 -0
- package/dist/hooks/useFetchData.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +182 -0
- package/dist/index.js.map +1 -0
- package/dist/marsun-components-core.css +1 -0
- package/dist/provider/MarsunCoreProvider.js +51 -0
- package/dist/provider/MarsunCoreProvider.js.map +1 -0
- package/dist/provider/context.js +27 -0
- package/dist/provider/context.js.map +1 -0
- package/dist/theme/constants.js +15 -0
- package/dist/theme/constants.js.map +1 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +9 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/theme.js +286 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/utils/format.js +9 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/resolveMaybeFn.js +11 -0
- package/dist/utils/resolveMaybeFn.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as f, useState as v, useCallback as a, useMemo as L, createContext as R } from "react";
|
|
3
|
+
const s = R(null);
|
|
4
|
+
function F() {
|
|
5
|
+
return f(s);
|
|
6
|
+
}
|
|
7
|
+
function j() {
|
|
8
|
+
const [l, n] = v({}), u = a((e, t) => {
|
|
9
|
+
n((r) => {
|
|
10
|
+
const o = r[e];
|
|
11
|
+
return (o == null ? void 0 : o.label) === t.label && (o == null ? void 0 : o.valueLabel) === t.valueLabel ? r : { ...r, [e]: t };
|
|
12
|
+
});
|
|
13
|
+
}, []), c = a((e) => {
|
|
14
|
+
n((t) => {
|
|
15
|
+
if (!(e in t)) return t;
|
|
16
|
+
const r = { ...t };
|
|
17
|
+
return delete r[e], r;
|
|
18
|
+
});
|
|
19
|
+
}, []), i = a(() => {
|
|
20
|
+
Object.values(l).forEach((e) => e.onRemove()), n({});
|
|
21
|
+
}, [l]), b = L(() => Object.entries(l).filter(([, e]) => !!e.valueLabel).map(([e, t]) => ({
|
|
22
|
+
key: e,
|
|
23
|
+
label: t.label,
|
|
24
|
+
valueLabel: t.valueLabel,
|
|
25
|
+
onRemove: t.onRemove
|
|
26
|
+
})), [l]);
|
|
27
|
+
return { registrations: l, selectedItems: b, register: u, unregister: c, clearAll: i };
|
|
28
|
+
}
|
|
29
|
+
const x = ({ children: l, ctx: n }) => /* @__PURE__ */ m(s.Provider, { value: n, children: l });
|
|
30
|
+
export {
|
|
31
|
+
x as FilterProvider,
|
|
32
|
+
F as useFilterRegister,
|
|
33
|
+
j as useFilterState
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useFilterState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterState.js","sources":["../../../src/components/Filter/useFilterState.tsx"],"sourcesContent":["import React, { createContext, useCallback, useContext, useMemo, useState } from 'react';\nimport type { SelectedItem } from './types';\n\n/**\n * 筛选项注册信息\n */\ninterface FilterRegistration {\n /** 筛选项标签 */\n label: string;\n /** 当前值的展示文案(如 \"技术中心\" / \"审核员\"),为空则不显示该条目 */\n valueLabel: string;\n /** 移除回调 */\n onRemove: () => void;\n}\n\n/** Context 类型 */\ninterface FilterContextValue {\n /** 注册筛选条件(有值时调用) */\n register: (key: string, reg: FilterRegistration) => void;\n /** 注销筛选条件(组件卸载或值清空时调用) */\n unregister: (key: string) => void;\n}\n\nconst FilterContext = createContext<FilterContextValue | null>(null);\n\n/** 供子组件使用 —— 在 CommonFilter 内部注册自身状态(不在 CommonFilter 内时安全返回 null) */\nexport function useFilterRegister(): FilterContextValue | null {\n return useContext(FilterContext);\n}\n\n// ──────────────────── Hook ────────────────────\n\ninterface UseFilterStateReturn {\n /** 所有已注册的筛选项 */\n registrations: Record<string, FilterRegistration>;\n /** 已选条目数组(过滤掉无 valueLabel 的项) */\n selectedItems: SelectedItem[];\n /** 注册方法 */\n register: (key: string, reg: FilterRegistration) => void;\n /** 注销方法 */\n unregister: (key: string) => void;\n /** 清空全部 */\n clearAll: () => void;\n}\n\n/**\n * 筛选状态管理 Hook\n *\n * 各 Filter 子组件通过 `register(key, { label, valueLabel, onRemove })` 注册,\n * CommonFilter 自动聚合成 `selectedItems` 展示。\n */\nexport function useFilterState(): UseFilterStateReturn {\n const [registrations, setRegistrations] = useState<Record<string, FilterRegistration>>({});\n\n const register = useCallback((key: string, reg: FilterRegistration) => {\n setRegistrations((prev) => {\n const existing = prev[key];\n if (existing?.label === reg.label && existing?.valueLabel === reg.valueLabel) {\n return prev;\n }\n return { ...prev, [key]: reg };\n });\n }, []);\n\n const unregister = useCallback((key: string) => {\n setRegistrations((prev) => {\n if (!(key in prev)) return prev;\n const next = { ...prev };\n delete next[key];\n return next;\n });\n }, []);\n\n const clearAll = useCallback(() => {\n // 依次调用每项的 onRemove\n Object.values(registrations).forEach((r) => r.onRemove());\n setRegistrations({});\n }, [registrations]);\n\n const selectedItems = useMemo<SelectedItem[]>(() => {\n return Object.entries(registrations)\n .filter(([, r]) => !!r.valueLabel)\n .map(([key, r]) => ({\n key,\n label: r.label,\n valueLabel: r.valueLabel,\n onRemove: r.onRemove,\n }));\n }, [registrations]);\n\n return { registrations, selectedItems, register, unregister, clearAll };\n}\n\n// ──────────────────── Provider ────────────────────\n\ninterface FilterProviderProps {\n children: React.ReactNode;\n /** register / unregister 方法 */\n ctx: Pick<UseFilterStateReturn, 'register' | 'unregister'>;\n}\n\n/** 内部 Provider,将 register/unregister 注入给子组件 */\nexport const FilterProvider: React.FC<FilterProviderProps> = ({ children, ctx }) => (\n <FilterContext.Provider value={ctx}>{children}</FilterContext.Provider>\n);\n\nexport default useFilterState;\n"],"names":["FilterContext","createContext","useFilterRegister","useContext","useFilterState","registrations","setRegistrations","useState","register","useCallback","key","reg","prev","existing","unregister","next","clearAll","r","selectedItems","useMemo","FilterProvider","children","ctx","jsx"],"mappings":";;AAuBA,MAAMA,IAAgBC,EAAyC,IAAI;AAG5D,SAASC,IAA+C;AAC7D,SAAOC,EAAWH,CAAa;AACjC;AAuBO,SAASI,IAAuC;AACrD,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAA6C,CAAA,CAAE,GAEnFC,IAAWC,EAAY,CAACC,GAAaC,MAA4B;AACrE,IAAAL,EAAiB,CAACM,MAAS;AACzB,YAAMC,IAAWD,EAAKF,CAAG;AACzB,cAAIG,KAAA,gBAAAA,EAAU,WAAUF,EAAI,UAASE,KAAA,gBAAAA,EAAU,gBAAeF,EAAI,aACzDC,IAEF,EAAE,GAAGA,GAAM,CAACF,CAAG,GAAGC,EAAA;AAAA,IAC3B,CAAC;AAAA,EACH,GAAG,CAAA,CAAE,GAECG,IAAaL,EAAY,CAACC,MAAgB;AAC9C,IAAAJ,EAAiB,CAACM,MAAS;AACzB,UAAI,EAAEF,KAAOE,GAAO,QAAOA;AAC3B,YAAMG,IAAO,EAAE,GAAGH,EAAA;AAClB,oBAAOG,EAAKL,CAAG,GACRK;AAAA,IACT,CAAC;AAAA,EACH,GAAG,CAAA,CAAE,GAECC,IAAWP,EAAY,MAAM;AAEjC,WAAO,OAAOJ,CAAa,EAAE,QAAQ,CAACY,MAAMA,EAAE,UAAU,GACxDX,EAAiB,CAAA,CAAE;AAAA,EACrB,GAAG,CAACD,CAAa,CAAC,GAEZa,IAAgBC,EAAwB,MACrC,OAAO,QAAQd,CAAa,EAChC,OAAO,CAAC,CAAA,EAAGY,CAAC,MAAM,CAAC,CAACA,EAAE,UAAU,EAChC,IAAI,CAAC,CAACP,GAAKO,CAAC,OAAO;AAAA,IAClB,KAAAP;AAAA,IACA,OAAOO,EAAE;AAAA,IACT,YAAYA,EAAE;AAAA,IACd,UAAUA,EAAE;AAAA,EAAA,EACZ,GACH,CAACZ,CAAa,CAAC;AAElB,SAAO,EAAE,eAAAA,GAAe,eAAAa,GAAe,UAAAV,GAAU,YAAAM,GAAY,UAAAE,EAAA;AAC/D;AAWO,MAAMI,IAAgD,CAAC,EAAE,UAAAC,GAAU,KAAAC,QACxE,gBAAAC,EAACvB,EAAc,UAAd,EAAuB,OAAOsB,GAAM,UAAAD,EAAA,CAAS;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Select as f } from "antd";
|
|
3
|
+
import { useFetchData as l } from "../../hooks/useFetchData.js";
|
|
4
|
+
import { useMarsunFetch as p } from "../../provider/context.js";
|
|
5
|
+
const b = ({
|
|
6
|
+
options: o,
|
|
7
|
+
fetchUrl: a,
|
|
8
|
+
fetchOptions: r,
|
|
9
|
+
transformData: s,
|
|
10
|
+
enabled: i = !0,
|
|
11
|
+
optionRender: e,
|
|
12
|
+
...m
|
|
13
|
+
}) => {
|
|
14
|
+
const t = p(), { data: c, loading: d } = l({
|
|
15
|
+
data: o,
|
|
16
|
+
fetchUrl: a,
|
|
17
|
+
fetchOptions: r,
|
|
18
|
+
transformData: s,
|
|
19
|
+
enabled: i,
|
|
20
|
+
baseUrl: t.baseUrl,
|
|
21
|
+
defaultHeaders: t.headers,
|
|
22
|
+
timeoutMs: t.timeoutMs
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ n(
|
|
25
|
+
f,
|
|
26
|
+
{
|
|
27
|
+
options: c,
|
|
28
|
+
loading: d,
|
|
29
|
+
optionRender: e ? (u) => e(u.data) : void 0,
|
|
30
|
+
...m
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
b as default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=FetchSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FetchSelect.js","sources":["../../../src/components/Form/FetchSelect.tsx"],"sourcesContent":["import { Select } from 'antd';\nimport type { SelectProps } from 'antd';\nimport React from 'react';\nimport { useMarsunFetch } from '@/provider';\nimport { useFetchData } from '@/hooks/useFetchData';\n\nexport interface SelectOptionItem {\n label: React.ReactNode;\n value: string | number;\n disabled?: boolean;\n [key: string]: unknown;\n}\n\nexport type FetchSelectProps = Omit<\n SelectProps,\n 'options' | 'loading' | 'filterOption' | 'optionLabelProp'\n> & {\n /** props 模式选项(优先) */\n options?: SelectOptionItem[];\n fetchUrl?: string;\n fetchOptions?: RequestInit;\n transformData?: (raw: unknown) => SelectOptionItem[];\n enabled?: boolean;\n /** 自定义选项行渲染 */\n optionRender?: (option: SelectOptionItem) => React.ReactNode;\n};\n\n/** 泛化下拉选择:支持 props 或 fetch+transformData */\nconst FetchSelect: React.FC<FetchSelectProps> = ({\n options: propsOptions,\n fetchUrl,\n fetchOptions,\n transformData,\n enabled = true,\n optionRender,\n ...rest\n}) => {\n const fetchCtx = useMarsunFetch();\n const { data, loading } = useFetchData<SelectOptionItem[]>({\n data: propsOptions,\n fetchUrl,\n fetchOptions,\n transformData,\n enabled,\n baseUrl: fetchCtx.baseUrl,\n defaultHeaders: fetchCtx.headers,\n timeoutMs: fetchCtx.timeoutMs,\n });\n\n return (\n <Select\n options={data}\n loading={loading}\n optionRender={\n optionRender\n ? (ori) => optionRender(ori.data as SelectOptionItem)\n : undefined\n }\n {...rest}\n />\n );\n};\n\nexport default FetchSelect;\n"],"names":["FetchSelect","propsOptions","fetchUrl","fetchOptions","transformData","enabled","optionRender","rest","fetchCtx","useMarsunFetch","data","loading","useFetchData","jsx","Select","ori"],"mappings":";;;;AA4BA,MAAMA,IAA0C,CAAC;AAAA,EAC/C,SAASC;AAAA,EACT,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,cAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAWC,EAAA,GACX,EAAE,MAAAC,GAAM,SAAAC,EAAA,IAAYC,EAAiC;AAAA,IACzD,MAAMX;AAAA,IACN,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAASG,EAAS;AAAA,IAClB,gBAAgBA,EAAS;AAAA,IACzB,WAAWA,EAAS;AAAA,EAAA,CACrB;AAED,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAASJ;AAAA,MACT,SAAAC;AAAA,MACA,cACEL,IACI,CAACS,MAAQT,EAAaS,EAAI,IAAwB,IAClD;AAAA,MAEL,GAAGR;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { TreeSelect as f } from "antd";
|
|
3
|
+
import { useFetchData as i } from "../../hooks/useFetchData.js";
|
|
4
|
+
import { useMarsunFetch as l } from "../../provider/context.js";
|
|
5
|
+
const D = ({
|
|
6
|
+
treeData: t,
|
|
7
|
+
fetchUrl: r,
|
|
8
|
+
fetchOptions: a,
|
|
9
|
+
transformData: o,
|
|
10
|
+
enabled: s = !0,
|
|
11
|
+
...m
|
|
12
|
+
}) => {
|
|
13
|
+
const e = l(), { data: c, loading: u } = i({
|
|
14
|
+
data: t,
|
|
15
|
+
fetchUrl: r,
|
|
16
|
+
fetchOptions: a,
|
|
17
|
+
transformData: o,
|
|
18
|
+
enabled: s,
|
|
19
|
+
baseUrl: e.baseUrl,
|
|
20
|
+
defaultHeaders: e.headers,
|
|
21
|
+
timeoutMs: e.timeoutMs
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ d(f, { treeData: c ?? [], loading: u, ...m });
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
D as default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=FetchTreeSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FetchTreeSelect.js","sources":["../../../src/components/Form/FetchTreeSelect.tsx"],"sourcesContent":["import { TreeSelect } from 'antd';\nimport type { TreeSelectProps } from 'antd';\nimport React from 'react';\nimport { useMarsunFetch } from '@/provider';\nimport { useFetchData } from '@/hooks/useFetchData';\n\nexport interface TreeNodeOption {\n value: string;\n title: React.ReactNode;\n key: string;\n children?: TreeNodeOption[];\n disabled?: boolean;\n}\n\nexport type FetchTreeSelectProps = Omit<TreeSelectProps, 'treeData' | 'loading'> & {\n /** props 模式树数据(优先) */\n treeData?: TreeNodeOption[];\n /** fetch 模式 URL */\n fetchUrl?: string;\n fetchOptions?: RequestInit;\n /** 将 API 响应转为 treeData */\n transformData?: (raw: unknown) => TreeNodeOption[];\n enabled?: boolean;\n};\n\n/** 泛化树形选择:支持 props 或 fetch+transformData,无业务数据转换 */\nconst FetchTreeSelect: React.FC<FetchTreeSelectProps> = ({\n treeData: propsTreeData,\n fetchUrl,\n fetchOptions,\n transformData,\n enabled = true,\n ...rest\n}) => {\n const fetchCtx = useMarsunFetch();\n const { data, loading } = useFetchData<TreeNodeOption[]>({\n data: propsTreeData,\n fetchUrl,\n fetchOptions,\n transformData,\n enabled,\n baseUrl: fetchCtx.baseUrl,\n defaultHeaders: fetchCtx.headers,\n timeoutMs: fetchCtx.timeoutMs,\n });\n\n return <TreeSelect treeData={data ?? []} loading={loading} {...rest} />;\n};\n\nexport default FetchTreeSelect;\n"],"names":["FetchTreeSelect","propsTreeData","fetchUrl","fetchOptions","transformData","enabled","rest","fetchCtx","useMarsunFetch","data","loading","useFetchData","jsx","TreeSelect"],"mappings":";;;;AA0BA,MAAMA,IAAkD,CAAC;AAAA,EACvD,UAAUC;AAAA,EACV,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAWC,EAAA,GACX,EAAE,MAAAC,GAAM,SAAAC,EAAA,IAAYC,EAA+B;AAAA,IACvD,MAAMV;AAAA,IACN,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAASE,EAAS;AAAA,IAClB,gBAAgBA,EAAS;AAAA,IACzB,WAAWA,EAAS;AAAA,EAAA,CACrB;AAED,SAAO,gBAAAK,EAACC,KAAW,UAAUJ,KAAQ,IAAI,SAAAC,GAAmB,GAAGJ,GAAM;AACvE;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Info as w } from "../../Icons/index.js";
|
|
3
|
+
import { Popover as h } from "antd";
|
|
4
|
+
import r from "./style.module.scss.js";
|
|
5
|
+
import n from "classnames";
|
|
6
|
+
const P = ({ option: a, className: l }) => {
|
|
7
|
+
const { label: t, departmentName: i, email: c, phone: m, employeeId: s } = a, d = /* @__PURE__ */ o("div", { className: n("person-option-row-root", r["person-option-row-root"]), children: [
|
|
8
|
+
s ? /* @__PURE__ */ o("div", { children: [
|
|
9
|
+
"工号:",
|
|
10
|
+
s
|
|
11
|
+
] }) : null,
|
|
12
|
+
/* @__PURE__ */ o("div", { children: [
|
|
13
|
+
"邮箱:",
|
|
14
|
+
c || "-"
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ o("div", { children: [
|
|
17
|
+
"电话:",
|
|
18
|
+
m || "-"
|
|
19
|
+
] })
|
|
20
|
+
] });
|
|
21
|
+
return /* @__PURE__ */ o("div", { className: n("person-option-row-person-row", r["person-option-row-person-row"], l), children: [
|
|
22
|
+
/* @__PURE__ */ e("span", { className: n("person-option-row-container", r["person-option-row-container"]), children: t }),
|
|
23
|
+
i ? /* @__PURE__ */ e("span", { className: n("person-option-row-wrapper", r["person-option-row-wrapper"]), children: i }) : null,
|
|
24
|
+
/* @__PURE__ */ e(h, { content: d, title: t, trigger: "hover", placement: "right", children: /* @__PURE__ */ e(
|
|
25
|
+
w,
|
|
26
|
+
{
|
|
27
|
+
className: n("person-option-row-inner", r["person-option-row-inner"]),
|
|
28
|
+
onMouseDown: (p) => p.stopPropagation(),
|
|
29
|
+
onClick: (p) => p.stopPropagation()
|
|
30
|
+
}
|
|
31
|
+
) })
|
|
32
|
+
] });
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
P as default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Form/PersonOptionRow/index.tsx"],"sourcesContent":["import { Info } from '@/components/Icons';\nimport { Popover } from 'antd';\nimport React from 'react';\nimport type { PersonOption } from '../../Filter/types';\nimport styles from './style.module.scss';\nimport classNames from 'classnames';\n\nexport interface PersonOptionRowProps {\n option: Pick<PersonOption, 'label' | 'departmentName' | 'email' | 'phone' | 'employeeId'>;\n className?: string;\n}\n\n/** 人员选项行:姓名 + 部门 + 右侧 info 图标,hover 展示联系方式 */\nconst PersonOptionRow: React.FC<PersonOptionRowProps> = ({ option, className }) => {\n const { label, departmentName, email, phone, employeeId } = option;\n\n const infoContent = (\n <div className={classNames('person-option-row-root', styles['person-option-row-root'])}>\n {employeeId ? <div>工号:{employeeId}</div> : null}\n <div>邮箱:{email || '-'}</div>\n <div>电话:{phone || '-'}</div>\n </div>\n );\n\n return (\n <div className={classNames('person-option-row-person-row', styles['person-option-row-person-row'], className)}>\n <span className={classNames('person-option-row-container', styles['person-option-row-container'])}>{label}</span>\n {departmentName ? (\n <span className={classNames('person-option-row-wrapper', styles['person-option-row-wrapper'])}>{departmentName}</span>\n ) : null}\n <Popover content={infoContent} title={label} trigger=\"hover\" placement=\"right\">\n <Info\n className={classNames('person-option-row-inner', styles['person-option-row-inner'])}\n onMouseDown={(e) => e.stopPropagation()}\n onClick={(e) => e.stopPropagation()}\n />\n </Popover>\n </div>\n );\n};\n\nexport default PersonOptionRow;\n"],"names":["PersonOptionRow","option","className","label","departmentName","email","phone","employeeId","infoContent","classNames","styles","jsxs","jsx","Popover","Info","e"],"mappings":";;;;;AAaA,MAAMA,IAAkD,CAAC,EAAE,QAAAC,GAAQ,WAAAC,QAAgB;AACjF,QAAM,EAAE,OAAAC,GAAO,gBAAAC,GAAgB,OAAAC,GAAO,OAAAC,GAAO,YAAAC,MAAeN,GAEtDO,sBACH,OAAA,EAAI,WAAWC,EAAW,0BAA0BC,EAAO,wBAAwB,CAAC,GAClF,UAAA;AAAA,IAAAH,sBAAc,OAAA,EAAI,UAAA;AAAA,MAAA;AAAA,MAAIA;AAAA,IAAA,EAAA,CAAW,IAAS;AAAA,sBAC1C,OAAA,EAAI,UAAA;AAAA,MAAA;AAAA,MAAIF,KAAS;AAAA,IAAA,GAAI;AAAA,sBACrB,OAAA,EAAI,UAAA;AAAA,MAAA;AAAA,MAAIC,KAAS;AAAA,IAAA,EAAA,CAAI;AAAA,EAAA,GACxB;AAGF,SACE,gBAAAK,EAAC,SAAI,WAAWF,EAAW,gCAAgCC,EAAO,8BAA8B,GAAGR,CAAS,GAC1G,UAAA;AAAA,IAAA,gBAAAU,EAAC,QAAA,EAAK,WAAWH,EAAW,+BAA+BC,EAAO,6BAA6B,CAAC,GAAI,UAAAP,EAAA,CAAM;AAAA,IACzGC,IACC,gBAAAQ,EAAC,QAAA,EAAK,WAAWH,EAAW,6BAA6BC,EAAO,2BAA2B,CAAC,GAAI,UAAAN,EAAA,CAAe,IAC7G;AAAA,IACJ,gBAAAQ,EAACC,KAAQ,SAASL,GAAa,OAAOL,GAAO,SAAQ,SAAQ,WAAU,SACrE,UAAA,gBAAAS;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,WAAWL,EAAW,2BAA2BC,EAAO,yBAAyB,CAAC;AAAA,QAClF,aAAa,CAACK,MAAMA,EAAE,gBAAA;AAAA,QACtB,SAAS,CAACA,MAAMA,EAAE,gBAAA;AAAA,MAAgB;AAAA,IAAA,EACpC,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
"person-option-row-root": "_person-option-row-root_lf6i9_1",
|
|
3
|
+
"person-option-row-container": "_person-option-row-container_lf6i9_5",
|
|
4
|
+
"person-option-row-wrapper": "_person-option-row-wrapper_lf6i9_11",
|
|
5
|
+
"person-option-row-inner": "_person-option-row-inner_lf6i9_19",
|
|
6
|
+
"person-option-row-person-row": "_person-option-row-person-row_lf6i9_28"
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as default
|
|
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,34 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as d, useCallback as m } from "react";
|
|
3
|
+
import p from "../Modal/StepModal/index.js";
|
|
4
|
+
const x = ({ form: a, steps: u, onStepChange: e, ...l }) => {
|
|
5
|
+
const n = d(
|
|
6
|
+
() => u.map((t) => {
|
|
7
|
+
const { validateFields: s, beforeEnter: r, ...i } = t;
|
|
8
|
+
return {
|
|
9
|
+
...i,
|
|
10
|
+
beforeEnter: async () => {
|
|
11
|
+
if (s && s.length > 0)
|
|
12
|
+
try {
|
|
13
|
+
const c = await a.validateFields(s);
|
|
14
|
+
return r ? r(c) : !0;
|
|
15
|
+
} catch {
|
|
16
|
+
return !1;
|
|
17
|
+
}
|
|
18
|
+
return r ? r({}) : !0;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}),
|
|
22
|
+
[a, u]
|
|
23
|
+
), o = m(
|
|
24
|
+
(t) => {
|
|
25
|
+
e == null || e(t);
|
|
26
|
+
},
|
|
27
|
+
[e]
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ f(p, { ...l, steps: n, onStepChange: o });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
x as default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=StepForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepForm.js","sources":["../../../src/components/Form/StepForm.tsx"],"sourcesContent":["import type { StepItem, StepModalProps } from '@/components/Modal';\nimport { StepModal } from '@/components/Modal';\nimport { Form } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\n\nexport interface StepFormProps extends Omit<StepModalProps, 'steps'> {\n /** 步骤列表 */\n steps: StepFormItem[];\n /** antd Form 实例 */\n form: ReturnType<typeof Form.useForm>[0];\n}\n\n/** 扩展 StepItem,增加表单校验步骤支持 */\nexport interface StepFormItem extends Omit<StepItem, 'beforeEnter'> {\n /** 进入下一步前校验的表单字段列表,不传则不做表单校验 */\n validateFields?: string[];\n /** 自定义校验(在 validateFields 之后执行) */\n beforeEnter?: (values: Record<string, unknown>) => boolean | Promise<boolean>;\n}\n\n/**\n * 步骤式表单弹窗\n *\n * 在 StepModal 基础上集成 Form 校验能力,\n * 每个步骤可声明需要校验的字段,点击\"下一步\"时自动 validateFields。\n *\n * 用法:\n * ```tsx\n * const [form] = Form.useForm();\n * const [current, setCurrent] = useState('basic');\n *\n * <StepForm\n * form={form}\n * open={open}\n * current={current}\n * onCancel={onCancel}\n * onStepChange={setCurrent}\n * steps={[\n * { key: 'basic', title: '基本信息', validateFields: ['name'], content: <BasicStep /> },\n * { key: 'detail', title: '详细信息', content: <DetailStep /> },\n * ]}\n * />\n * ```\n */\nconst StepForm: React.FC<StepFormProps> = ({ form, steps, onStepChange, ...rest }) => {\n const enhancedSteps: StepItem[] = useMemo(\n () =>\n steps.map((step) => {\n const { validateFields, beforeEnter, ...restStep } = step;\n return {\n ...restStep,\n beforeEnter: async () => {\n // 有 validateFields 配置时先做表单校验\n if (validateFields && validateFields.length > 0) {\n try {\n const values = await form.validateFields(validateFields);\n // 校验通过后再执行自定义校验\n if (beforeEnter) return beforeEnter(values as Record<string, unknown>);\n return true;\n } catch {\n return false;\n }\n }\n // 无字段校验,直接执行自定义校验\n if (beforeEnter) return beforeEnter({});\n return true;\n },\n };\n }),\n [form, steps],\n );\n\n const handleStepChange = useCallback(\n (key: string) => {\n onStepChange?.(key);\n },\n [onStepChange],\n );\n\n return <StepModal {...rest} steps={enhancedSteps} onStepChange={handleStepChange} />;\n};\n\nexport default StepForm;\n"],"names":["StepForm","form","steps","onStepChange","rest","enhancedSteps","useMemo","step","validateFields","beforeEnter","restStep","values","handleStepChange","useCallback","key","StepModal"],"mappings":";;;AA4CA,MAAMA,IAAoC,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,cAAAC,GAAc,GAAGC,QAAW;AACpF,QAAMC,IAA4BC;AAAA,IAChC,MACEJ,EAAM,IAAI,CAACK,MAAS;AAClB,YAAM,EAAE,gBAAAC,GAAgB,aAAAC,GAAa,GAAGC,MAAaH;AACrD,aAAO;AAAA,QACL,GAAGG;AAAA,QACH,aAAa,YAAY;AAEvB,cAAIF,KAAkBA,EAAe,SAAS;AAC5C,gBAAI;AACF,oBAAMG,IAAS,MAAMV,EAAK,eAAeO,CAAc;AAEvD,qBAAIC,IAAoBA,EAAYE,CAAiC,IAC9D;AAAA,YACT,QAAQ;AACN,qBAAO;AAAA,YACT;AAGF,iBAAIF,IAAoBA,EAAY,EAAE,IAC/B;AAAA,QACT;AAAA,MAAA;AAAA,IAEJ,CAAC;AAAA,IACH,CAACR,GAAMC,CAAK;AAAA,EAAA,GAGRU,IAAmBC;AAAA,IACvB,CAACC,MAAgB;AACf,MAAAX,KAAA,QAAAA,EAAeW;AAAA,IACjB;AAAA,IACA,CAACX,CAAY;AAAA,EAAA;AAGf,2BAAQY,GAAA,EAAW,GAAGX,GAAM,OAAOC,GAAe,cAAcO,GAAkB;AACpF;"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowLeft as $, ArrowLeftRight as u, BarChart3 as p, BookOpen as f, Bot as L, Check as S, ChevronDown as g, ChevronLeft as w, ChevronRight as F, ChevronUp as U, CircleAlert as m, CircleCheck as P, CircleHelp as k, CirclePlay as y, CircleX as b, ClipboardCheck as D, Clock as R, CloudDownload as v, CloudUpload as T, Code as I, Copy as O, Crown as A, Database as H, Download as B, Eye as x, File as M, FileArchive as q, FileImage as X, FileSpreadsheet as E, FileText as N, Flag as z, Flame as G, Folder as j, FolderOpen as W, Hash as _, House as Y, Import as J, Inbox as K, Info as Q, LayoutDashboard as V, LayoutGrid as Z, Loader2 as ee, Lock as oe, LogOut as se, MessageCircle as ae, MessageSquare as re, PanelLeftClose as te, PanelLeftOpen as ne, Pause as le, Pencil as ce, Plus as Ce, Presentation as ie, RefreshCw as de, RotateCw as he, Send as $e, Settings as ue, Shield as pe, ShieldCheck as fe, SlidersHorizontal as Le, Square as Se, Star as ge, ThumbsDown as we, ThumbsUp as Fe, Trash2 as Ue, Trophy as me, Undo2 as Pe, Upload as ke, User as ye, UserPlus as be, UserRoundCog as De, Users as Re, X as ve } from "lucide-react";
|
|
3
|
+
import Te from "react";
|
|
4
|
+
const e = (s, o) => {
|
|
5
|
+
const a = Te.forwardRef(
|
|
6
|
+
({ spin: l, rotate: r, className: c, style: t, strokeWidth: C, fill: i, ...n }, d) => /* @__PURE__ */ h(
|
|
7
|
+
s,
|
|
8
|
+
{
|
|
9
|
+
ref: d,
|
|
10
|
+
size: "1em",
|
|
11
|
+
className: [c, l ? "animate-spin" : ""].filter(Boolean).join(" ") || void 0,
|
|
12
|
+
style: r ? { ...t, transform: `rotate(${r}deg)` } : t,
|
|
13
|
+
strokeWidth: C ?? (o != null && o.filled ? 0 : 2),
|
|
14
|
+
fill: i ?? (o != null && o.filled ? "currentColor" : "none"),
|
|
15
|
+
"aria-hidden": n["aria-label"] ? void 0 : !0,
|
|
16
|
+
...n
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
return a.displayName = s.displayName ?? s.name, a;
|
|
21
|
+
}, Ie = e($), Oe = e(u), Ae = e(p), He = e(f), Be = e(L), xe = e(S), Me = e(g), qe = e(w), Xe = e(F), Ee = e(U), Ne = e(m), ze = e(P), Ge = e(k), je = e(y), We = e(b), _e = e(D), Ye = e(R), Je = e(v), Ke = e(T), Qe = e(I), Ve = e(O), Ze = e(A, { filled: !0 }), eo = e(H), oo = e(B), so = e(x), ao = e(M), ro = e(q), to = e(X), no = e(E), lo = e(N), co = e(z), Co = e(G), io = e(j), ho = e(W), $o = e(_), uo = e(Y), po = e(J), fo = e(K), Lo = e(Q), So = e(V), go = e(Z), wo = e(ee), Fo = e(oe), Uo = e(se), mo = e(ae), Po = e(re), ko = e(te), yo = e(ne), bo = e(le, { filled: !0 }), Do = e(ce), Ro = e(Ce), vo = e(ie), To = e(de), Io = e(he), Oo = e($e), Ao = e(ue), Ho = e(pe), Bo = e(fe), xo = e(Le), Mo = e(Se, { filled: !0 }), qo = e(ge, { filled: !0 }), Xo = e(we), Eo = e(Fe), No = e(Ue), zo = e(me), Go = e(Pe), jo = e(ke), Wo = e(ye), _o = e(be), Yo = e(De), Jo = e(Re), Ko = e(ve), es = [
|
|
22
|
+
"ArrowLeft",
|
|
23
|
+
"ArrowLeftRight",
|
|
24
|
+
"BarChart3",
|
|
25
|
+
"BookOpen",
|
|
26
|
+
"Bot",
|
|
27
|
+
"Check",
|
|
28
|
+
"ChevronDown",
|
|
29
|
+
"ChevronLeft",
|
|
30
|
+
"ChevronRight",
|
|
31
|
+
"ChevronUp",
|
|
32
|
+
"CircleAlert",
|
|
33
|
+
"CircleCheck",
|
|
34
|
+
"CircleHelp",
|
|
35
|
+
"CirclePlay",
|
|
36
|
+
"CircleX",
|
|
37
|
+
"ClipboardCheck",
|
|
38
|
+
"Clock",
|
|
39
|
+
"CloudDownload",
|
|
40
|
+
"CloudUpload",
|
|
41
|
+
"Code",
|
|
42
|
+
"Copy",
|
|
43
|
+
"Crown",
|
|
44
|
+
"Database",
|
|
45
|
+
"Download",
|
|
46
|
+
"Eye",
|
|
47
|
+
"File",
|
|
48
|
+
"FileArchive",
|
|
49
|
+
"FileImage",
|
|
50
|
+
"FileSpreadsheet",
|
|
51
|
+
"FileText",
|
|
52
|
+
"Flag",
|
|
53
|
+
"Flame",
|
|
54
|
+
"Folder",
|
|
55
|
+
"FolderOpen",
|
|
56
|
+
"Hash",
|
|
57
|
+
"House",
|
|
58
|
+
"Import",
|
|
59
|
+
"Inbox",
|
|
60
|
+
"Info",
|
|
61
|
+
"LayoutDashboard",
|
|
62
|
+
"LayoutGrid",
|
|
63
|
+
"Loader2",
|
|
64
|
+
"Lock",
|
|
65
|
+
"LogOut",
|
|
66
|
+
"MessageCircle",
|
|
67
|
+
"MessageSquare",
|
|
68
|
+
"PanelLeftClose",
|
|
69
|
+
"PanelLeftOpen",
|
|
70
|
+
"Pause",
|
|
71
|
+
"Pencil",
|
|
72
|
+
"Plus",
|
|
73
|
+
"Presentation",
|
|
74
|
+
"RefreshCw",
|
|
75
|
+
"RotateCw",
|
|
76
|
+
"Send",
|
|
77
|
+
"Settings",
|
|
78
|
+
"Shield",
|
|
79
|
+
"ShieldCheck",
|
|
80
|
+
"SlidersHorizontal",
|
|
81
|
+
"Square",
|
|
82
|
+
"Star",
|
|
83
|
+
"ThumbsDown",
|
|
84
|
+
"ThumbsUp",
|
|
85
|
+
"Trash2",
|
|
86
|
+
"Trophy",
|
|
87
|
+
"Undo2",
|
|
88
|
+
"Upload",
|
|
89
|
+
"User",
|
|
90
|
+
"UserPlus",
|
|
91
|
+
"UserRoundCog",
|
|
92
|
+
"Users",
|
|
93
|
+
"X"
|
|
94
|
+
], os = {
|
|
95
|
+
ArrowLeft: Ie,
|
|
96
|
+
ArrowLeftRight: Oe,
|
|
97
|
+
BarChart3: Ae,
|
|
98
|
+
BookOpen: He,
|
|
99
|
+
Bot: Be,
|
|
100
|
+
Check: xe,
|
|
101
|
+
ChevronDown: Me,
|
|
102
|
+
ChevronLeft: qe,
|
|
103
|
+
ChevronRight: Xe,
|
|
104
|
+
ChevronUp: Ee,
|
|
105
|
+
CircleAlert: Ne,
|
|
106
|
+
CircleCheck: ze,
|
|
107
|
+
CircleHelp: Ge,
|
|
108
|
+
CirclePlay: je,
|
|
109
|
+
CircleX: We,
|
|
110
|
+
ClipboardCheck: _e,
|
|
111
|
+
Clock: Ye,
|
|
112
|
+
CloudDownload: Je,
|
|
113
|
+
CloudUpload: Ke,
|
|
114
|
+
Code: Qe,
|
|
115
|
+
Copy: Ve,
|
|
116
|
+
Crown: Ze,
|
|
117
|
+
Database: eo,
|
|
118
|
+
Download: oo,
|
|
119
|
+
Eye: so,
|
|
120
|
+
File: ao,
|
|
121
|
+
FileArchive: ro,
|
|
122
|
+
FileImage: to,
|
|
123
|
+
FileSpreadsheet: no,
|
|
124
|
+
FileText: lo,
|
|
125
|
+
Flag: co,
|
|
126
|
+
Flame: Co,
|
|
127
|
+
Folder: io,
|
|
128
|
+
FolderOpen: ho,
|
|
129
|
+
Hash: $o,
|
|
130
|
+
House: uo,
|
|
131
|
+
Import: po,
|
|
132
|
+
Inbox: fo,
|
|
133
|
+
Info: Lo,
|
|
134
|
+
LayoutDashboard: So,
|
|
135
|
+
LayoutGrid: go,
|
|
136
|
+
Loader2: wo,
|
|
137
|
+
Lock: Fo,
|
|
138
|
+
LogOut: Uo,
|
|
139
|
+
MessageCircle: mo,
|
|
140
|
+
MessageSquare: Po,
|
|
141
|
+
PanelLeftClose: ko,
|
|
142
|
+
PanelLeftOpen: yo,
|
|
143
|
+
Pause: bo,
|
|
144
|
+
Pencil: Do,
|
|
145
|
+
Plus: Ro,
|
|
146
|
+
Presentation: vo,
|
|
147
|
+
RefreshCw: To,
|
|
148
|
+
RotateCw: Io,
|
|
149
|
+
Send: Oo,
|
|
150
|
+
Settings: Ao,
|
|
151
|
+
Shield: Ho,
|
|
152
|
+
ShieldCheck: Bo,
|
|
153
|
+
SlidersHorizontal: xo,
|
|
154
|
+
Square: Mo,
|
|
155
|
+
Star: qo,
|
|
156
|
+
ThumbsDown: Xo,
|
|
157
|
+
ThumbsUp: Eo,
|
|
158
|
+
Trash2: No,
|
|
159
|
+
Trophy: zo,
|
|
160
|
+
Undo2: Go,
|
|
161
|
+
Upload: jo,
|
|
162
|
+
User: Wo,
|
|
163
|
+
UserPlus: _o,
|
|
164
|
+
UserRoundCog: Yo,
|
|
165
|
+
Users: Jo,
|
|
166
|
+
X: Ko
|
|
167
|
+
};
|
|
168
|
+
export {
|
|
169
|
+
Ie as ArrowLeft,
|
|
170
|
+
Oe as ArrowLeftRight,
|
|
171
|
+
Ae as BarChart3,
|
|
172
|
+
He as BookOpen,
|
|
173
|
+
Be as Bot,
|
|
174
|
+
xe as Check,
|
|
175
|
+
Me as ChevronDown,
|
|
176
|
+
qe as ChevronLeft,
|
|
177
|
+
Xe as ChevronRight,
|
|
178
|
+
Ee as ChevronUp,
|
|
179
|
+
Ne as CircleAlert,
|
|
180
|
+
ze as CircleCheck,
|
|
181
|
+
Ge as CircleHelp,
|
|
182
|
+
je as CirclePlay,
|
|
183
|
+
We as CircleX,
|
|
184
|
+
_e as ClipboardCheck,
|
|
185
|
+
Ye as Clock,
|
|
186
|
+
Je as CloudDownload,
|
|
187
|
+
Ke as CloudUpload,
|
|
188
|
+
Qe as Code,
|
|
189
|
+
Ve as Copy,
|
|
190
|
+
Ze as Crown,
|
|
191
|
+
eo as Database,
|
|
192
|
+
oo as Download,
|
|
193
|
+
so as Eye,
|
|
194
|
+
ao as File,
|
|
195
|
+
ro as FileArchive,
|
|
196
|
+
to as FileImage,
|
|
197
|
+
no as FileSpreadsheet,
|
|
198
|
+
lo as FileText,
|
|
199
|
+
co as Flag,
|
|
200
|
+
Co as Flame,
|
|
201
|
+
io as Folder,
|
|
202
|
+
ho as FolderOpen,
|
|
203
|
+
$o as Hash,
|
|
204
|
+
uo as House,
|
|
205
|
+
es as ICON_NAMES,
|
|
206
|
+
os as ICON_REGISTRY,
|
|
207
|
+
po as Import,
|
|
208
|
+
fo as Inbox,
|
|
209
|
+
Lo as Info,
|
|
210
|
+
So as LayoutDashboard,
|
|
211
|
+
go as LayoutGrid,
|
|
212
|
+
wo as Loader2,
|
|
213
|
+
Fo as Lock,
|
|
214
|
+
Uo as LogOut,
|
|
215
|
+
mo as MessageCircle,
|
|
216
|
+
Po as MessageSquare,
|
|
217
|
+
ko as PanelLeftClose,
|
|
218
|
+
yo as PanelLeftOpen,
|
|
219
|
+
bo as Pause,
|
|
220
|
+
Do as Pencil,
|
|
221
|
+
Ro as Plus,
|
|
222
|
+
vo as Presentation,
|
|
223
|
+
To as RefreshCw,
|
|
224
|
+
Io as RotateCw,
|
|
225
|
+
Oo as Send,
|
|
226
|
+
Ao as Settings,
|
|
227
|
+
Ho as Shield,
|
|
228
|
+
Bo as ShieldCheck,
|
|
229
|
+
xo as SlidersHorizontal,
|
|
230
|
+
Mo as Square,
|
|
231
|
+
qo as Star,
|
|
232
|
+
Xo as ThumbsDown,
|
|
233
|
+
Eo as ThumbsUp,
|
|
234
|
+
No as Trash2,
|
|
235
|
+
zo as Trophy,
|
|
236
|
+
Go as Undo2,
|
|
237
|
+
jo as Upload,
|
|
238
|
+
Wo as User,
|
|
239
|
+
_o as UserPlus,
|
|
240
|
+
Yo as UserRoundCog,
|
|
241
|
+
Jo as Users,
|
|
242
|
+
Ko as X,
|
|
243
|
+
e as createIcon
|
|
244
|
+
};
|
|
245
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Icons/index.tsx"],"sourcesContent":["import type { LucideIcon, LucideProps } from 'lucide-react';\nimport {\n ArrowLeft as ArrowLeftIcon,\n ArrowLeftRight as ArrowLeftRightIcon,\n BarChart3 as BarChart3Icon,\n BookOpen as BookOpenIcon,\n Bot as BotIcon,\n Check as CheckIcon,\n ChevronDown as ChevronDownIcon,\n ChevronLeft as ChevronLeftIcon,\n ChevronRight as ChevronRightIcon,\n ChevronUp as ChevronUpIcon,\n CircleAlert as CircleAlertIcon,\n CircleCheck as CircleCheckIcon,\n CircleHelp as CircleHelpIcon,\n CirclePlay as CirclePlayIcon,\n CircleX as CircleXIcon,\n ClipboardCheck as ClipboardCheckIcon,\n Clock as ClockIcon,\n CloudDownload as CloudDownloadIcon,\n CloudUpload as CloudUploadIcon,\n Code as CodeIcon,\n Copy as CopyIcon,\n Crown as CrownIcon,\n Database as DatabaseIcon,\n Download as DownloadIcon,\n Eye as EyeIcon,\n FileArchive as FileArchiveIcon,\n File as FileIcon,\n FileImage as FileImageIcon,\n FileSpreadsheet as FileSpreadsheetIcon,\n FileText as FileTextIcon,\n Flag as FlagIcon,\n Flame as FlameIcon,\n Folder as FolderIcon,\n FolderOpen as FolderOpenIcon,\n Hash as HashIcon,\n House as HouseIcon,\n Import as ImportIcon,\n Inbox as InboxIcon,\n Info as InfoIcon,\n LayoutDashboard as LayoutDashboardIcon,\n LayoutGrid as LayoutGridIcon,\n Loader2 as Loader2Icon,\n Lock as LockIcon,\n LogOut as LogOutIcon,\n MessageCircle as MessageCircleIcon,\n MessageSquare as MessageSquareIcon,\n PanelLeftClose as PanelLeftCloseIcon,\n PanelLeftOpen as PanelLeftOpenIcon,\n Pause as PauseIcon,\n Pencil as PencilIcon,\n Plus as PlusIcon,\n Presentation as PresentationIcon,\n RefreshCw as RefreshCwIcon,\n RotateCw as RotateCwIcon,\n Send as SendIcon,\n Settings as SettingsIcon,\n ShieldCheck as ShieldCheckIcon,\n Shield as ShieldIcon,\n SlidersHorizontal as SlidersHorizontalIcon,\n Square as SquareIcon,\n Star as StarIcon,\n ThumbsDown as ThumbsDownIcon,\n ThumbsUp as ThumbsUpIcon,\n Trash2 as Trash2Icon,\n Trophy as TrophyIcon,\n Undo2 as Undo2Icon,\n Upload as UploadIcon,\n User as UserIcon,\n UserPlus as UserPlusIcon,\n UserRoundCog as UserRoundCogIcon,\n Users as UsersIcon,\n X as XIcon,\n} from 'lucide-react';\nimport React from 'react';\n\nexport type IconProps = LucideProps & {\n spin?: boolean;\n rotate?: number;\n};\n\nconst createIcon = (Icon: LucideIcon, options?: { filled?: boolean }) => {\n const WrappedIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ spin, rotate, className, style, strokeWidth, fill, ...props }, ref) => (\n <Icon\n ref={ref}\n size=\"1em\"\n className={[className, spin ? 'animate-spin' : ''].filter(Boolean).join(' ') || undefined}\n style={rotate ? { ...style, transform: `rotate(${rotate}deg)` } : style}\n strokeWidth={strokeWidth ?? (options?.filled ? 0 : 2)}\n fill={fill ?? (options?.filled ? 'currentColor' : 'none')}\n aria-hidden={props['aria-label'] ? undefined : true}\n {...props}\n />\n ),\n );\n\n WrappedIcon.displayName = Icon.displayName ?? Icon.name;\n return WrappedIcon;\n};\n\nexport const ArrowLeft = createIcon(ArrowLeftIcon);\nexport const ArrowLeftRight = createIcon(ArrowLeftRightIcon);\nexport const BarChart3 = createIcon(BarChart3Icon);\nexport const BookOpen = createIcon(BookOpenIcon);\nexport const Bot = createIcon(BotIcon);\nexport const Check = createIcon(CheckIcon);\nexport const ChevronDown = createIcon(ChevronDownIcon);\nexport const ChevronLeft = createIcon(ChevronLeftIcon);\nexport const ChevronRight = createIcon(ChevronRightIcon);\nexport const ChevronUp = createIcon(ChevronUpIcon);\nexport const CircleAlert = createIcon(CircleAlertIcon);\nexport const CircleCheck = createIcon(CircleCheckIcon);\nexport const CircleHelp = createIcon(CircleHelpIcon);\nexport const CirclePlay = createIcon(CirclePlayIcon);\nexport const CircleX = createIcon(CircleXIcon);\nexport const ClipboardCheck = createIcon(ClipboardCheckIcon);\nexport const Clock = createIcon(ClockIcon);\nexport const CloudDownload = createIcon(CloudDownloadIcon);\nexport const CloudUpload = createIcon(CloudUploadIcon);\nexport const Code = createIcon(CodeIcon);\nexport const Copy = createIcon(CopyIcon);\nexport const Crown = createIcon(CrownIcon, { filled: true });\nexport const Database = createIcon(DatabaseIcon);\nexport const Download = createIcon(DownloadIcon);\nexport const Eye = createIcon(EyeIcon);\nexport const File = createIcon(FileIcon);\nexport const FileArchive = createIcon(FileArchiveIcon);\nexport const FileImage = createIcon(FileImageIcon);\nexport const FileSpreadsheet = createIcon(FileSpreadsheetIcon);\nexport const FileText = createIcon(FileTextIcon);\nexport const Flag = createIcon(FlagIcon);\nexport const Flame = createIcon(FlameIcon);\nexport const Folder = createIcon(FolderIcon);\nexport const FolderOpen = createIcon(FolderOpenIcon);\nexport const Hash = createIcon(HashIcon);\nexport const House = createIcon(HouseIcon);\nexport const Import = createIcon(ImportIcon);\nexport const Inbox = createIcon(InboxIcon);\nexport const Info = createIcon(InfoIcon);\nexport const LayoutDashboard = createIcon(LayoutDashboardIcon);\nexport const LayoutGrid = createIcon(LayoutGridIcon);\nexport const Loader2 = createIcon(Loader2Icon);\nexport const Lock = createIcon(LockIcon);\nexport const LogOut = createIcon(LogOutIcon);\nexport const MessageCircle = createIcon(MessageCircleIcon);\nexport const MessageSquare = createIcon(MessageSquareIcon);\nexport const PanelLeftClose = createIcon(PanelLeftCloseIcon);\nexport const PanelLeftOpen = createIcon(PanelLeftOpenIcon);\nexport const Pause = createIcon(PauseIcon, { filled: true });\nexport const Pencil = createIcon(PencilIcon);\nexport const Plus = createIcon(PlusIcon);\nexport const Presentation = createIcon(PresentationIcon);\nexport const RefreshCw = createIcon(RefreshCwIcon);\nexport const RotateCw = createIcon(RotateCwIcon);\nexport const Send = createIcon(SendIcon);\nexport const Settings = createIcon(SettingsIcon);\nexport const Shield = createIcon(ShieldIcon);\nexport const ShieldCheck = createIcon(ShieldCheckIcon);\nexport const SlidersHorizontal = createIcon(SlidersHorizontalIcon);\nexport const Square = createIcon(SquareIcon, { filled: true });\nexport const Star = createIcon(StarIcon, { filled: true });\nexport const ThumbsDown = createIcon(ThumbsDownIcon);\nexport const ThumbsUp = createIcon(ThumbsUpIcon);\nexport const Trash2 = createIcon(Trash2Icon);\nexport const Trophy = createIcon(TrophyIcon);\nexport const Undo2 = createIcon(Undo2Icon);\nexport const Upload = createIcon(UploadIcon);\nexport const User = createIcon(UserIcon);\nexport const UserPlus = createIcon(UserPlusIcon);\nexport const UserRoundCog = createIcon(UserRoundCogIcon);\nexport const Users = createIcon(UsersIcon);\nexport const X = createIcon(XIcon);\n\nexport { createIcon };\n\nexport const ICON_NAMES = [\n 'ArrowLeft', 'ArrowLeftRight', 'BarChart3', 'BookOpen', 'Bot', 'Check',\n 'ChevronDown', 'ChevronLeft', 'ChevronRight', 'ChevronUp', 'CircleAlert',\n 'CircleCheck', 'CircleHelp', 'CirclePlay', 'CircleX', 'ClipboardCheck', 'Clock',\n 'CloudDownload', 'CloudUpload', 'Code', 'Copy', 'Crown', 'Database', 'Download',\n 'Eye', 'File', 'FileArchive', 'FileImage', 'FileSpreadsheet', 'FileText', 'Flag',\n 'Flame', 'Folder', 'FolderOpen', 'Hash', 'House', 'Import', 'Inbox', 'Info',\n 'LayoutDashboard', 'LayoutGrid', 'Loader2', 'Lock', 'LogOut', 'MessageCircle',\n 'MessageSquare', 'PanelLeftClose', 'PanelLeftOpen', 'Pause', 'Pencil', 'Plus',\n 'Presentation', 'RefreshCw', 'RotateCw', 'Send', 'Settings', 'Shield',\n 'ShieldCheck', 'SlidersHorizontal', 'Square', 'Star', 'ThumbsDown', 'ThumbsUp',\n 'Trash2', 'Trophy', 'Undo2', 'Upload', 'User', 'UserPlus', 'UserRoundCog', 'Users', 'X',\n] as const;\n\nexport type IconName = (typeof ICON_NAMES)[number];\n\nexport const ICON_REGISTRY: Record<IconName, React.FC<IconProps>> = {\n ArrowLeft, ArrowLeftRight, BarChart3, BookOpen, Bot, Check,\n ChevronDown, ChevronLeft, ChevronRight, ChevronUp, CircleAlert,\n CircleCheck, CircleHelp, CirclePlay, CircleX, ClipboardCheck, Clock,\n CloudDownload, CloudUpload, Code, Copy, Crown, Database, Download,\n Eye, File, FileArchive, FileImage, FileSpreadsheet, FileText, Flag,\n Flame, Folder, FolderOpen, Hash, House, Import, Inbox, Info,\n LayoutDashboard, LayoutGrid, Loader2, Lock, LogOut, MessageCircle,\n MessageSquare, PanelLeftClose, PanelLeftOpen, Pause, Pencil, Plus,\n Presentation, RefreshCw, RotateCw, Send, Settings, Shield,\n ShieldCheck, SlidersHorizontal, Square, Star, ThumbsDown, ThumbsUp,\n Trash2, Trophy, Undo2, Upload, User, UserPlus, UserRoundCog, Users, X,\n};\n"],"names":["createIcon","Icon","options","WrappedIcon","React","spin","rotate","className","style","strokeWidth","fill","props","ref","jsx","ArrowLeft","ArrowLeftIcon","ArrowLeftRight","ArrowLeftRightIcon","BarChart3","BarChart3Icon","BookOpen","BookOpenIcon","Bot","BotIcon","Check","CheckIcon","ChevronDown","ChevronDownIcon","ChevronLeft","ChevronLeftIcon","ChevronRight","ChevronRightIcon","ChevronUp","ChevronUpIcon","CircleAlert","CircleAlertIcon","CircleCheck","CircleCheckIcon","CircleHelp","CircleHelpIcon","CirclePlay","CirclePlayIcon","CircleX","CircleXIcon","ClipboardCheck","ClipboardCheckIcon","Clock","ClockIcon","CloudDownload","CloudDownloadIcon","CloudUpload","CloudUploadIcon","Code","CodeIcon","Copy","CopyIcon","Crown","CrownIcon","Database","DatabaseIcon","Download","DownloadIcon","Eye","EyeIcon","File","FileIcon","FileArchive","FileArchiveIcon","FileImage","FileImageIcon","FileSpreadsheet","FileSpreadsheetIcon","FileText","FileTextIcon","Flag","FlagIcon","Flame","FlameIcon","Folder","FolderIcon","FolderOpen","FolderOpenIcon","Hash","HashIcon","House","HouseIcon","Import","ImportIcon","Inbox","InboxIcon","Info","InfoIcon","LayoutDashboard","LayoutDashboardIcon","LayoutGrid","LayoutGridIcon","Loader2","Loader2Icon","Lock","LockIcon","LogOut","LogOutIcon","MessageCircle","MessageCircleIcon","MessageSquare","MessageSquareIcon","PanelLeftClose","PanelLeftCloseIcon","PanelLeftOpen","PanelLeftOpenIcon","Pause","PauseIcon","Pencil","PencilIcon","Plus","PlusIcon","Presentation","PresentationIcon","RefreshCw","RefreshCwIcon","RotateCw","RotateCwIcon","Send","SendIcon","Settings","SettingsIcon","Shield","ShieldIcon","ShieldCheck","ShieldCheckIcon","SlidersHorizontal","SlidersHorizontalIcon","Square","SquareIcon","Star","StarIcon","ThumbsDown","ThumbsDownIcon","ThumbsUp","ThumbsUpIcon","Trash2","Trash2Icon","Trophy","TrophyIcon","Undo2","Undo2Icon","Upload","UploadIcon","User","UserIcon","UserPlus","UserPlusIcon","UserRoundCog","UserRoundCogIcon","Users","UsersIcon","X","XIcon","ICON_NAMES","ICON_REGISTRY"],"mappings":";;;AAkFA,MAAMA,IAAa,CAACC,GAAkBC,MAAmC;AACvE,QAAMC,IAAcC,GAAM;AAAA,IACxB,CAAC,EAAE,MAAAC,GAAM,QAAAC,GAAQ,WAAAC,GAAW,OAAAC,GAAO,aAAAC,GAAa,MAAAC,GAAM,GAAGC,KAASC,MAChE,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,KAAAW;AAAA,QACA,MAAK;AAAA,QACL,WAAW,CAACL,GAAWF,IAAO,iBAAiB,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,QAChF,OAAOC,IAAS,EAAE,GAAGE,GAAO,WAAW,UAAUF,CAAM,OAAA,IAAWE;AAAA,QAClE,aAAaC,MAAgBP,KAAA,QAAAA,EAAS,SAAS,IAAI;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|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowLeft as s } from "../../Icons/index.js";
|
|
3
|
+
import { Button as n } from "antd";
|
|
4
|
+
import a from "classnames";
|
|
5
|
+
import r from "./style.module.scss.js";
|
|
6
|
+
const g = ({
|
|
7
|
+
title: d,
|
|
8
|
+
onBack: t,
|
|
9
|
+
actions: i,
|
|
10
|
+
description: l,
|
|
11
|
+
children: p
|
|
12
|
+
}) => /* @__PURE__ */ o("div", { children: [
|
|
13
|
+
/* @__PURE__ */ o("div", { className: a("page-header-layout-root", r["page-header-layout-root"]), children: [
|
|
14
|
+
/* @__PURE__ */ o(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: a(
|
|
18
|
+
"page-header-layout-container",
|
|
19
|
+
r["page-header-layout-container"]
|
|
20
|
+
),
|
|
21
|
+
children: [
|
|
22
|
+
t && /* @__PURE__ */ e(n, { type: "text", icon: /* @__PURE__ */ e(s, {}), onClick: t }),
|
|
23
|
+
/* @__PURE__ */ e(
|
|
24
|
+
"h2",
|
|
25
|
+
{
|
|
26
|
+
className: a("page-header-layout-wrapper", r["page-header-layout-wrapper"]),
|
|
27
|
+
children: d
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ e("div", { children: i })
|
|
34
|
+
] }),
|
|
35
|
+
l && /* @__PURE__ */ e("div", { className: a("page-header-layout-inner", r["page-header-layout-inner"]), children: l }),
|
|
36
|
+
p
|
|
37
|
+
] });
|
|
38
|
+
export {
|
|
39
|
+
g as default
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Layout/PageHeaderLayout/index.tsx"],"sourcesContent":["import { ArrowLeft } from '@/components/Icons';\nimport { Button } from 'antd';\nimport classNames from 'classnames';\nimport React from 'react';\nimport styles from './style.module.scss';\n\nexport interface PageHeaderLayoutProps {\n title: string;\n onBack?: () => void;\n actions?: React.ReactNode;\n /** 页面说明提示,显示在头部下方、内容区上方 */\n description?: React.ReactNode;\n children?: React.ReactNode;\n}\n\n/** 页面头部布局:返回按钮 + 标题 + 操作区 + 说明提示 + 内容 */\nconst PageHeaderLayout: React.FC<PageHeaderLayoutProps> = ({\n title,\n onBack,\n actions,\n description,\n children,\n}) => (\n <div>\n <div className={classNames('page-header-layout-root', styles['page-header-layout-root'])}>\n <div\n className={classNames(\n 'page-header-layout-container',\n styles['page-header-layout-container'],\n )}\n >\n {onBack && <Button type=\"text\" icon={<ArrowLeft />} onClick={onBack} />}\n <h2\n className={classNames('page-header-layout-wrapper', styles['page-header-layout-wrapper'])}\n >\n {title}\n </h2>\n </div>\n <div>{actions}</div>\n </div>\n {description && (\n <div className={classNames('page-header-layout-inner', styles['page-header-layout-inner'])}>\n {description}\n </div>\n )}\n {children}\n </div>\n);\n\nexport default PageHeaderLayout;\n"],"names":["PageHeaderLayout","title","onBack","actions","description","children","jsxs","classNames","styles","jsx","Button","ArrowLeft"],"mappings":";;;;;AAgBA,MAAMA,IAAoD,CAAC;AAAA,EACzD,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AACF,wBACG,OAAA,EACC,UAAA;AAAA,EAAA,gBAAAC,EAAC,SAAI,WAAWC,EAAW,2BAA2BC,EAAO,yBAAyB,CAAC,GACrF,UAAA;AAAA,IAAA,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWC;AAAA,UACT;AAAA,UACAC,EAAO,8BAA8B;AAAA,QAAA;AAAA,QAGtC,UAAA;AAAA,UAAAN,KAAU,gBAAAO,EAACC,KAAO,MAAK,QAAO,MAAM,gBAAAD,EAACE,GAAA,CAAA,CAAU,GAAI,SAAST,EAAA,CAAQ;AAAA,UACrE,gBAAAO;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAW,8BAA8BC,EAAO,4BAA4B,CAAC;AAAA,cAEvF,UAAAP;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAQ,EAAC,SAAK,UAAAN,EAAA,CAAQ;AAAA,EAAA,GAChB;AAAA,EACCC,KACC,gBAAAK,EAAC,OAAA,EAAI,WAAWF,EAAW,4BAA4BC,EAAO,0BAA0B,CAAC,GACtF,UAAAJ,EAAA,CACH;AAAA,EAEDC;AAAA,EAAA,CACH;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
"page-header-layout-root": "_page-header-layout-root_13o9c_1",
|
|
3
|
+
"page-header-layout-container": "_page-header-layout-container_13o9c_7",
|
|
4
|
+
"page-header-layout-wrapper": "_page-header-layout-wrapper_13o9c_12",
|
|
5
|
+
"page-header-layout-inner": "_page-header-layout-inner_13o9c_17"
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
e as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as k, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as M } from "../../Icons/index.js";
|
|
3
|
+
import { Modal as j, Steps as F, Button as c } from "antd";
|
|
4
|
+
import { useMemo as I, useCallback as n } from "react";
|
|
5
|
+
import f from "./style.module.scss.js";
|
|
6
|
+
import a from "classnames";
|
|
7
|
+
const y = (m) => {
|
|
8
|
+
if (m !== void 0)
|
|
9
|
+
return typeof m == "function" ? m() : m;
|
|
10
|
+
}, H = ({
|
|
11
|
+
title: m,
|
|
12
|
+
steps: r,
|
|
13
|
+
current: e,
|
|
14
|
+
open: x,
|
|
15
|
+
onCancel: s,
|
|
16
|
+
width: N = 600,
|
|
17
|
+
showSteps: u = !0,
|
|
18
|
+
maskClosable: v = !1,
|
|
19
|
+
className: w,
|
|
20
|
+
onStepChange: l
|
|
21
|
+
}) => {
|
|
22
|
+
const i = I(() => r.findIndex((t) => t.key === e), [r, e]), o = r[i], E = n(() => {
|
|
23
|
+
i > 0 && (l == null || l(r[i - 1].key));
|
|
24
|
+
}, [i, r, l]), b = n(async () => {
|
|
25
|
+
if (!(o != null && o.beforeEnter)) {
|
|
26
|
+
i < r.length - 1 && (l == null || l(r[i + 1].key));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
await o.beforeEnter() && i < r.length - 1 && (l == null || l(r[i + 1].key));
|
|
30
|
+
}, [o, i, r, l]), B = m ?? (o == null ? void 0 : o.title) ?? "";
|
|
31
|
+
return /* @__PURE__ */ k(
|
|
32
|
+
j,
|
|
33
|
+
{
|
|
34
|
+
title: B,
|
|
35
|
+
open: x,
|
|
36
|
+
onCancel: s,
|
|
37
|
+
width: N,
|
|
38
|
+
footer: (o == null ? void 0 : o.footer) !== void 0 ? y(o.footer) : /* @__PURE__ */ k("div", { className: a("step-modal-root", f["step-modal-root"]), children: [
|
|
39
|
+
i > 0 && (o == null ? void 0 : o.allowBack) !== !1 && /* @__PURE__ */ d(c, { icon: /* @__PURE__ */ d(M, {}), onClick: E, children: "上一步" }),
|
|
40
|
+
/* @__PURE__ */ d("div", { className: a("step-modal-container", f["step-modal-container"]) }),
|
|
41
|
+
/* @__PURE__ */ d(c, { onClick: s, children: "取消" }),
|
|
42
|
+
i < r.length - 1 && /* @__PURE__ */ d(c, { type: "primary", onClick: b, children: "下一步" })
|
|
43
|
+
] }),
|
|
44
|
+
maskClosable: v,
|
|
45
|
+
className: w,
|
|
46
|
+
children: [
|
|
47
|
+
u && r.length > 1 && /* @__PURE__ */ d(
|
|
48
|
+
F,
|
|
49
|
+
{
|
|
50
|
+
current: i,
|
|
51
|
+
size: "small",
|
|
52
|
+
className: a("step-modal-wrapper", f["step-modal-wrapper"]),
|
|
53
|
+
items: r.map((t) => ({ title: t.title, description: t.description }))
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
y(o == null ? void 0 : o.content)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
H as default
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=index.js.map
|