@sia.soul/sia-react-ui 0.1.99 → 0.1.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-67Q2GI3D.js → chunk-6KWMZ7JJ.js} +2 -2
- package/dist/{chunk-4TTHPU2S.js → chunk-FOLNXKBD.js} +2 -2
- package/dist/{chunk-DJTV4X6L.js → chunk-KKU35MWK.js} +1 -1
- package/dist/{chunk-YPHUBD4F.js → chunk-NURPAO7G.js} +1 -1
- package/dist/{chunk-X5BFQUFX.js → chunk-V6CRVCSB.js} +4 -3
- package/dist/core.cjs +4 -3
- package/dist/core.css +10 -0
- package/dist/core.js +3 -3
- package/dist/index.cjs +15 -9
- package/dist/index.css +10 -0
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +16 -11
- package/dist/rich-text-editor.cjs +4 -3
- package/dist/rich-text-editor.js +2 -2
- package/dist/select-date-range.cjs +4 -3
- package/dist/select-date-range.js +3 -3
- package/package.json +1 -1
|
@@ -655,7 +655,8 @@ var outlineIconBounds = {
|
|
|
655
655
|
"search": [4, 4, 17, 17],
|
|
656
656
|
"send": [3, 3, 18, 18],
|
|
657
657
|
"server": [3, 4, 18, 16],
|
|
658
|
-
|
|
658
|
+
// 六齿直线轮廓的原始边界,不含描边。
|
|
659
|
+
"settings": [4.4825, 4.1215, 15.035, 15.757],
|
|
659
660
|
"share": [3, 2, 18, 20],
|
|
660
661
|
"shield": [4, 3, 16, 19],
|
|
661
662
|
"shield-check": [4, 3, 16, 19],
|
|
@@ -852,10 +853,10 @@ var coreIconPaths = {
|
|
|
852
853
|
/* @__PURE__ */ jsx3("path", { d: "M2.8 20c.6-3.8 2.7-5.8 6.2-5.8s5.6 2 6.2 5.8" }),
|
|
853
854
|
/* @__PURE__ */ jsx3("path", { d: "M15 5.2a3.5 3.5 0 0 1 0 6.6M16.2 14.5c2.9.5 4.4 2.3 4.9 5.5" })
|
|
854
855
|
] }),
|
|
855
|
-
//
|
|
856
|
+
// 六齿轮廓为小尺寸保留清晰齿间距,主体大小与描边仍遵循统一几何规则。
|
|
856
857
|
settings: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
857
858
|
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "2.8" }),
|
|
858
|
-
/* @__PURE__ */ jsx3("path", { d: "
|
|
859
|
+
/* @__PURE__ */ jsx3("path", { d: "M9.9479 6.3618 10.6108 4.1215 13.3892 4.1215 14.0521 6.3618 15.8567 7.4037 18.1284 6.8577 19.5175 9.2638 17.9088 10.9581 17.9088 13.0419 19.5175 14.7362 18.1284 17.1423 15.8567 16.5963 14.0521 17.6382 13.3892 19.8785 10.6108 19.8785 9.9479 17.6382 8.1433 16.5963 5.8716 17.1423 4.4825 14.7362 6.0912 13.0419 6.0912 10.9581 4.4825 9.2638 5.8716 6.8577 8.1433 7.4037Z" })
|
|
859
860
|
] }),
|
|
860
861
|
edit: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
861
862
|
/* @__PURE__ */ jsx3("path", { d: "M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
package/dist/core.cjs
CHANGED
|
@@ -1034,7 +1034,8 @@ var outlineIconBounds = {
|
|
|
1034
1034
|
"search": [4, 4, 17, 17],
|
|
1035
1035
|
"send": [3, 3, 18, 18],
|
|
1036
1036
|
"server": [3, 4, 18, 16],
|
|
1037
|
-
|
|
1037
|
+
// 六齿直线轮廓的原始边界,不含描边。
|
|
1038
|
+
"settings": [4.4825, 4.1215, 15.035, 15.757],
|
|
1038
1039
|
"share": [3, 2, 18, 20],
|
|
1039
1040
|
"shield": [4, 3, 16, 19],
|
|
1040
1041
|
"shield-check": [4, 3, 16, 19],
|
|
@@ -1231,10 +1232,10 @@ var coreIconPaths = {
|
|
|
1231
1232
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.8 20c.6-3.8 2.7-5.8 6.2-5.8s5.6 2 6.2 5.8" }),
|
|
1232
1233
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M15 5.2a3.5 3.5 0 0 1 0 6.6M16.2 14.5c2.9.5 4.4 2.3 4.9 5.5" })
|
|
1233
1234
|
] }),
|
|
1234
|
-
//
|
|
1235
|
+
// 六齿轮廓为小尺寸保留清晰齿间距,主体大小与描边仍遵循统一几何规则。
|
|
1235
1236
|
settings: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1236
1237
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "2.8" }),
|
|
1237
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "
|
|
1238
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9.9479 6.3618 10.6108 4.1215 13.3892 4.1215 14.0521 6.3618 15.8567 7.4037 18.1284 6.8577 19.5175 9.2638 17.9088 10.9581 17.9088 13.0419 19.5175 14.7362 18.1284 17.1423 15.8567 16.5963 14.0521 17.6382 13.3892 19.8785 10.6108 19.8785 9.9479 17.6382 8.1433 16.5963 5.8716 17.1423 4.4825 14.7362 6.0912 13.0419 6.0912 10.9581 4.4825 9.2638 5.8716 6.8577 8.1433 7.4037Z" })
|
|
1238
1239
|
] }),
|
|
1239
1240
|
edit: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1240
1241
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
package/dist/core.css
CHANGED
|
@@ -5167,6 +5167,16 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
5167
5167
|
min-width: 0;
|
|
5168
5168
|
width: 0;
|
|
5169
5169
|
}
|
|
5170
|
+
.sia-query-form__field .sia-space-compact--horizontal:has(> .sia-select:first-child + .sia-field:last-child > .sia-input-control) > .sia-select {
|
|
5171
|
+
flex: 4 1 0;
|
|
5172
|
+
min-width: 0;
|
|
5173
|
+
width: 0;
|
|
5174
|
+
}
|
|
5175
|
+
.sia-query-form__field .sia-space-compact--horizontal:has(> .sia-select:first-child + .sia-field:last-child > .sia-input-control) > .sia-field {
|
|
5176
|
+
flex: 6 1 0;
|
|
5177
|
+
min-width: 0;
|
|
5178
|
+
width: 0;
|
|
5179
|
+
}
|
|
5170
5180
|
.sia-query-form__actions {
|
|
5171
5181
|
display: flex;
|
|
5172
5182
|
align-items: center;
|
package/dist/core.js
CHANGED
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
Typography,
|
|
12
12
|
Upload,
|
|
13
13
|
message
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6KWMZ7JJ.js";
|
|
15
15
|
import {
|
|
16
16
|
Select
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KKU35MWK.js";
|
|
18
18
|
import {
|
|
19
19
|
Icon,
|
|
20
20
|
Input,
|
|
21
21
|
Modal,
|
|
22
22
|
Segmented
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-V6CRVCSB.js";
|
|
24
24
|
import {
|
|
25
25
|
Button
|
|
26
26
|
} from "./chunk-SJFT5OSX.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1183,7 +1183,8 @@ var outlineIconBounds = {
|
|
|
1183
1183
|
"search": [4, 4, 17, 17],
|
|
1184
1184
|
"send": [3, 3, 18, 18],
|
|
1185
1185
|
"server": [3, 4, 18, 16],
|
|
1186
|
-
|
|
1186
|
+
// 六齿直线轮廓的原始边界,不含描边。
|
|
1187
|
+
"settings": [4.4825, 4.1215, 15.035, 15.757],
|
|
1187
1188
|
"share": [3, 2, 18, 20],
|
|
1188
1189
|
"shield": [4, 3, 16, 19],
|
|
1189
1190
|
"shield-check": [4, 3, 16, 19],
|
|
@@ -1380,10 +1381,10 @@ var coreIconPaths = {
|
|
|
1380
1381
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.8 20c.6-3.8 2.7-5.8 6.2-5.8s5.6 2 6.2 5.8" }),
|
|
1381
1382
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M15 5.2a3.5 3.5 0 0 1 0 6.6M16.2 14.5c2.9.5 4.4 2.3 4.9 5.5" })
|
|
1382
1383
|
] }),
|
|
1383
|
-
//
|
|
1384
|
+
// 六齿轮廓为小尺寸保留清晰齿间距,主体大小与描边仍遵循统一几何规则。
|
|
1384
1385
|
settings: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1385
1386
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "2.8" }),
|
|
1386
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9.9479 6.3618 10.6108 4.1215 13.3892 4.1215 14.0521 6.3618 15.8567 7.4037 18.1284 6.8577 19.5175 9.2638 17.9088 10.9581 17.9088 13.0419 19.5175 14.7362 18.1284 17.1423 15.8567 16.5963 14.0521 17.6382 13.3892 19.8785 10.6108 19.8785 9.9479 17.6382 8.1433 16.5963 5.8716 17.1423 4.4825 14.7362 6.0912 13.0419 6.0912 10.9581 4.4825 9.2638 5.8716 6.8577 8.1433 7.4037Z" })
|
|
1387
1388
|
] }),
|
|
1388
1389
|
edit: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1389
1390
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
|
@@ -24523,7 +24524,7 @@ function countQueryFieldRows(centers) {
|
|
|
24523
24524
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
24524
24525
|
function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed, disabled) {
|
|
24525
24526
|
const [snapshot, setSnapshot] = (0, import_react96.useState)();
|
|
24526
|
-
const [draft, setDraft] = (0, import_react96.useState)({ fields: [], defaultCollapsed });
|
|
24527
|
+
const [draft, setDraft] = (0, import_react96.useState)({ fields: [], defaultCollapsed: defaultCollapsed ?? false });
|
|
24527
24528
|
const [open, setOpen] = (0, import_react96.useState)(false);
|
|
24528
24529
|
const [loading, setLoading] = (0, import_react96.useState)(false);
|
|
24529
24530
|
const [saving, setSaving] = (0, import_react96.useState)(false);
|
|
@@ -24546,10 +24547,10 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
|
|
|
24546
24547
|
try {
|
|
24547
24548
|
const stored = (await current.config.adapter.load(current.config.scope))?.queryForm;
|
|
24548
24549
|
if (request !== token.current) return;
|
|
24549
|
-
const next = stored ?? { fields: [], defaultCollapsed: current.defaultCollapsed };
|
|
24550
|
+
const next = stored ?? { fields: [], defaultCollapsed: current.defaultCollapsed ?? false };
|
|
24550
24551
|
setSnapshot(next);
|
|
24551
24552
|
setDraft({ ...next, fields: reconcileQueryFields(latest.current.fields.map((field) => field.key), next.fields) });
|
|
24552
|
-
if (!edit) latest.current.applyCollapsed(
|
|
24553
|
+
if (!edit) latest.current.applyCollapsed(stored?.defaultCollapsed ?? latest.current.defaultCollapsed);
|
|
24553
24554
|
} catch (reason) {
|
|
24554
24555
|
if (request !== token.current) return;
|
|
24555
24556
|
setLoadFailed(true);
|
|
@@ -24672,7 +24673,7 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
|
|
|
24672
24673
|
},
|
|
24673
24674
|
item.key
|
|
24674
24675
|
)) }),
|
|
24675
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { type: "button", disabled: locked, onClick: () => setDraft({ fields: reconcileQueryFields(fields.map((field) => field.key)), defaultCollapsed }), children: "\u6062\u590D\u9ED8\u8BA4" })
|
|
24676
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { type: "button", disabled: locked, onClick: () => setDraft({ fields: reconcileQueryFields(fields.map((field) => field.key)), defaultCollapsed: defaultCollapsed ?? false }), children: "\u6062\u590D\u9ED8\u8BA4" })
|
|
24676
24677
|
] })
|
|
24677
24678
|
}
|
|
24678
24679
|
)
|
|
@@ -24693,7 +24694,7 @@ function QueryForm({
|
|
|
24693
24694
|
fieldWidth = 220,
|
|
24694
24695
|
collapsible = true,
|
|
24695
24696
|
collapsed: controlledCollapsed,
|
|
24696
|
-
defaultCollapsed
|
|
24697
|
+
defaultCollapsed,
|
|
24697
24698
|
collapsedCount = Infinity,
|
|
24698
24699
|
onCollapsedChange,
|
|
24699
24700
|
quickQueries = [],
|
|
@@ -24717,8 +24718,9 @@ function QueryForm({
|
|
|
24717
24718
|
}) {
|
|
24718
24719
|
const [form] = useForm(providedForm);
|
|
24719
24720
|
const [internalCollapsed, setInternalCollapsed] = (0, import_react97.useState)(defaultCollapsed);
|
|
24721
|
+
const [expandedRows, setExpandedRows] = (0, import_react97.useState)(0);
|
|
24720
24722
|
const [needsCollapse, setNeedsCollapse] = (0, import_react97.useState)(false);
|
|
24721
|
-
const collapsed = collapsible && needsCollapse && (controlledCollapsed ?? internalCollapsed);
|
|
24723
|
+
const collapsed = collapsible && needsCollapse && (controlledCollapsed ?? internalCollapsed ?? expandedRows >= 3);
|
|
24722
24724
|
const [searching, setSearching] = (0, import_react97.useState)(false);
|
|
24723
24725
|
const [saving, setSaving] = (0, import_react97.useState)(false);
|
|
24724
24726
|
const [removing, setRemoving] = (0, import_react97.useState)(false);
|
|
@@ -24795,6 +24797,10 @@ function QueryForm({
|
|
|
24795
24797
|
field.hidden = false;
|
|
24796
24798
|
});
|
|
24797
24799
|
if (toggle) toggle.hidden = true;
|
|
24800
|
+
if (row.clientWidth > 0) setExpandedRows(countQueryFieldRows(allFields.map((field) => {
|
|
24801
|
+
const rect = field.getBoundingClientRect();
|
|
24802
|
+
return rect.top + rect.height / 2;
|
|
24803
|
+
})));
|
|
24798
24804
|
const requiredWidth = allFields.reduce(
|
|
24799
24805
|
(total, field) => total + field.getBoundingClientRect().width + gap,
|
|
24800
24806
|
actions.getBoundingClientRect().width
|
package/dist/index.css
CHANGED
|
@@ -5167,6 +5167,16 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
5167
5167
|
min-width: 0;
|
|
5168
5168
|
width: 0;
|
|
5169
5169
|
}
|
|
5170
|
+
.sia-query-form__field .sia-space-compact--horizontal:has(> .sia-select:first-child + .sia-field:last-child > .sia-input-control) > .sia-select {
|
|
5171
|
+
flex: 4 1 0;
|
|
5172
|
+
min-width: 0;
|
|
5173
|
+
width: 0;
|
|
5174
|
+
}
|
|
5175
|
+
.sia-query-form__field .sia-space-compact--horizontal:has(> .sia-select:first-child + .sia-field:last-child > .sia-input-control) > .sia-field {
|
|
5176
|
+
flex: 6 1 0;
|
|
5177
|
+
min-width: 0;
|
|
5178
|
+
width: 0;
|
|
5179
|
+
}
|
|
5170
5180
|
.sia-query-form__actions {
|
|
5171
5181
|
display: flex;
|
|
5172
5182
|
align-items: center;
|
package/dist/index.d.cts
CHANGED
|
@@ -3178,7 +3178,7 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3178
3178
|
* @defaultValue undefined
|
|
3179
3179
|
*/
|
|
3180
3180
|
showSettings?: boolean;
|
|
3181
|
-
/** 也可直接放入 Form.Item 或 Space.Compact
|
|
3181
|
+
/** 也可直接放入 Form.Item 或 Space.Compact,每个直接子项视为一个查询字段。横向 Space.Compact 仅包含左侧 Select 和右侧 Input 时,默认按 40% / 60% 分配宽度;Form.Item noStyle 包裹时同样适用。 */
|
|
3182
3182
|
children?: ReactNode;
|
|
3183
3183
|
/** 表单校验通过后执行查询。values 是完整条件;info.source 区分 submit(查询)、reset(重置)、quick(顶部预设)和 saved(已保存条件)。返回 Promise 时自动显示加载状态并阻止重复提交。 */
|
|
3184
3184
|
onSearch: (values: T, info: QueryFormSearchInfo) => void | Promise<void>;
|
|
@@ -3200,8 +3200,9 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3200
3200
|
/** 受控收起状态,需在 onCollapsedChange 中更新;全部字段能单行显示时不执行收起。收起时保留字段挂载和值,只隐藏放不下的字段,底部快捷标签始终保留。 */
|
|
3201
3201
|
collapsed?: boolean;
|
|
3202
3202
|
/**
|
|
3203
|
-
*
|
|
3204
|
-
*
|
|
3203
|
+
* 非受控模式的初始收起状态;显式 true/false 分别指定收起/展开。未指定且没有云端设置或用户手动切换时,按可见查询字段的实际展开行数自动决定:达到 3 行收起,少于 3 行展开;不计操作按钮、快捷查询或设置隐藏的字段,容器宽度变化后重新计算。
|
|
3204
|
+
* 用户手动切换后保持该选择,不再随行数自动改变。启用 settings 后,已保存的云端 defaultCollapsed 在加载完成时优先;受控 collapsed 始终优先,collapsible=false 禁用折叠。
|
|
3205
|
+
* @defaultValue undefined
|
|
3205
3206
|
*/
|
|
3206
3207
|
defaultCollapsed?: boolean;
|
|
3207
3208
|
/**
|
|
@@ -3209,7 +3210,7 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3209
3210
|
* @defaultValue Infinity
|
|
3210
3211
|
*/
|
|
3211
3212
|
collapsedCount?: number;
|
|
3212
|
-
/**
|
|
3213
|
+
/** 用户点击展开/收起时调用,参数为新的收起状态;自动行数判断和云设置应用不触发此回调。受控模式需在此回填 collapsed。 */
|
|
3213
3214
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
3214
3215
|
/**
|
|
3215
3216
|
* 顶部预设快捷查询按钮。点击后先恢复 initialValues,再覆盖该项 values,校验并自动触发 onSearch。
|
package/dist/index.d.ts
CHANGED
|
@@ -3178,7 +3178,7 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3178
3178
|
* @defaultValue undefined
|
|
3179
3179
|
*/
|
|
3180
3180
|
showSettings?: boolean;
|
|
3181
|
-
/** 也可直接放入 Form.Item 或 Space.Compact
|
|
3181
|
+
/** 也可直接放入 Form.Item 或 Space.Compact,每个直接子项视为一个查询字段。横向 Space.Compact 仅包含左侧 Select 和右侧 Input 时,默认按 40% / 60% 分配宽度;Form.Item noStyle 包裹时同样适用。 */
|
|
3182
3182
|
children?: ReactNode;
|
|
3183
3183
|
/** 表单校验通过后执行查询。values 是完整条件;info.source 区分 submit(查询)、reset(重置)、quick(顶部预设)和 saved(已保存条件)。返回 Promise 时自动显示加载状态并阻止重复提交。 */
|
|
3184
3184
|
onSearch: (values: T, info: QueryFormSearchInfo) => void | Promise<void>;
|
|
@@ -3200,8 +3200,9 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3200
3200
|
/** 受控收起状态,需在 onCollapsedChange 中更新;全部字段能单行显示时不执行收起。收起时保留字段挂载和值,只隐藏放不下的字段,底部快捷标签始终保留。 */
|
|
3201
3201
|
collapsed?: boolean;
|
|
3202
3202
|
/**
|
|
3203
|
-
*
|
|
3204
|
-
*
|
|
3203
|
+
* 非受控模式的初始收起状态;显式 true/false 分别指定收起/展开。未指定且没有云端设置或用户手动切换时,按可见查询字段的实际展开行数自动决定:达到 3 行收起,少于 3 行展开;不计操作按钮、快捷查询或设置隐藏的字段,容器宽度变化后重新计算。
|
|
3204
|
+
* 用户手动切换后保持该选择,不再随行数自动改变。启用 settings 后,已保存的云端 defaultCollapsed 在加载完成时优先;受控 collapsed 始终优先,collapsible=false 禁用折叠。
|
|
3205
|
+
* @defaultValue undefined
|
|
3205
3206
|
*/
|
|
3206
3207
|
defaultCollapsed?: boolean;
|
|
3207
3208
|
/**
|
|
@@ -3209,7 +3210,7 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3209
3210
|
* @defaultValue Infinity
|
|
3210
3211
|
*/
|
|
3211
3212
|
collapsedCount?: number;
|
|
3212
|
-
/**
|
|
3213
|
+
/** 用户点击展开/收起时调用,参数为新的收起状态;自动行数判断和云设置应用不触发此回调。受控模式需在此回填 collapsed。 */
|
|
3213
3214
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
3214
3215
|
/**
|
|
3215
3216
|
* 顶部预设快捷查询按钮。点击后先恢复 initialValues,再覆盖该项 values,校验并自动触发 onSearch。
|
package/dist/index.js
CHANGED
|
@@ -81,19 +81,19 @@ import {
|
|
|
81
81
|
Watermark,
|
|
82
82
|
message,
|
|
83
83
|
notification
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-6KWMZ7JJ.js";
|
|
85
85
|
import {
|
|
86
86
|
MarkdownEditor
|
|
87
87
|
} from "./chunk-TUXNOSCT.js";
|
|
88
88
|
import {
|
|
89
89
|
RichTextContent,
|
|
90
90
|
RichTextEditor
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-NURPAO7G.js";
|
|
92
92
|
import {
|
|
93
93
|
DatePicker,
|
|
94
94
|
SelectDateRange,
|
|
95
95
|
TimePanel
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-FOLNXKBD.js";
|
|
97
97
|
import {
|
|
98
98
|
Checkbox,
|
|
99
99
|
FloatingScrollbarProvider,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
Tooltip,
|
|
106
106
|
Tree,
|
|
107
107
|
useScrollbarProximity
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-KKU35MWK.js";
|
|
109
109
|
import {
|
|
110
110
|
Dropdown,
|
|
111
111
|
FILLED_ICON_NAMES,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
Segmented,
|
|
119
119
|
Steps,
|
|
120
120
|
useOverlayLifecycle
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-V6CRVCSB.js";
|
|
122
122
|
import {
|
|
123
123
|
Button,
|
|
124
124
|
TextArea
|
|
@@ -9129,7 +9129,7 @@ function countQueryFieldRows(centers) {
|
|
|
9129
9129
|
import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
9130
9130
|
function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed, disabled) {
|
|
9131
9131
|
const [snapshot, setSnapshot] = useState22();
|
|
9132
|
-
const [draft, setDraft] = useState22({ fields: [], defaultCollapsed });
|
|
9132
|
+
const [draft, setDraft] = useState22({ fields: [], defaultCollapsed: defaultCollapsed ?? false });
|
|
9133
9133
|
const [open, setOpen] = useState22(false);
|
|
9134
9134
|
const [loading, setLoading] = useState22(false);
|
|
9135
9135
|
const [saving, setSaving] = useState22(false);
|
|
@@ -9152,10 +9152,10 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
|
|
|
9152
9152
|
try {
|
|
9153
9153
|
const stored = (await current.config.adapter.load(current.config.scope))?.queryForm;
|
|
9154
9154
|
if (request !== token.current) return;
|
|
9155
|
-
const next = stored ?? { fields: [], defaultCollapsed: current.defaultCollapsed };
|
|
9155
|
+
const next = stored ?? { fields: [], defaultCollapsed: current.defaultCollapsed ?? false };
|
|
9156
9156
|
setSnapshot(next);
|
|
9157
9157
|
setDraft({ ...next, fields: reconcileQueryFields(latest.current.fields.map((field) => field.key), next.fields) });
|
|
9158
|
-
if (!edit) latest.current.applyCollapsed(
|
|
9158
|
+
if (!edit) latest.current.applyCollapsed(stored?.defaultCollapsed ?? latest.current.defaultCollapsed);
|
|
9159
9159
|
} catch (reason) {
|
|
9160
9160
|
if (request !== token.current) return;
|
|
9161
9161
|
setLoadFailed(true);
|
|
@@ -9278,7 +9278,7 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
|
|
|
9278
9278
|
},
|
|
9279
9279
|
item.key
|
|
9280
9280
|
)) }),
|
|
9281
|
-
/* @__PURE__ */ jsx26(Button, { type: "button", disabled: locked, onClick: () => setDraft({ fields: reconcileQueryFields(fields.map((field) => field.key)), defaultCollapsed }), children: "\u6062\u590D\u9ED8\u8BA4" })
|
|
9281
|
+
/* @__PURE__ */ jsx26(Button, { type: "button", disabled: locked, onClick: () => setDraft({ fields: reconcileQueryFields(fields.map((field) => field.key)), defaultCollapsed: defaultCollapsed ?? false }), children: "\u6062\u590D\u9ED8\u8BA4" })
|
|
9282
9282
|
] })
|
|
9283
9283
|
}
|
|
9284
9284
|
)
|
|
@@ -9299,7 +9299,7 @@ function QueryForm({
|
|
|
9299
9299
|
fieldWidth = 220,
|
|
9300
9300
|
collapsible = true,
|
|
9301
9301
|
collapsed: controlledCollapsed,
|
|
9302
|
-
defaultCollapsed
|
|
9302
|
+
defaultCollapsed,
|
|
9303
9303
|
collapsedCount = Infinity,
|
|
9304
9304
|
onCollapsedChange,
|
|
9305
9305
|
quickQueries = [],
|
|
@@ -9323,8 +9323,9 @@ function QueryForm({
|
|
|
9323
9323
|
}) {
|
|
9324
9324
|
const [form] = useForm(providedForm);
|
|
9325
9325
|
const [internalCollapsed, setInternalCollapsed] = useState23(defaultCollapsed);
|
|
9326
|
+
const [expandedRows, setExpandedRows] = useState23(0);
|
|
9326
9327
|
const [needsCollapse, setNeedsCollapse] = useState23(false);
|
|
9327
|
-
const collapsed = collapsible && needsCollapse && (controlledCollapsed ?? internalCollapsed);
|
|
9328
|
+
const collapsed = collapsible && needsCollapse && (controlledCollapsed ?? internalCollapsed ?? expandedRows >= 3);
|
|
9328
9329
|
const [searching, setSearching] = useState23(false);
|
|
9329
9330
|
const [saving, setSaving] = useState23(false);
|
|
9330
9331
|
const [removing, setRemoving] = useState23(false);
|
|
@@ -9401,6 +9402,10 @@ function QueryForm({
|
|
|
9401
9402
|
field.hidden = false;
|
|
9402
9403
|
});
|
|
9403
9404
|
if (toggle) toggle.hidden = true;
|
|
9405
|
+
if (row.clientWidth > 0) setExpandedRows(countQueryFieldRows(allFields.map((field) => {
|
|
9406
|
+
const rect = field.getBoundingClientRect();
|
|
9407
|
+
return rect.top + rect.height / 2;
|
|
9408
|
+
})));
|
|
9404
9409
|
const requiredWidth = allFields.reduce(
|
|
9405
9410
|
(total, field) => total + field.getBoundingClientRect().width + gap,
|
|
9406
9411
|
actions.getBoundingClientRect().width
|
|
@@ -1051,7 +1051,8 @@ var outlineIconBounds = {
|
|
|
1051
1051
|
"search": [4, 4, 17, 17],
|
|
1052
1052
|
"send": [3, 3, 18, 18],
|
|
1053
1053
|
"server": [3, 4, 18, 16],
|
|
1054
|
-
|
|
1054
|
+
// 六齿直线轮廓的原始边界,不含描边。
|
|
1055
|
+
"settings": [4.4825, 4.1215, 15.035, 15.757],
|
|
1055
1056
|
"share": [3, 2, 18, 20],
|
|
1056
1057
|
"shield": [4, 3, 16, 19],
|
|
1057
1058
|
"shield-check": [4, 3, 16, 19],
|
|
@@ -1248,10 +1249,10 @@ var coreIconPaths = {
|
|
|
1248
1249
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M2.8 20c.6-3.8 2.7-5.8 6.2-5.8s5.6 2 6.2 5.8" }),
|
|
1249
1250
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M15 5.2a3.5 3.5 0 0 1 0 6.6M16.2 14.5c2.9.5 4.4 2.3 4.9 5.5" })
|
|
1250
1251
|
] }),
|
|
1251
|
-
//
|
|
1252
|
+
// 六齿轮廓为小尺寸保留清晰齿间距,主体大小与描边仍遵循统一几何规则。
|
|
1252
1253
|
settings: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1253
1254
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "2.8" }),
|
|
1254
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M9.9479 6.3618 10.6108 4.1215 13.3892 4.1215 14.0521 6.3618 15.8567 7.4037 18.1284 6.8577 19.5175 9.2638 17.9088 10.9581 17.9088 13.0419 19.5175 14.7362 18.1284 17.1423 15.8567 16.5963 14.0521 17.6382 13.3892 19.8785 10.6108 19.8785 9.9479 17.6382 8.1433 16.5963 5.8716 17.1423 4.4825 14.7362 6.0912 13.0419 6.0912 10.9581 4.4825 9.2638 5.8716 6.8577 8.1433 7.4037Z" })
|
|
1255
1256
|
] }),
|
|
1256
1257
|
edit: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1257
1258
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
package/dist/rich-text-editor.js
CHANGED
|
@@ -968,7 +968,8 @@ var outlineIconBounds = {
|
|
|
968
968
|
"search": [4, 4, 17, 17],
|
|
969
969
|
"send": [3, 3, 18, 18],
|
|
970
970
|
"server": [3, 4, 18, 16],
|
|
971
|
-
|
|
971
|
+
// 六齿直线轮廓的原始边界,不含描边。
|
|
972
|
+
"settings": [4.4825, 4.1215, 15.035, 15.757],
|
|
972
973
|
"share": [3, 2, 18, 20],
|
|
973
974
|
"shield": [4, 3, 16, 19],
|
|
974
975
|
"shield-check": [4, 3, 16, 19],
|
|
@@ -1165,10 +1166,10 @@ var coreIconPaths = {
|
|
|
1165
1166
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2.8 20c.6-3.8 2.7-5.8 6.2-5.8s5.6 2 6.2 5.8" }),
|
|
1166
1167
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M15 5.2a3.5 3.5 0 0 1 0 6.6M16.2 14.5c2.9.5 4.4 2.3 4.9 5.5" })
|
|
1167
1168
|
] }),
|
|
1168
|
-
//
|
|
1169
|
+
// 六齿轮廓为小尺寸保留清晰齿间距,主体大小与描边仍遵循统一几何规则。
|
|
1169
1170
|
settings: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1170
1171
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "2.8" }),
|
|
1171
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9.9479 6.3618 10.6108 4.1215 13.3892 4.1215 14.0521 6.3618 15.8567 7.4037 18.1284 6.8577 19.5175 9.2638 17.9088 10.9581 17.9088 13.0419 19.5175 14.7362 18.1284 17.1423 15.8567 16.5963 14.0521 17.6382 13.3892 19.8785 10.6108 19.8785 9.9479 17.6382 8.1433 16.5963 5.8716 17.1423 4.4825 14.7362 6.0912 13.0419 6.0912 10.9581 4.4825 9.2638 5.8716 6.8577 8.1433 7.4037Z" })
|
|
1172
1173
|
] }),
|
|
1173
1174
|
edit: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1174
1175
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectDateRange
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FOLNXKBD.js";
|
|
4
|
+
import "./chunk-KKU35MWK.js";
|
|
5
|
+
import "./chunk-V6CRVCSB.js";
|
|
6
6
|
import "./chunk-SJFT5OSX.js";
|
|
7
7
|
import "./chunk-PUZWLIIJ.js";
|
|
8
8
|
export {
|