From 24fbb40f0a0a298185dd8aa76ed98de295c04a33 Mon Sep 17 00:00:00 2001 From: what Date: Fri, 19 Jul 2024 13:08:18 +0800 Subject: [PATCH] [feat] v0.2.2 --- dist/button.js | 2 +- .../{main-DamvcBIJ.js => main-DHW9LhcM.js} | 107 +++++++++--------- dist/components.js | 4 +- dist/container.js | 8 +- dist/data-list.js | 22 ++-- dist/grid-layout-form.js | 2 +- dist/grid-layout.js | 6 +- dist/hooks.js | 14 +-- dist/index.js | 2 +- dist/res-ws.js | 2 +- dist/service.js | 2 +- dist/style.css | 2 +- dist/user.js | 4 +- dist/utils.js | 4 +- package.json | 3 +- 15 files changed, 91 insertions(+), 93 deletions(-) rename dist/common/{main-DamvcBIJ.js => main-DHW9LhcM.js} (97%) diff --git a/dist/button.js b/dist/button.js index 2b32b0f..b25dd0a 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { E, B, C } from "./common/main-DamvcBIJ.js"; +import { E, B, C } from "./common/main-DHW9LhcM.js"; import "./common/vender-CMS8SASe.js"; export { E as auth, diff --git a/dist/common/main-DamvcBIJ.js b/dist/common/main-DHW9LhcM.js similarity index 97% rename from dist/common/main-DamvcBIJ.js rename to dist/common/main-DHW9LhcM.js index c867c77..8fb9423 100644 --- a/dist/common/main-DamvcBIJ.js +++ b/dist/common/main-DHW9LhcM.js @@ -21,15 +21,15 @@ import _ from "lodash"; import axios from "axios"; import React, { useMemo, useEffect, useRef, useState, useCallback, useContext, useLayoutEffect, useId as useId$1 } from "react"; import Request from "ff-request"; -import SparkMD5 from "https://assets.fsdpf.net/js/esm/spark-md5@3_0_2.min.js?url"; +import SparkMD5 from "spark-md5"; import { jsx, jsxs, Fragment } from "react/jsx-runtime"; import { QuestionOutlined, LoadingOutlined, createFromIconfontCN } from "@ant-design/icons"; import cx from "classnames"; import { P as PropTypes, N as NProgress } from "./vender-CMS8SASe.js"; import Form, { Field, FieldContext } from "rc-field-form"; import { notification as notification$1, Drawer as Drawer$1, Modal as Modal$1, Form as Form$1, ConfigProvider, Input, Button as Button$1, Breadcrumb, Tree, Pagination, Table, Empty as Empty$1, Popconfirm, Tooltip, Popover as Popover$1 } from "antd"; -import { flushSync } from "react-dom"; import update from "immutability-helper"; +import { useMergedState } from "rc-util"; import { useParams, generatePath, Navigate, createBrowserRouter } from "react-router-dom"; const Iconfont = ({ type, className, ...props }) => { if (!(type != null && type.startsWith("icon-"))) @@ -193,32 +193,24 @@ const _ResWs = class _ResWs { _instance = new WeakMap(), _oWorker = new WeakMap(), _topic = new WeakMap(), _initWorker = new WeakMap(), __privateAdd(_ResWs, _instance, null), __publicField(_ResWs, "getInstance", () => (__privateGet(_ResWs, _instance) || __privateSet(_ResWs, _instance, new _ResWs()), __privateGet(_ResWs, _instance))); let ResWs = _ResWs; const ResWs$1 = ResWs.getInstance(), useUpdate = () => { - const isMouned = useRef(!0), [value, setValue] = useState(0); - return useEffect(() => () => isMouned.current = !1, []), () => isMouned.current && flushSync(() => { - setValue(value + 1); - }); -}, usePropsValue = ({ value, defaultValue, onChange }) => { - const update2 = useUpdate(), stateRef = useRef(value !== void 0 ? value : defaultValue); - value !== void 0 && (stateRef.current = value); - const setState = useCallback(_.debounce((v) => { - value === void 0 && (stateRef.current = v, update2()), onChange && onChange(v); - }, 380, { leading: !0, trailing: !1 }), [value]); - return [stateRef.current, setState]; + const isMouned = useRef(!0), [, forceUpdate] = React.useReducer((x) => x + 1, 0); + return useEffect(() => () => isMouned.current = !1, []), () => isMouned.current && forceUpdate(); }, usePrevious = (state) => { const ref = useRef(); return useEffect(() => { ref.current = state; - }), ref.current; -}, useStateWithCallback = (init) => { - const cbRef = useRef(), [data2, setData] = useState(init); + }, [state]), ref.current; +}, useStateWithCallback = (initialState) => { + const [state, setState] = useState(initialState), callbackRef = useRef(null), setStateWithCallback = useCallback((newState, callback) => { + callbackRef.current = callback, setState(newState); + }, []); return useEffect(() => { - _.isFunction(cbRef.current) && cbRef.current(data2); - }, [data2]), [data2, function(data3, callback) { - cbRef.current = callback, setData(data3); - }]; -}, useDeepEqualEffect = (effect = React.EffectCallback, deps, compare = _.isEqual) => { + callbackRef.current && (callbackRef.current(state), callbackRef.current = null); + }, [state]), [state, setStateWithCallback]; +}, useDeepEqualEffect = (callback = (prevDeps) => { +}, deps, compare = _.isEqual) => { const oldDeps = React.useRef(deps); - (!oldDeps.current || !compare(deps, oldDeps.current)) && (oldDeps.current = deps), React.useEffect(effect, [oldDeps.current]); + compare(deps, oldDeps.current) || (oldDeps.current = deps), React.useEffect(callback, [oldDeps.current]); }, transformOptions = (arr, type = "string") => { var _a; if (!Array.isArray(arr)) @@ -757,6 +749,7 @@ const getWidgetPropsData = (registerProps = {}, data2 = {}, fns2 = {}, defaultVa itemGridLayout, $setting, tabs, + isConditionFormLayout, isTreeSider, treeSiderConfig }) => { @@ -773,7 +766,7 @@ const getWidgetPropsData = (registerProps = {}, data2 = {}, fns2 = {}, defaultVa return /* @__PURE__ */ jsxs("div", { className: cx("ff-data-list-framework", className), children: [ /* @__PURE__ */ jsx(DataListSider, { className: classNames == null ? void 0 : classNames.sider, isTreeSider, ...treeSiderConfig }), /* @__PURE__ */ jsxs("div", { className: cx("ff-data-list-container", classNames == null ? void 0 : classNames.container), children: [ - /* @__PURE__ */ jsx(DataListFilter, { className: classNames == null ? void 0 : classNames.filter }), + /* @__PURE__ */ jsx(DataListFilter, { className: classNames == null ? void 0 : classNames.filter, isConditionFormLayout }), /* @__PURE__ */ jsx( DataListToolbar, { @@ -845,13 +838,14 @@ const getWidgetPropsData = (registerProps = {}, data2 = {}, fns2 = {}, defaultVa pageSize, isTreeSider, treeSiderConfig, + isConditionFormLayout, ...props }) => { const { getBase62params, onClickCallback } = useContext(DataListContext), { total, page } = getBase62params() || {}; return /* @__PURE__ */ jsxs("div", { className: cx("ff-data-table-framework", className), children: [ /* @__PURE__ */ jsx(DataListSider, { isTreeSider, ...treeSiderConfig }), /* @__PURE__ */ jsxs("div", { className: "ff-data-table-container", children: [ - /* @__PURE__ */ jsx(DataListFilter, { listCode }), + /* @__PURE__ */ jsx(DataListFilter, { listCode, isConditionFormLayout }), /* @__PURE__ */ jsx(DataListToolbar, { title }), /* @__PURE__ */ jsx( DataListTable, @@ -1012,7 +1006,7 @@ const loadDataListFieldWidget = (widget, value, record, widgetSetting, base62par const ids = dataSource.map((item) => item == null ? void 0 : item[pk]); return operations.some(({ uuid }) => !uuid || !itemOperationsAccess.has(uuid) ? !0 : itemOperationsAccess.get(uuid).some((oper) => ids.includes(oper))); }, [operations, dataSource, itemOperationsAccess, pk]), DataListHelper = React.forwardRef(({ listCode, base62params, className, itemClassName, theme: _theme, themeProps, classNames }, ref) => { - const [{ tab, page, total, condition, sider, keyword, dataSource, itemOperationsAccess, pageSize }, setData] = useStateWithCallback(base62params), [{ + const [{ tab, page, total, condition, sider, keyword, dataSource, itemOperationsAccess, pageSize }, setData] = useState(base62params), [{ resource, primaryKey, batchOperations = [], @@ -1020,6 +1014,7 @@ const loadDataListFieldWidget = (widget, value, record, widgetSetting, base62par columns = [], themeConfig, theme, + isConditionFormLayout = !1, isTreeSider, treeSiderConfig, isItemGridLayout, @@ -1028,6 +1023,7 @@ const loadDataListFieldWidget = (widget, value, record, widgetSetting, base62par isPaginate, tabs }, setStructure] = useState({ isItemGridLayout: !1, itemGridLayout: {} }), initData = (params) => http.list(listCode, { tab, page, total, condition, sider, keyword, ...params }).then(({ + keyword: keyword2, condition: condition2, total: total2, tab: tab2, @@ -1044,7 +1040,7 @@ const loadDataListFieldWidget = (widget, value, record, widgetSetting, base62par tab: tab2, condition: condition2, sider, - keyword, + keyword: keyword2, itemOperationsAccess: new Map(operationsAccess) }); }), isItemOperations = useHasOperationColumn(itemOperations, dataSource, itemOperationsAccess, primaryKey), isBatchOperations = useHasOperationColumn(batchOperations); @@ -1114,7 +1110,8 @@ const loadDataListFieldWidget = (widget, value, record, widgetSetting, base62par dataSource, isItemGridLayout, columns, - itemGridLayout + itemGridLayout, + isConditionFormLayout }, className: cx("ff-data-list-helper", className), getBase62params, @@ -1128,20 +1125,22 @@ const loadDataListFieldWidget = (widget, value, record, widgetSetting, base62par onPageSizeChange } ); -}), DataListFilter = ({ className }) => { +}), DataListFilter = ({ className, isConditionFormLayout }) => { var _a, _b; const [structure, setStructure] = useState({}), { listCode, onKeywordChange, onConditonChange, getBase62params } = React.useContext(DataListContext), { keyword, condition } = getBase62params() || {}, [form] = Form$1.useForm(); useEffect(() => { - http.get(`/api/_/${listCode}/list-condition-form-layout`).then(({ resource, marginX, marginY, rowHeight, cols, fields }) => { + listCode && isConditionFormLayout && http.get(`/api/_/${listCode}/list-condition-form-layout`).then(({ resource, marginX, marginY, rowHeight, cols, fields }) => { setStructure({ resource, itemMargin: [marginX, marginY], rowHeight, cols, fields }); }).catch(() => setStructure({})); - }, [listCode]), useEffect(() => { + }, [listCode, isConditionFormLayout]), useEffect(() => { form.setFieldsValue({ keyword, ...condition }); }, [JSON.stringify([keyword, condition])]); const onReset = () => { const { keyword: keyword2, condition: condition2 } = getBase62params("init") || {}; form.setFieldsValue({ keyword: keyword2, ...condition2 }); - }, onSubmit = (value) => onConditonChange(value[structure == null ? void 0 : structure.resource], value.keyword), onKeywordSearch = (value) => onKeywordChange(value); + }, onSubmit = (value) => onConditonChange({ + [structure.resource]: value[structure.resource] + }, value.keyword), onKeywordSearch = (value) => onKeywordChange(value); return /* @__PURE__ */ jsx("div", { className: cx("ff-data-list-filter", className), children: /* @__PURE__ */ jsx( Form$1, { @@ -1189,7 +1188,7 @@ DataListFilter.reservedFields = [ } ]; const DataListToolbar = ({ className, title, tabs, tab, onTabChange }) => { - const [tabValue, setTabValue] = usePropsValue({ value: tab, defaultValue: tabs == null ? void 0 : tabs[0].value, onChange: onTabChange }); + const [tabValue, setTabValue] = useMergedState(tabs == null ? void 0 : tabs[0].value, { value: tab, onChange: onTabChange }); return /* @__PURE__ */ jsxs("div", { className: cx("ff-data-list-toolbar", className), children: [ /* @__PURE__ */ jsx("div", { className: "ff-data-list-title", children: title }), /* @__PURE__ */ jsx( @@ -1330,7 +1329,7 @@ const DataListFooter = ({ className, operations, isOperations, isPaginate, total }] : []), dataSource, size: "middle", - scroll: { x: "max-content", y: divSize.height - 47 }, + scroll: { x: "max-content", y: divSize.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, @@ -2208,7 +2207,7 @@ export { AppContext as Y, AppGlobalParamsContext as Z, Cache as _, - usePropsValue as a, + usePrevious as a, fn as a0, core as a1, route as a2, @@ -2217,27 +2216,27 @@ export { getConfigure as a5, getWidgetOperationAuth as a6, getPhoneNumber as a7, - usePrevious as b, - useStateWithCallback as c, - useDeepEqualEffect as d, - useOptions as e, - useSubscribeRequest as f, - SlotRender as g, - FFPageRender as h, - FFPopupRender as i, - getDefaultExpandRowKeys as j, - GridLayout as k, - GridLayoutWidget as l, - DataListFilter as m, - DataListToolbar as n, - DataListSider as o, - DataListFooter as p, - DataListHelper as q, - DataListContext as r, - DataListTable as s, - DataListContent as t, + useStateWithCallback as b, + useDeepEqualEffect as c, + useOptions as d, + useSubscribeRequest as e, + SlotRender as f, + FFPageRender as g, + FFPopupRender as h, + getDefaultExpandRowKeys as i, + GridLayout as j, + GridLayoutWidget as k, + DataListFilter as l, + DataListToolbar as m, + DataListSider as n, + DataListFooter as o, + DataListHelper as p, + DataListContext as q, + DataListTable as r, + DataListContent as s, + DataListFramework as t, useUpdate as u, - DataListFramework as v, + DataTableFramework as v, loadDataListFieldWidget as w, useColumnsRender as x, useStructure as y, diff --git a/dist/components.js b/dist/components.js index 80eddb8..feabd77 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,5 +1,5 @@ -import { N, i } from "./common/main-DamvcBIJ.js"; +import { N, h } from "./common/main-DHW9LhcM.js"; export { N as Icon, - i as Popup + h as Popup }; diff --git a/dist/container.js b/dist/container.js index 8b78929..e10f913 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,8 +1,8 @@ -import { S, h, i, g, F } from "./common/main-DamvcBIJ.js"; +import { S, g, h, f, F } from "./common/main-DHW9LhcM.js"; export { S as Context, - h as FFPageRender, - i as FFPopupRender, - g as SlotRender, + g as FFPageRender, + h as FFPopupRender, + f as SlotRender, F as default }; diff --git a/dist/data-list.js b/dist/data-list.js index 643e71d..6ea6b76 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,15 +1,15 @@ -import { t, r, m, p, v, q, o, s, n, v as v2, D, w, x, z, A, y } from "./common/main-DamvcBIJ.js"; +import { s, q, l, o, t, p, n, r, m, v, D, w, x, z, A, y } from "./common/main-DHW9LhcM.js"; export { - t as DataListContent, - r as DataListContext, - m as DataListFilter, - p as DataListFooter, - v as DataListFramework, - q as DataListHelper, - o as DataListSider, - s as DataListTable, - n as DataListToolbar, - v2 as DataTableFramework, + s as DataListContent, + q as DataListContext, + l as DataListFilter, + o as DataListFooter, + t as DataListFramework, + p as DataListHelper, + n as DataListSider, + r as DataListTable, + m as DataListToolbar, + v as DataTableFramework, D as default, w as loadDataListFieldWidget, x as useColumnsRender, diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index 858c881..3b4f4bc 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { I, K, J, H, M, L } from "./common/main-DamvcBIJ.js"; +import { I, K, J, H, M, L } from "./common/main-DHW9LhcM.js"; export { I as GridLayoutForm, K as GridLayoutFormHelper, diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 5985d2f..2e952ef 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,6 +1,6 @@ -import { k, l, G } from "./common/main-DamvcBIJ.js"; +import { j, k, G } from "./common/main-DHW9LhcM.js"; export { - k as GridLayout, - l as GridLayoutWidget, + j as GridLayout, + k as GridLayoutWidget, G as default }; diff --git a/dist/hooks.js b/dist/hooks.js index 4f79be4..6423406 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,14 +1,12 @@ import "lodash"; import "rc-field-form"; import "react"; -import "react-dom"; -import { d, e, b, a, c, f, u } from "./common/main-DamvcBIJ.js"; +import { c, d, a, b, e, u } from "./common/main-DHW9LhcM.js"; export { - d as useDeepEqualEffect, - e as useOptions, - b as usePrevious, - a as usePropsValue, - c as useStateWithCallback, - f as useSubscribeRequest, + c as useDeepEqualEffect, + d as useOptions, + a as usePrevious, + b as useStateWithCallback, + e as useSubscribeRequest, u as useUpdate }; diff --git a/dist/index.js b/dist/index.js index 3a71cce..c4e5276 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ import "lodash"; import "axios"; import "react"; -import { Z, V, _, $, a1, Y, a0, W, X, a2 } from "./common/main-DamvcBIJ.js"; +import { Z, V, _, $, a1, Y, a0, W, X, a2 } from "./common/main-DHW9LhcM.js"; import "ff-request"; export { Z as AppGlobalParamsContext, diff --git a/dist/res-ws.js b/dist/res-ws.js index b60ade7..aba1cc3 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R } from "./common/main-DamvcBIJ.js"; +import { R } from "./common/main-DHW9LhcM.js"; export { R as default }; diff --git a/dist/service.js b/dist/service.js index 808ddcd..a4781c7 100644 --- a/dist/service.js +++ b/dist/service.js @@ -1,4 +1,4 @@ -import { a5, a4, a7, a3, a6 } from "./common/main-DamvcBIJ.js"; +import { a5, a4, a7, a3, a6 } from "./common/main-DHW9LhcM.js"; export { a5 as getConfigure, a4 as getMenus, diff --git a/dist/style.css b/dist/style.css index df96d6e..109688a 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ff-container{height:100%;padding:var(--ff-padding, 0px);background-color:var(--ff-bg-color, #fff)}.ff-drawer .ant-drawer-header{padding:0 8px 0 0}.ff-drawer .ant-drawer-header .ant-drawer-title{height:50px;line-height:50px}.ff-drawer .ant-drawer-header .ant-drawer-close{margin-inline-end:0}.ff-drawer .ant-drawer-body{padding:8px}.ff-drawer .ff-popup-footer{padding:8px;height:46px;align-items:center;display:flex}.ff-drawer .ff-popup-footer .ff-popup-extras,.ff-drawer .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-drawer .ff-popup-footer .ff-popup-extras{flex:1}.ff-modal>div:not([aria-hidden]){height:inherit}.ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}.ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}.ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}.ff-modal .ff-popup-footer .ff-popup-extras,.ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-modal .ff-popup-footer .ff-popup-extras{flex:1}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:8px}.ff-data-list-framework .ff-data-list-sider{width:var(--sider-width);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-framework .ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width))}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:8px;display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;display:flex;flex-direction:column}.ff-data-table-framework .ff-data-table-toolbar{display:flex}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-xs)}page-container{--bg-color: #fff;--mask-bg-color: rgba(0, 0, 0, .6)}page-container .ff-notification{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}page-container .ff-notification .ff-notification-container{color:#fff;border-radius:12rpx;background-color:#0009;height:fit-content;padding:28rpx;max-width:50%;max-height:50%;text-align:center}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon{font-size:62rpx}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon+view{margin-top:20rpx}page-container .ff-confirm{display:flex;align-items:center;justify-content:center;color:var(--text-color, #737373);background-color:#0006}page-container .ff-confirm .ff-confirm-container{background-color:#fff;width:80%;min-height:240rpx;max-height:80%;border-radius:12rpx;padding:38rpx;display:flex;flex-direction:column;gap:18rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-title{font-size:36rpx;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-content{flex:1;overflow-y:auto;min-height:1.8em;max-height:70vh}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations{display:flex;gap:38rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok,page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{flex:1;border-radius:32rpx;padding:10rpx 0;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{box-shadow:0 0 3rpx var(--text-color, #737373);border:1rpx solid var(--text-color, #737373)}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok{color:#fff;background-color:var(--primary-color, #1890ff)}page-container .ff-modal>div:not([aria-hidden]){height:inherit}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}page-container .ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}page-container .ff-modal .ff-popup-footer .ff-popup-extras,page-container .ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}page-container .ff-modal .ff-popup-footer .ff-popup-extras{flex:1}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}.ant-form-vertical .ant-form-item-label,.ant-form.ant-vertical .ant-form-item-label{padding-bottom:0;text-align:start}.ant-form-vertical .ant-form-item-row,.ant-form.ant-vertical .ant-form-item-row{flex-direction:column}.ant-form-item .ant-form-item-label>label{height:22px}.anticon.iconfont{transform:scale(1.14)}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px} +#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ff-container{height:100%;padding:var(--ff-padding, 0px);background-color:var(--ff-bg-color, #fff)}.ff-drawer .ant-drawer-header{padding:0 8px 0 0}.ff-drawer .ant-drawer-header .ant-drawer-title{height:50px;line-height:50px}.ff-drawer .ant-drawer-header .ant-drawer-close{margin-inline-end:0}.ff-drawer .ant-drawer-body{padding:8px}.ff-drawer .ff-popup-footer{padding:8px;height:46px;align-items:center;display:flex}.ff-drawer .ff-popup-footer .ff-popup-extras,.ff-drawer .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-drawer .ff-popup-footer .ff-popup-extras{flex:1}.ff-modal>div:not([aria-hidden]){height:inherit}.ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}.ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}.ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}.ff-modal .ff-popup-footer .ff-popup-extras,.ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-modal .ff-popup-footer .ff-popup-extras{flex:1}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-xs)}page-container{--bg-color: #fff;--mask-bg-color: rgba(0, 0, 0, .6)}page-container .ff-notification{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}page-container .ff-notification .ff-notification-container{color:#fff;border-radius:12rpx;background-color:#0009;height:fit-content;padding:28rpx;max-width:50%;max-height:50%;text-align:center}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon{font-size:62rpx}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon+view{margin-top:20rpx}page-container .ff-confirm{display:flex;align-items:center;justify-content:center;color:var(--text-color, #737373);background-color:#0006}page-container .ff-confirm .ff-confirm-container{background-color:#fff;width:80%;min-height:240rpx;max-height:80%;border-radius:12rpx;padding:38rpx;display:flex;flex-direction:column;gap:18rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-title{font-size:36rpx;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-content{flex:1;overflow-y:auto;min-height:1.8em;max-height:70vh}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations{display:flex;gap:38rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok,page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{flex:1;border-radius:32rpx;padding:10rpx 0;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{box-shadow:0 0 3rpx var(--text-color, #737373);border:1rpx solid var(--text-color, #737373)}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok{color:#fff;background-color:var(--primary-color, #1890ff)}page-container .ff-modal>div:not([aria-hidden]){height:inherit}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}page-container .ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}page-container .ff-modal .ff-popup-footer .ff-popup-extras,page-container .ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}page-container .ff-modal .ff-popup-footer .ff-popup-extras{flex:1}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}.ant-form-vertical .ant-form-item-label,.ant-form.ant-vertical .ant-form-item-label{padding-bottom:0;text-align:start}.ant-form-vertical .ant-form-item-row,.ant-form.ant-vertical .ant-form-item-row{flex-direction:column}.ant-form-item .ant-form-item-label>label{height:22px}.anticon.iconfont{transform:scale(1.14)}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px} diff --git a/dist/user.js b/dist/user.js index 9d3d831..fd1573d 100644 --- a/dist/user.js +++ b/dist/user.js @@ -1,9 +1,9 @@ -import "https://assets.fsdpf.net/js/esm/spark-md5@3_0_2.min.js?url"; +import "spark-md5"; import "react/jsx-runtime"; import "react"; import "@ant-design/icons"; import "classnames"; -import { P, Q, O, T, U } from "./common/main-DamvcBIJ.js"; +import { P, Q, O, T, U } from "./common/main-DHW9LhcM.js"; export { P as checkUserToken, Q as getUserInfo, diff --git a/dist/utils.js b/dist/utils.js index 47adc96..28e427e 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { j } from "./common/main-DamvcBIJ.js"; +import { i } from "./common/main-DHW9LhcM.js"; export { - j as getDefaultExpandRowKeys + i as getDefaultExpandRowKeys }; diff --git a/package.json b/package.json index 5a53301..5f8559a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.2.0", + "version": "0.2.2", "type": "module", "files": [ "dist/" @@ -41,6 +41,7 @@ "rc-field-form": "^1.44.0", "rc-util": "^5.41.0", "react": "^18.2.0", + "spark-md5": "^3.0.2", "react-dom": "^18.2.0", "react-router-dom": "^6.22.3" },