szld-libs 0.4.36 → 0.4.38

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.
@@ -91,6 +91,7 @@ const MySelect = ({
91
91
  },
92
92
  options,
93
93
  style: { ...style },
94
+ maxTagCount: 1,
94
95
  allowClear: true,
95
96
  onChange: (val) => {
96
97
  if (attrid && (instanceList == null ? void 0 : instanceList.length) > 0 && (item == null ? void 0 : item.inputType) === "instance-url") {
@@ -192,7 +192,9 @@ function useDynamicForm(props) {
192
192
  parentFormListField,
193
193
  isShowLabel = true
194
194
  }) => {
195
+ var _a;
195
196
  const formListInitValue = handleSetFormItemInitialValue(itemWithJson);
197
+ const hidden = (_a = itemWithJson.json) == null ? void 0 : _a.hidden;
196
198
  let children = itemWithJson.children || [];
197
199
  if (Array.isArray(children == null ? void 0 : children[0]) && children.length) {
198
200
  children = children[0];
@@ -204,7 +206,7 @@ function useDynamicForm(props) {
204
206
  }
205
207
  return [itemWithJson.attrid, field.name];
206
208
  };
207
- return /* @__PURE__ */ jsx(Col, { span: 24 / colNum, children: /* @__PURE__ */ jsx(
209
+ return /* @__PURE__ */ jsx(Col, { span: hidden ? 0 : 24 / colNum, children: /* @__PURE__ */ jsx(
208
210
  Collapse,
209
211
  {
210
212
  bordered: false,
@@ -299,10 +301,11 @@ function useDynamicForm(props) {
299
301
  isShowLabel = true
300
302
  }) => {
301
303
  var _a, _b, _c, _d, _e, _f, _g, _h;
302
- if (((_a = itemWithJson.json) == null ? void 0 : _a.hide) === true) {
304
+ const hidden = (_a = itemWithJson.json) == null ? void 0 : _a.hidden;
305
+ if (((_b = itemWithJson.json) == null ? void 0 : _b.hide) === true) {
303
306
  return /* @__PURE__ */ jsx(Fragment$1, {});
304
307
  }
305
- if (itemWithJson.attrtype === 1) {
308
+ if (itemWithJson.attrtype === 1 && !hidden) {
306
309
  return renderNestedFormList({
307
310
  itemWithJson,
308
311
  colNum,
@@ -322,12 +325,11 @@ function useDynamicForm(props) {
322
325
  }
323
326
  if (itemWithJson.attrtype === 0) {
324
327
  const initialValue = handleSetFormItemInitialValue(itemWithJson);
325
- const message2 = (_b = itemWithJson.json) == null ? void 0 : _b["default-prompt"];
326
- const hidden = (_c = itemWithJson.json) == null ? void 0 : _c.hidden;
328
+ const message2 = (_c = itemWithJson.json) == null ? void 0 : _c["default-prompt"];
327
329
  const placeholder = handleGetPlaceholder(itemWithJson, langId);
328
330
  const { combinations = [] } = itemWithJson.json || {};
329
331
  if (combinations == null ? void 0 : combinations.length) {
330
- return /* @__PURE__ */ jsx(Col, { span: 24 / colNum, children: /* @__PURE__ */ jsx(
332
+ return /* @__PURE__ */ jsx(Col, { span: hidden ? 0 : 24 / colNum, children: /* @__PURE__ */ jsx(
331
333
  Form.Item,
332
334
  {
333
335
  label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"],
@@ -390,7 +392,7 @@ function useDynamicForm(props) {
390
392
  ) });
391
393
  }
392
394
  const formItemName = isFormListItem && formListField ? Array.isArray(formListField.name) ? [...formListField.name, itemWithJson.attrid] : [formListField.name, itemWithJson.attrid] : itemWithJson.attrid;
393
- return /* @__PURE__ */ jsx(Col, { span: 24 / colNum, children: /* @__PURE__ */ jsx(
395
+ return /* @__PURE__ */ jsx(Col, { span: hidden ? 0 : 24 / colNum, children: /* @__PURE__ */ jsx(
394
396
  Form.Item,
395
397
  {
396
398
  name: formItemName,
@@ -652,7 +654,7 @@ function useDynamicForm(props) {
652
654
  DatePicker,
653
655
  {
654
656
  multiple: true,
655
- maxTagCount: ((_p = item == null ? void 0 : item.json) == null ? void 0 : _p["max-tag-count"]) || 2,
657
+ maxTagCount: ((_p = item == null ? void 0 : item.json) == null ? void 0 : _p["max-tag-count"]) || 1,
656
658
  disabled: readonly || ((_q = item.json) == null ? void 0 : _q.readonly) || false,
657
659
  style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
658
660
  }
@@ -254,11 +254,12 @@ function useDynamicForm(props) {
254
254
  isShowLabel = true
255
255
  }) => {
256
256
  var _a, _b, _c, _d, _e, _f, _g;
257
- if (((_a = itemWithJson.json) == null ? void 0 : _a.hide) === true || (hideAttrList == null ? void 0 : hideAttrList.includes(itemWithJson.attrid))) {
257
+ const hidden = (_a = itemWithJson.json) == null ? void 0 : _a.hidden;
258
+ if (((_b = itemWithJson.json) == null ? void 0 : _b.hide) === true || (hideAttrList == null ? void 0 : hideAttrList.includes(itemWithJson.attrid))) {
258
259
  return /* @__PURE__ */ jsx(Fragment$1, {});
259
260
  }
260
- readonly = ((_b = itemWithJson.json) == null ? void 0 : _b.readonly) || readonly || false;
261
- if (itemWithJson.attrtype === 1) {
261
+ readonly = ((_c = itemWithJson.json) == null ? void 0 : _c.readonly) || readonly || false;
262
+ if (itemWithJson.attrtype === 1 && !hidden) {
262
263
  return renderNestedFormList({
263
264
  itemWithJson,
264
265
  colNum,
@@ -278,10 +279,9 @@ function useDynamicForm(props) {
278
279
  }
279
280
  if (itemWithJson.attrtype === 0) {
280
281
  const initialValue = handleSetFormItemInitialValue(itemWithJson);
281
- const message2 = (_c = itemWithJson.json) == null ? void 0 : _c["default-prompt"];
282
+ const message2 = (_d = itemWithJson.json) == null ? void 0 : _d["default-prompt"];
282
283
  const placeholder = handleGetPlaceholder(itemWithJson, langId);
283
284
  const { combinations = [] } = itemWithJson.json || {};
284
- const hidden = (_d = itemWithJson.json) == null ? void 0 : _d.hidden;
285
285
  if (combinations == null ? void 0 : combinations.length) {
286
286
  return /* @__PURE__ */ jsx(Flex, { children: combinations.map((item, index) => {
287
287
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2;