szld-libs 0.4.37 → 0.4.39
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/szld-components.es.js +6 -6
- package/dist/szld-components.umd.js +2 -2
- package/es/components/DynamicForm/useDynamicForm.js +3 -3
- package/es/components/DynamicFormMobile/useDynamicForm.js +3 -3
- package/lib/components/DynamicForm/useDynamicForm.js +3 -3
- package/lib/components/DynamicFormMobile/useDynamicForm.js +3 -3
- package/package.json +2 -2
|
@@ -333,7 +333,7 @@ function useDynamicForm(props) {
|
|
|
333
333
|
Form.Item,
|
|
334
334
|
{
|
|
335
335
|
label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"],
|
|
336
|
-
required: (_e = itemWithJson.json) == null ? void 0 : _e.must,
|
|
336
|
+
required: ((_e = itemWithJson.json) == null ? void 0 : _e.must) && !hidden,
|
|
337
337
|
children: /* @__PURE__ */ jsx(Space.Compact, { children: combinations.map((item, index) => {
|
|
338
338
|
var _a2, _b2, _c2, _d2, _e2;
|
|
339
339
|
let initValue = handleSetFormItemInitialValue(item);
|
|
@@ -359,7 +359,7 @@ function useDynamicForm(props) {
|
|
|
359
359
|
noStyle: true,
|
|
360
360
|
initialValue: initValue,
|
|
361
361
|
rules: [
|
|
362
|
-
...((_c2 = item.json) == null ? void 0 : _c2.must) ? [
|
|
362
|
+
...((_c2 = item.json) == null ? void 0 : _c2.must) && !hidden ? [
|
|
363
363
|
{
|
|
364
364
|
required: true,
|
|
365
365
|
message: message2 || `${placeholder}${item.attrname}`
|
|
@@ -400,7 +400,7 @@ function useDynamicForm(props) {
|
|
|
400
400
|
initialValue,
|
|
401
401
|
hidden,
|
|
402
402
|
rules: [
|
|
403
|
-
...((_f = itemWithJson.json) == null ? void 0 : _f.must) ? [
|
|
403
|
+
...((_f = itemWithJson.json) == null ? void 0 : _f.must) && !hidden ? [
|
|
404
404
|
{
|
|
405
405
|
required: true,
|
|
406
406
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
@@ -306,11 +306,11 @@ function useDynamicForm(props) {
|
|
|
306
306
|
display: hidden ? "none" : "block"
|
|
307
307
|
},
|
|
308
308
|
label: index === 0 ? (_b2 = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _b2["combination-name"] : /* @__PURE__ */ jsx("div", { style: { visibility: "hidden" }, children: (_c2 = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _c2["combination-name"] }),
|
|
309
|
-
required: index === 0 ? (_d2 = item.json) == null ? void 0 : _d2.must : false,
|
|
309
|
+
required: index === 0 ? ((_d2 = item.json) == null ? void 0 : _d2.must) && !hidden : false,
|
|
310
310
|
name: formListField ? Array.isArray(formListField.name) ? [...formListField.name, item.attrid] : [formListField.name, item.attrid] : item.attrid,
|
|
311
311
|
initialValue: initValue,
|
|
312
312
|
rules: [
|
|
313
|
-
...((_e2 = item.json) == null ? void 0 : _e2.must) ? [
|
|
313
|
+
...((_e2 = item.json) == null ? void 0 : _e2.must) && !hidden ? [
|
|
314
314
|
{
|
|
315
315
|
required: true,
|
|
316
316
|
message: message2 || `${placeholder}${item.attrname}`
|
|
@@ -354,7 +354,7 @@ function useDynamicForm(props) {
|
|
|
354
354
|
display: hidden ? "none" : "block"
|
|
355
355
|
},
|
|
356
356
|
rules: [
|
|
357
|
-
...((_e = itemWithJson.json) == null ? void 0 : _e.must) ? [
|
|
357
|
+
...((_e = itemWithJson.json) == null ? void 0 : _e.must) && !hidden ? [
|
|
358
358
|
{
|
|
359
359
|
required: true,
|
|
360
360
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
@@ -334,7 +334,7 @@ function useDynamicForm(props) {
|
|
|
334
334
|
antd.Form.Item,
|
|
335
335
|
{
|
|
336
336
|
label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"],
|
|
337
|
-
required: (_e = itemWithJson.json) == null ? void 0 : _e.must,
|
|
337
|
+
required: ((_e = itemWithJson.json) == null ? void 0 : _e.must) && !hidden,
|
|
338
338
|
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Space.Compact, { children: combinations.map((item, index) => {
|
|
339
339
|
var _a2, _b2, _c2, _d2, _e2;
|
|
340
340
|
let initValue = func.handleSetFormItemInitialValue(item);
|
|
@@ -360,7 +360,7 @@ function useDynamicForm(props) {
|
|
|
360
360
|
noStyle: true,
|
|
361
361
|
initialValue: initValue,
|
|
362
362
|
rules: [
|
|
363
|
-
...((_c2 = item.json) == null ? void 0 : _c2.must) ? [
|
|
363
|
+
...((_c2 = item.json) == null ? void 0 : _c2.must) && !hidden ? [
|
|
364
364
|
{
|
|
365
365
|
required: true,
|
|
366
366
|
message: message2 || `${placeholder}${item.attrname}`
|
|
@@ -401,7 +401,7 @@ function useDynamicForm(props) {
|
|
|
401
401
|
initialValue,
|
|
402
402
|
hidden,
|
|
403
403
|
rules: [
|
|
404
|
-
...((_f = itemWithJson.json) == null ? void 0 : _f.must) ? [
|
|
404
|
+
...((_f = itemWithJson.json) == null ? void 0 : _f.must) && !hidden ? [
|
|
405
405
|
{
|
|
406
406
|
required: true,
|
|
407
407
|
message: `${placeholder}${itemWithJson.attrname}`
|
|
@@ -307,11 +307,11 @@ function useDynamicForm(props) {
|
|
|
307
307
|
display: hidden ? "none" : "block"
|
|
308
308
|
},
|
|
309
309
|
label: index === 0 ? (_b2 = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _b2["combination-name"] : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { visibility: "hidden" }, children: (_c2 = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _c2["combination-name"] }),
|
|
310
|
-
required: index === 0 ? (_d2 = item.json) == null ? void 0 : _d2.must : false,
|
|
310
|
+
required: index === 0 ? ((_d2 = item.json) == null ? void 0 : _d2.must) && !hidden : false,
|
|
311
311
|
name: formListField ? Array.isArray(formListField.name) ? [...formListField.name, item.attrid] : [formListField.name, item.attrid] : item.attrid,
|
|
312
312
|
initialValue: initValue,
|
|
313
313
|
rules: [
|
|
314
|
-
...((_e2 = item.json) == null ? void 0 : _e2.must) ? [
|
|
314
|
+
...((_e2 = item.json) == null ? void 0 : _e2.must) && !hidden ? [
|
|
315
315
|
{
|
|
316
316
|
required: true,
|
|
317
317
|
message: message2 || `${placeholder}${item.attrname}`
|
|
@@ -355,7 +355,7 @@ function useDynamicForm(props) {
|
|
|
355
355
|
display: hidden ? "none" : "block"
|
|
356
356
|
},
|
|
357
357
|
rules: [
|
|
358
|
-
...((_e = itemWithJson.json) == null ? void 0 : _e.must) ? [
|
|
358
|
+
...((_e = itemWithJson.json) == null ? void 0 : _e.must) && !hidden ? [
|
|
359
359
|
{
|
|
360
360
|
required: true,
|
|
361
361
|
message: `${placeholder}${itemWithJson.attrname}`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "szld-libs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.39",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react-router-dom": "^6.6.1",
|
|
24
24
|
"react-vant": "^3.3.5",
|
|
25
25
|
"react-window": "^1.8.9",
|
|
26
|
-
"szld-libs": "^0.4.
|
|
26
|
+
"szld-libs": "^0.4.38"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/crypto-js": "^4.2.1",
|