szld-libs 0.3.28 → 0.3.30

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import React, { useMemo, createElement } from "react";
3
- import { ConfigProvider, Form, Row, Col, Input, Space, Button, Cascader, TimePicker, DatePicker, Switch, Radio, InputNumber, Select, Checkbox, Rate } from "antd";
3
+ import { Form, Row, Col, Input, Space, Button, Cascader, TimePicker, DatePicker, Switch, Radio, InputNumber, Select, Checkbox, Rate } from "antd";
4
4
  import { CloseCircleFilled } from "@ant-design/icons";
5
5
  import _ from "lodash";
6
6
  import UploadFile from "../Upload";
@@ -65,43 +65,31 @@ const CreateForm = (props) => {
65
65
  }
66
66
  return ((_a = item.render) == null ? void 0 : _a.call(item, data == null ? void 0 : data[item.dataIndex], data)) || item.value || (data == null ? void 0 : data[item.dataIndex]);
67
67
  };
68
- return /* @__PURE__ */ jsx(
69
- ConfigProvider,
68
+ return /* @__PURE__ */ jsx(Form, { layout: "horizontal", form: formProps == null ? void 0 : formProps.form, ...formLayout, ...formProps || {}, children: /* @__PURE__ */ jsx(Row, { gutter: 16, ...rowProps, children: items.filter((v) => !v.hidden).map((item, index) => /* @__PURE__ */ jsx(Col, { ...item.colProps || { span: 24 }, children: /* @__PURE__ */ jsx(
69
+ Form.Item,
70
70
  {
71
- theme: {
72
- components: {
73
- Select: {
74
- zIndexPopup: 3e4
75
- }
76
- }
77
- },
78
- children: /* @__PURE__ */ jsx(Form, { layout: "horizontal", form: formProps == null ? void 0 : formProps.form, ...formLayout, ...formProps || {}, children: /* @__PURE__ */ jsx(Row, { gutter: 16, ...rowProps, children: items.filter((v) => !v.hidden).map((item, index) => /* @__PURE__ */ jsx(Col, { ...item.colProps || { span: 24 }, children: /* @__PURE__ */ jsx(
79
- Form.Item,
71
+ ...item.valueType === "upload" ? {
72
+ getValueFromEvent: normFile
73
+ } : {},
74
+ label: !hiddenTitle ? item.title : "",
75
+ name: item.valueType === "btns" ? void 0 : item.dataIndex,
76
+ ...item.formItemProps,
77
+ children: item.readonly ? /* @__PURE__ */ jsx("div", { children: renderReadOnly(item) }) : item.readonly === void 0 && readonly ? /* @__PURE__ */ jsx("div", { children: renderReadOnly(item) }) : /* @__PURE__ */ jsx(
78
+ FormFields,
80
79
  {
81
- ...item.valueType === "upload" ? {
82
- getValueFromEvent: normFile
83
- } : {},
84
- label: !hiddenTitle ? item.title : "",
85
- name: item.valueType === "btns" ? void 0 : item.dataIndex,
86
- ...item.formItemProps,
87
- children: item.readonly ? /* @__PURE__ */ jsx("div", { children: renderReadOnly(item) }) : item.readonly === void 0 && readonly ? /* @__PURE__ */ jsx("div", { children: renderReadOnly(item) }) : /* @__PURE__ */ jsx(
88
- FormFields,
89
- {
90
- onChange: (e) => {
91
- var _a;
92
- return (_a = item == null ? void 0 : item.onChange) == null ? void 0 : _a.call(item, e);
93
- },
94
- valueType: item.valueType,
95
- onBtnClick,
96
- valueProps: item.valueProps,
97
- formItemProps: item.formItemProps,
98
- langId
99
- }
100
- )
80
+ onChange: (e) => {
81
+ var _a;
82
+ return (_a = item == null ? void 0 : item.onChange) == null ? void 0 : _a.call(item, e);
83
+ },
84
+ valueType: item.valueType,
85
+ onBtnClick,
86
+ valueProps: item.valueProps,
87
+ formItemProps: item.formItemProps,
88
+ langId
101
89
  }
102
- ) }, item.dataIndex || index)) }) })
90
+ )
103
91
  }
104
- );
92
+ ) }, item.dataIndex || index)) }) });
105
93
  };
106
94
  const FormFields = (props) => {
107
95
  const { valueType, valueProps, value, onChange, onBtnClick, inputRef, formItemProps, langId } = props;
@@ -67,43 +67,31 @@ const CreateForm = (props) => {
67
67
  }
68
68
  return ((_a = item.render) == null ? void 0 : _a.call(item, data == null ? void 0 : data[item.dataIndex], data)) || item.value || (data == null ? void 0 : data[item.dataIndex]);
69
69
  };
70
- return /* @__PURE__ */ jsxRuntime.jsx(
71
- antd.ConfigProvider,
70
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Form, { layout: "horizontal", form: formProps == null ? void 0 : formProps.form, ...formLayout, ...formProps || {}, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { gutter: 16, ...rowProps, children: items.filter((v) => !v.hidden).map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { ...item.colProps || { span: 24 }, children: /* @__PURE__ */ jsxRuntime.jsx(
71
+ antd.Form.Item,
72
72
  {
73
- theme: {
74
- components: {
75
- Select: {
76
- zIndexPopup: 3e4
77
- }
78
- }
79
- },
80
- children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form, { layout: "horizontal", form: formProps == null ? void 0 : formProps.form, ...formLayout, ...formProps || {}, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { gutter: 16, ...rowProps, children: items.filter((v) => !v.hidden).map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(antd.Col, { ...item.colProps || { span: 24 }, children: /* @__PURE__ */ jsxRuntime.jsx(
81
- antd.Form.Item,
73
+ ...item.valueType === "upload" ? {
74
+ getValueFromEvent: normFile
75
+ } : {},
76
+ label: !hiddenTitle ? item.title : "",
77
+ name: item.valueType === "btns" ? void 0 : item.dataIndex,
78
+ ...item.formItemProps,
79
+ children: item.readonly ? /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderReadOnly(item) }) : item.readonly === void 0 && readonly ? /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderReadOnly(item) }) : /* @__PURE__ */ jsxRuntime.jsx(
80
+ FormFields,
82
81
  {
83
- ...item.valueType === "upload" ? {
84
- getValueFromEvent: normFile
85
- } : {},
86
- label: !hiddenTitle ? item.title : "",
87
- name: item.valueType === "btns" ? void 0 : item.dataIndex,
88
- ...item.formItemProps,
89
- children: item.readonly ? /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderReadOnly(item) }) : item.readonly === void 0 && readonly ? /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderReadOnly(item) }) : /* @__PURE__ */ jsxRuntime.jsx(
90
- FormFields,
91
- {
92
- onChange: (e) => {
93
- var _a;
94
- return (_a = item == null ? void 0 : item.onChange) == null ? void 0 : _a.call(item, e);
95
- },
96
- valueType: item.valueType,
97
- onBtnClick,
98
- valueProps: item.valueProps,
99
- formItemProps: item.formItemProps,
100
- langId
101
- }
102
- )
82
+ onChange: (e) => {
83
+ var _a;
84
+ return (_a = item == null ? void 0 : item.onChange) == null ? void 0 : _a.call(item, e);
85
+ },
86
+ valueType: item.valueType,
87
+ onBtnClick,
88
+ valueProps: item.valueProps,
89
+ formItemProps: item.formItemProps,
90
+ langId
103
91
  }
104
- ) }, item.dataIndex || index)) }) })
92
+ )
105
93
  }
106
- );
94
+ ) }, item.dataIndex || index)) }) });
107
95
  };
108
96
  const FormFields = (props) => {
109
97
  const { valueType, valueProps, value, onChange, onBtnClick, inputRef, formItemProps, langId } = props;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.3.28",
4
+ "version": "0.3.30",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",