szld-libs 0.4.52 → 0.4.54

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.
@@ -18,6 +18,7 @@ export interface IformConfigItem {
18
18
  }
19
19
 
20
20
  export interface Ijson {
21
+ 'max-tag-count'?: number; // 最大标签数量
21
22
  'lang-page-id': string; // 语言页面id
22
23
  'operation-types'?: string[]; // 自定义按钮类型列表
23
24
  'custom-operation'?: boolean; // 是否自定义按钮
@@ -106,11 +106,11 @@ const MySelect = ({
106
106
  value,
107
107
  filterOption: (inputValue, option) => {
108
108
  var _a;
109
- return ((_a = option == null ? void 0 : option.label) == null ? void 0 : _a.toLowerCase().indexOf(inputValue.toLowerCase())) >= 0;
109
+ return (option == null ? void 0 : option.label) && ((_a = String(option == null ? void 0 : option.label)) == null ? void 0 : _a.toLowerCase().indexOf(inputValue.toLowerCase())) >= 0;
110
110
  },
111
111
  options,
112
112
  style: { ...style },
113
- maxTagCount: 1,
113
+ maxTagCount: (item == null ? void 0 : item["max-tag-count"]) ?? 1,
114
114
  allowClear: true,
115
115
  onChange: (val) => {
116
116
  if (Array.isArray(val) && (item == null ? void 0 : item["custom-operation"]) && item.input === "mult-select") {
@@ -302,7 +302,7 @@ function useDynamicForm(props) {
302
302
  formListField,
303
303
  isShowLabel = true
304
304
  }) => {
305
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
305
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
306
306
  const hidden = (_a = itemWithJson.json) == null ? void 0 : _a.hidden;
307
307
  if (((_b = itemWithJson.json) == null ? void 0 : _b.hide) === true) {
308
308
  return /* @__PURE__ */ jsx(Fragment$1, {});
@@ -336,17 +336,17 @@ function useDynamicForm(props) {
336
336
  {
337
337
  label: (_d = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _d["combination-name"],
338
338
  required: ((_e = itemWithJson.json) == null ? void 0 : _e.must) && !hidden,
339
- extra: /* @__PURE__ */ jsx(
339
+ extra: ((_g = (_f = itemWithJson.json) == null ? void 0 : _f.extraDescObj) == null ? void 0 : _g.info) ? /* @__PURE__ */ jsx(
340
340
  "span",
341
341
  {
342
342
  style: {
343
- marginTop: ((_g = (_f = itemWithJson.json) == null ? void 0 : _f.extraDescObj) == null ? void 0 : _g.info) ? 10 : 0,
343
+ marginTop: ((_i = (_h = itemWithJson.json) == null ? void 0 : _h.extraDescObj) == null ? void 0 : _i.info) ? 10 : 0,
344
344
  display: "inline-block",
345
- color: (_i = (_h = itemWithJson.json) == null ? void 0 : _h.extraDescObj) == null ? void 0 : _i.color
345
+ color: (_k = (_j = itemWithJson.json) == null ? void 0 : _j.extraDescObj) == null ? void 0 : _k.color
346
346
  },
347
- children: (_k = (_j = itemWithJson.json) == null ? void 0 : _j.extraDescObj) == null ? void 0 : _k.info
347
+ children: (_m = (_l = itemWithJson.json) == null ? void 0 : _l.extraDescObj) == null ? void 0 : _m.info
348
348
  }
349
- ),
349
+ ) : null,
350
350
  children: /* @__PURE__ */ jsx(Space.Compact, { children: combinations.map((item, index) => {
351
351
  var _a2, _b2, _c2, _d2, _e2;
352
352
  let initValue = handleSetFormItemInitialValue(item);
@@ -412,28 +412,28 @@ function useDynamicForm(props) {
412
412
  label: isShowLabel && handleDealInstruction(itemWithJson, instructionShowMode) || null,
413
413
  initialValue,
414
414
  hidden,
415
- extra: ((_m = (_l = itemWithJson.json) == null ? void 0 : _l.extraDescObj) == null ? void 0 : _m.info) ? /* @__PURE__ */ jsx(
415
+ extra: ((_o = (_n = itemWithJson.json) == null ? void 0 : _n.extraDescObj) == null ? void 0 : _o.info) ? /* @__PURE__ */ jsx(
416
416
  "span",
417
417
  {
418
418
  style: {
419
- marginTop: ((_o = (_n = itemWithJson.json) == null ? void 0 : _n.extraDescObj) == null ? void 0 : _o.info) ? 10 : 0,
419
+ marginTop: ((_q = (_p = itemWithJson.json) == null ? void 0 : _p.extraDescObj) == null ? void 0 : _q.info) ? 10 : 0,
420
420
  display: "inline-block",
421
- color: (_q = (_p = itemWithJson.json) == null ? void 0 : _p.extraDescObj) == null ? void 0 : _q.color
421
+ color: (_s = (_r = itemWithJson.json) == null ? void 0 : _r.extraDescObj) == null ? void 0 : _s.color
422
422
  },
423
- children: (_s = (_r = itemWithJson.json) == null ? void 0 : _r.extraDescObj) == null ? void 0 : _s.info
423
+ children: (_u = (_t = itemWithJson.json) == null ? void 0 : _t.extraDescObj) == null ? void 0 : _u.info
424
424
  }
425
425
  ) : null,
426
426
  rules: [
427
- ...((_t = itemWithJson.json) == null ? void 0 : _t.must) && !hidden ? [
427
+ ...((_v = itemWithJson.json) == null ? void 0 : _v.must) && !hidden ? [
428
428
  {
429
429
  required: true,
430
430
  message: `${placeholder}${itemWithJson.attrname}`
431
431
  }
432
432
  ] : [],
433
- ...((_u = itemWithJson.json) == null ? void 0 : _u.regexp) ? [
433
+ ...((_w = itemWithJson.json) == null ? void 0 : _w.regexp) ? [
434
434
  {
435
435
  pattern: new RegExp(itemWithJson.json.regexp.replace(/^\/|\/$/g, "")),
436
- message: ((_v = itemWithJson.json) == null ? void 0 : _v["regexp-message"]) || `${itemWithJson.attrname}${langId === "10001" ? "格式不正确" : "Format is incorrect"}`
436
+ message: ((_x = itemWithJson.json) == null ? void 0 : _x["regexp-message"]) || `${itemWithJson.attrname}${langId === "10001" ? "格式不正确" : "Format is incorrect"}`
437
437
  }
438
438
  ] : []
439
439
  ],
package/es/index.js CHANGED
@@ -16,17 +16,17 @@ const Demo = () => {
16
16
  const [form] = Form.useForm();
17
17
  const [list, setList] = useState([]);
18
18
  const [langId, setLangId] = useState("10002");
19
- const onValuesChange = async (values, allValues) => {
19
+ const onValuesChange = async (values2, allValues) => {
20
20
  };
21
21
  useEffect(() => {
22
22
  setList(handleAttrList(attrList));
23
23
  }, []);
24
- const onFinish = async (values) => {
24
+ const onFinish = async (values2) => {
25
25
  handleSubmitForm(
26
26
  {
27
27
  attr_list: list
28
28
  },
29
- values
29
+ values2
30
30
  );
31
31
  };
32
32
  return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
@@ -1,3 +1,6 @@
1
1
  export declare const baseAttrList: never[];
2
2
  export declare const attrList: any;
3
+ export declare const values: {
4
+ '3996884FD35D47ACAAC955E10F0766A6': string[];
5
+ };
3
6
  export declare const langConfig: never[];