onchain-uikit 3.9.4-alpha55 → 3.9.4-alpha57
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/index.es.js
CHANGED
|
@@ -6732,7 +6732,7 @@ const AliIconFontFn = (h3 = "/font/iconfont.js") => create({
|
|
|
6732
6732
|
}, h3.isMouseHoldShowDeleteMode || 1e3);
|
|
6733
6733
|
S8(V8);
|
|
6734
6734
|
}, R8 = () => {
|
|
6735
|
-
$8 && (clearTimeout($8), S8(null))
|
|
6735
|
+
$8 && (clearTimeout($8), S8(null));
|
|
6736
6736
|
}, A8 = useMemo$1(() => h3.languageApicode, [h3.languageApicode]), I8 = useMemo$1(() => A8 && ["English"].includes(A8) ? "10px" : "12px", [A8]), T8 = useMemo$1(() => A8 && ["English"].includes(A8) ? "12px" : "14px", [A8]), O8 = useMemo$1(() => typeof h3.children == "string" && /[ \t\n\r]/.test(h3.children) ? "2" : "1", [h3.children]), N8 = h3.placement ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6737
6737
|
"div",
|
|
6738
6738
|
{
|
|
@@ -6755,7 +6755,7 @@ const AliIconFontFn = (h3 = "/font/iconfont.js") => create({
|
|
|
6755
6755
|
},
|
|
6756
6756
|
onMouseLeave: (V8) => {
|
|
6757
6757
|
var W8;
|
|
6758
|
-
h3.isMouseHoldShowDeleteMode && R8(), (W8 = h3.onMouseLeave) == null || W8.call(h3, V8);
|
|
6758
|
+
A3(!1), h3.isMouseHoldShowDeleteMode && R8(), (W8 = h3.onMouseLeave) == null || W8.call(h3, V8);
|
|
6759
6759
|
},
|
|
6760
6760
|
children: [
|
|
6761
6761
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -27254,7 +27254,50 @@ const PopupSelect = React__default.forwardRef((h3, t3) => {
|
|
|
27254
27254
|
}
|
|
27255
27255
|
)
|
|
27256
27256
|
] });
|
|
27257
|
-
}),
|
|
27257
|
+
}), generateSnowId = () => {
|
|
27258
|
+
function h3() {
|
|
27259
|
+
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
27260
|
+
}
|
|
27261
|
+
return h3() + h3() + "-" + h3() + "-" + h3() + "-" + h3() + "-" + h3() + h3() + h3();
|
|
27262
|
+
}, ContextMenu = (h3) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu, { id: h3.menuId, children: [
|
|
27263
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27264
|
+
Item$2,
|
|
27265
|
+
{
|
|
27266
|
+
onClick: (t3) => {
|
|
27267
|
+
h3.onFill && h3.onFill("up", t3.props.key);
|
|
27268
|
+
},
|
|
27269
|
+
children: template("sys.prompt.fillUp", { placeholder: "向上填充" })
|
|
27270
|
+
}
|
|
27271
|
+
),
|
|
27272
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27273
|
+
Item$2,
|
|
27274
|
+
{
|
|
27275
|
+
onClick: (t3) => {
|
|
27276
|
+
h3.onFill && h3.onFill("down", t3.props.key);
|
|
27277
|
+
},
|
|
27278
|
+
children: template("sys.prompt.fillDown", { placeholder: "向下填充" })
|
|
27279
|
+
}
|
|
27280
|
+
)
|
|
27281
|
+
] }), DatePopupClassName = "date-picker-popup-for-hack", OnChainDatepicker = (h3) => {
|
|
27282
|
+
const t3 = useRef(null), $3 = generateSnowId();
|
|
27283
|
+
return useEffect(() => {
|
|
27284
|
+
const k3 = (A3) => {
|
|
27285
|
+
var R8;
|
|
27286
|
+
const $8 = A3.target, S8 = document.querySelector(`.${DatePopupClassName}`), x8 = t3.current;
|
|
27287
|
+
x8 && !x8.contains($8) && (!S8 || !S8.contains($8)) && ((R8 = h3.onBlur) == null || R8.call(h3, A3, ""));
|
|
27288
|
+
};
|
|
27289
|
+
return document.addEventListener("mousedown", k3), () => document.removeEventListener("mousedown", k3);
|
|
27290
|
+
}, [h3]), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: t3, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27291
|
+
DatePicker,
|
|
27292
|
+
{
|
|
27293
|
+
id: $3,
|
|
27294
|
+
...h3,
|
|
27295
|
+
popupClassName: DatePopupClassName,
|
|
27296
|
+
onBlur: () => {
|
|
27297
|
+
}
|
|
27298
|
+
}
|
|
27299
|
+
) });
|
|
27300
|
+
}, method$1 = [
|
|
27258
27301
|
null,
|
|
27259
27302
|
(h3, t3) => (h3 = hooks(`${h3.format("YYYY-MM-DD")} 00:00:00`), t3.valueOf() < h3.valueOf()),
|
|
27260
27303
|
(h3, t3) => (h3 = hooks(`${h3.format("YYYY-MM-DD")} 23:59:59`), t3.valueOf() <= h3.valueOf()),
|
|
@@ -27408,7 +27451,7 @@ const inputFormat = {
|
|
|
27408
27451
|
XMT: "PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",
|
|
27409
27452
|
XPR: "ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)"
|
|
27410
27453
|
}, OnChainTableFormItem = React__default.forwardRef((h3, t3) => {
|
|
27411
|
-
const $3 = useRef(), k3 = ["Input", "Input.TextArea", "Number", "CompositeForm"], A3 = ["Select", "
|
|
27454
|
+
const $3 = useRef(), k3 = ["Input", "Input.TextArea", "Number", "CompositeForm"], A3 = ["Select", "Cascader", "TreeSelect", "DatePicker.RangePicker", "Image", "File"], $8 = h3.formprops.type;
|
|
27412
27455
|
useImperativeHandle(t3, () => ({
|
|
27413
27456
|
focusFormItem: () => {
|
|
27414
27457
|
var R8;
|
|
@@ -27435,12 +27478,26 @@ const inputFormat = {
|
|
|
27435
27478
|
onBlur: (O8) => {
|
|
27436
27479
|
h3.onSave && h3.onSave(O8);
|
|
27437
27480
|
}
|
|
27481
|
+
} : $8 === "Date" ? A8 = {
|
|
27482
|
+
...h3.formprops.props,
|
|
27483
|
+
// getPopupContainer: (triggerNode: any) => triggerNode.parentNode,
|
|
27484
|
+
size: "small",
|
|
27485
|
+
onChange: h3.onSave,
|
|
27486
|
+
// onOpenChange: (e) => {
|
|
27487
|
+
// if (!e) {
|
|
27488
|
+
// props.onSave && props.onSave(e);
|
|
27489
|
+
// }
|
|
27490
|
+
// },
|
|
27491
|
+
onBlur: h3.onSave,
|
|
27492
|
+
onClick: (O8) => {
|
|
27493
|
+
O8.stopPropagation();
|
|
27494
|
+
}
|
|
27438
27495
|
} : A3.includes($8) && (A8 = {
|
|
27439
27496
|
...h3.formprops.props,
|
|
27440
27497
|
// getPopupContainer: (triggerNode: any) => triggerNode.parentNode,
|
|
27441
27498
|
size: "small",
|
|
27442
27499
|
onChange: ((T8 = h3.formprops) == null ? void 0 : T8.props.mode) === "multiple" || h3.formprops.props.treeCheckable ? void 0 : h3.onSave,
|
|
27443
|
-
onBlur:
|
|
27500
|
+
onBlur: h3.onSave,
|
|
27444
27501
|
onClick: (O8) => {
|
|
27445
27502
|
O8.stopPropagation();
|
|
27446
27503
|
}
|
|
@@ -28225,31 +28282,7 @@ const EditableCell = ({
|
|
|
28225
28282
|
)
|
|
28226
28283
|
}
|
|
28227
28284
|
);
|
|
28228
|
-
},
|
|
28229
|
-
function h3() {
|
|
28230
|
-
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
28231
|
-
}
|
|
28232
|
-
return h3() + h3() + "-" + h3() + "-" + h3() + "-" + h3() + "-" + h3() + h3() + h3();
|
|
28233
|
-
}, ContextMenu = (h3) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu, { id: h3.menuId, children: [
|
|
28234
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28235
|
-
Item$2,
|
|
28236
|
-
{
|
|
28237
|
-
onClick: (t3) => {
|
|
28238
|
-
h3.onFill && h3.onFill("up", t3.props.key);
|
|
28239
|
-
},
|
|
28240
|
-
children: template("sys.prompt.fillUp", { placeholder: "向上填充" })
|
|
28241
|
-
}
|
|
28242
|
-
),
|
|
28243
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28244
|
-
Item$2,
|
|
28245
|
-
{
|
|
28246
|
-
onClick: (t3) => {
|
|
28247
|
-
h3.onFill && h3.onFill("down", t3.props.key);
|
|
28248
|
-
},
|
|
28249
|
-
children: template("sys.prompt.fillDown", { placeholder: "向下填充" })
|
|
28250
|
-
}
|
|
28251
|
-
)
|
|
28252
|
-
] }), useFiltered = (h3) => {
|
|
28285
|
+
}, useFiltered = (h3) => {
|
|
28253
28286
|
const [t3, $3] = useState({}), [k3, A3] = useState({}), $8 = useRef(null), { Option: S8 } = Select$2, x8 = (O8, N8) => {
|
|
28254
28287
|
$3(O8), A3(N8);
|
|
28255
28288
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { DatePickerProps } from 'antd/lib';
|
|
1
2
|
import { FC } from 'react';
|
|
2
3
|
export declare const DatePopupClassName = "date-picker-popup-for-hack";
|
|
3
|
-
export interface OnChainDatepickerProps {
|
|
4
|
+
export interface OnChainDatepickerProps extends DatePickerProps {
|
|
4
5
|
}
|
|
5
6
|
declare const OnChainDatepicker: FC<OnChainDatepickerProps>;
|
|
6
7
|
export default OnChainDatepicker;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onchain-uikit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.9.4-
|
|
4
|
+
"version": "3.9.4-alpha57",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
7
|
-
"build": "NODE_OPTIONS=--max_old_space_size=4096 vite build",
|
|
7
|
+
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite build",
|
|
8
8
|
"yalc:publish": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite --mode production --config vite.config.ts build && yalc publish",
|
|
9
9
|
"yalc:push": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite --mode production --config vite.config.ts build && yalc push",
|
|
10
10
|
"lint": "eslint .",
|