szld-libs 0.4.35 → 0.4.36

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.
@@ -253,7 +253,7 @@ function useDynamicForm(props) {
253
253
  formListField,
254
254
  isShowLabel = true
255
255
  }) => {
256
- var _a, _b, _c, _d, _e, _f;
256
+ var _a, _b, _c, _d, _e, _f, _g;
257
257
  if (((_a = itemWithJson.json) == null ? void 0 : _a.hide) === true || (hideAttrList == null ? void 0 : hideAttrList.includes(itemWithJson.attrid))) {
258
258
  return /* @__PURE__ */ jsx(Fragment$1, {});
259
259
  }
@@ -281,9 +281,10 @@ function useDynamicForm(props) {
281
281
  const message2 = (_c = itemWithJson.json) == null ? void 0 : _c["default-prompt"];
282
282
  const placeholder = handleGetPlaceholder(itemWithJson, langId);
283
283
  const { combinations = [] } = itemWithJson.json || {};
284
+ const hidden = (_d = itemWithJson.json) == null ? void 0 : _d.hidden;
284
285
  if (combinations == null ? void 0 : combinations.length) {
285
286
  return /* @__PURE__ */ jsx(Flex, { children: combinations.map((item, index) => {
286
- var _a2, _b2, _c2, _d2, _e2, _f2, _g;
287
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
287
288
  let initValue = handleSetFormItemInitialValue(item);
288
289
  let width = defaultWidth;
289
290
  const mode = item.json.input || "text";
@@ -301,7 +302,8 @@ function useDynamicForm(props) {
301
302
  style: {
302
303
  flex: width,
303
304
  pointerEvents: readonly ? "none" : "auto",
304
- opacity: readonly ? 0.5 : 1
305
+ opacity: readonly ? 0.5 : 1,
306
+ display: hidden ? "none" : "block"
305
307
  },
306
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"] }),
307
309
  required: index === 0 ? (_d2 = item.json) == null ? void 0 : _d2.must : false,
@@ -317,7 +319,7 @@ function useDynamicForm(props) {
317
319
  ...((_f2 = itemWithJson.json) == null ? void 0 : _f2.regexp) ? [
318
320
  {
319
321
  pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
320
- message: ((_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
322
+ message: ((_g2 = itemWithJson.json) == null ? void 0 : _g2["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
321
323
  }
322
324
  ] : []
323
325
  ],
@@ -348,19 +350,20 @@ function useDynamicForm(props) {
348
350
  initialValue,
349
351
  style: {
350
352
  pointerEvents: readonly ? "none" : "auto",
351
- opacity: readonly ? 0.5 : 1
353
+ opacity: readonly ? 0.5 : 1,
354
+ display: hidden ? "none" : "block"
352
355
  },
353
356
  rules: [
354
- ...((_d = itemWithJson.json) == null ? void 0 : _d.must) ? [
357
+ ...((_e = itemWithJson.json) == null ? void 0 : _e.must) ? [
355
358
  {
356
359
  required: true,
357
360
  message: `${placeholder}${itemWithJson.attrname}`
358
361
  }
359
362
  ] : [],
360
- ...((_e = itemWithJson.json) == null ? void 0 : _e.regexp) ? [
363
+ ...((_f = itemWithJson.json) == null ? void 0 : _f.regexp) ? [
361
364
  {
362
365
  pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
363
- message: ((_f = itemWithJson.json) == null ? void 0 : _f["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
366
+ message: ((_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
364
367
  }
365
368
  ] : []
366
369
  ],
@@ -254,7 +254,7 @@ function useDynamicForm(props) {
254
254
  formListField,
255
255
  isShowLabel = true
256
256
  }) => {
257
- var _a, _b, _c, _d, _e, _f;
257
+ var _a, _b, _c, _d, _e, _f, _g;
258
258
  if (((_a = itemWithJson.json) == null ? void 0 : _a.hide) === true || (hideAttrList == null ? void 0 : hideAttrList.includes(itemWithJson.attrid))) {
259
259
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
260
260
  }
@@ -282,9 +282,10 @@ function useDynamicForm(props) {
282
282
  const message2 = (_c = itemWithJson.json) == null ? void 0 : _c["default-prompt"];
283
283
  const placeholder = func.handleGetPlaceholder(itemWithJson, langId);
284
284
  const { combinations = [] } = itemWithJson.json || {};
285
+ const hidden = (_d = itemWithJson.json) == null ? void 0 : _d.hidden;
285
286
  if (combinations == null ? void 0 : combinations.length) {
286
287
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { children: combinations.map((item, index) => {
287
- var _a2, _b2, _c2, _d2, _e2, _f2, _g;
288
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
288
289
  let initValue = func.handleSetFormItemInitialValue(item);
289
290
  let width = defaultWidth;
290
291
  const mode = item.json.input || "text";
@@ -302,7 +303,8 @@ function useDynamicForm(props) {
302
303
  style: {
303
304
  flex: width,
304
305
  pointerEvents: readonly ? "none" : "auto",
305
- opacity: readonly ? 0.5 : 1
306
+ opacity: readonly ? 0.5 : 1,
307
+ display: hidden ? "none" : "block"
306
308
  },
307
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"] }),
308
310
  required: index === 0 ? (_d2 = item.json) == null ? void 0 : _d2.must : false,
@@ -318,7 +320,7 @@ function useDynamicForm(props) {
318
320
  ...((_f2 = itemWithJson.json) == null ? void 0 : _f2.regexp) ? [
319
321
  {
320
322
  pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
321
- message: ((_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
323
+ message: ((_g2 = itemWithJson.json) == null ? void 0 : _g2["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
322
324
  }
323
325
  ] : []
324
326
  ],
@@ -349,19 +351,20 @@ function useDynamicForm(props) {
349
351
  initialValue,
350
352
  style: {
351
353
  pointerEvents: readonly ? "none" : "auto",
352
- opacity: readonly ? 0.5 : 1
354
+ opacity: readonly ? 0.5 : 1,
355
+ display: hidden ? "none" : "block"
353
356
  },
354
357
  rules: [
355
- ...((_d = itemWithJson.json) == null ? void 0 : _d.must) ? [
358
+ ...((_e = itemWithJson.json) == null ? void 0 : _e.must) ? [
356
359
  {
357
360
  required: true,
358
361
  message: `${placeholder}${itemWithJson.attrname}`
359
362
  }
360
363
  ] : [],
361
- ...((_e = itemWithJson.json) == null ? void 0 : _e.regexp) ? [
364
+ ...((_f = itemWithJson.json) == null ? void 0 : _f.regexp) ? [
362
365
  {
363
366
  pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
364
- message: ((_f = itemWithJson.json) == null ? void 0 : _f["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
367
+ message: ((_g = itemWithJson.json) == null ? void 0 : _g["regexp-message"]) || `${itemWithJson.attrname}格式不正确`
365
368
  }
366
369
  ] : []
367
370
  ],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.4.35",
4
+ "version": "0.4.36",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",