@byteluck-fe/runtime-engine 2.0.17 → 2.0.18

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.
@@ -11386,9 +11386,9 @@ function pp(r) {
11386
11386
  r.type === "conditions"
11387
11387
  );
11388
11388
  }
11389
- const tr = (r, e) => {
11390
- const t = e.findIndex((a) => a.code === r.code);
11391
- t > -1 ? e[t].value = r.value : e.push(r);
11389
+ const tr = (r, e, t) => {
11390
+ const a = e.findIndex((n) => n.code === r.code);
11391
+ a > -1 ? e[a].value = t?.[0]?.code === r.code ? t?.[0]?.value : r.value : e.push(r);
11392
11392
  };
11393
11393
  function ze(r, e, t, a, n) {
11394
11394
  const s = a ?? [], i = [];
@@ -11400,7 +11400,7 @@ function ze(r, e, t, a, n) {
11400
11400
  t,
11401
11401
  a
11402
11402
  ).forEach((l) => {
11403
- i.includes(l.code) || tr(l, s);
11403
+ i.includes(l.code) || tr(l, s, a);
11404
11404
  });
11405
11405
  else {
11406
11406
  const {
@@ -11414,7 +11414,7 @@ function ze(r, e, t, a, n) {
11414
11414
  if (r.inList(c) === void 0 ? p = r.getState(c) : p = r.getState(c, t), p = F(p), Me(d)) {
11415
11415
  if (d.fieldCode || (d.fieldCode = c), i.includes(d.fieldCode))
11416
11416
  return;
11417
- tr({ code: d.fieldCode, value: p }, s), i.push(d.fieldCode);
11417
+ tr({ code: d.fieldCode, value: p }, s, a), i.push(d.fieldCode);
11418
11418
  } else
11419
11419
  Object.keys(d).map((h) => {
11420
11420
  const f = d[h];
@@ -11423,7 +11423,8 @@ function ze(r, e, t, a, n) {
11423
11423
  code: f.fieldCode,
11424
11424
  value: p[h]
11425
11425
  },
11426
- s
11426
+ s,
11427
+ a
11427
11428
  ), i.push(f.fieldCode));
11428
11429
  });
11429
11430
  });
@@ -13380,7 +13381,19 @@ function Lr(r, e) {
13380
13381
  });
13381
13382
  }
13382
13383
  function Jf(r, e) {
13383
- switch (r.type) {
13384
+ switch (console.log(r, e, "params"), [
13385
+ "caption",
13386
+ "placeholder",
13387
+ "captionTip",
13388
+ "mobileRowCaption",
13389
+ "content",
13390
+ "placeholderStart",
13391
+ "placeholderEnd",
13392
+ "confirmMessage",
13393
+ "regularRules"
13394
+ ].forEach((n) => {
13395
+ r.props?.hasOwnProperty(n) && (n === "regularRules" && (r.props[n].errMessage = e?.i18n?.[r?.id] ? e?.i18n?.[r?.id]?.[n]?.errMessage ?? r.props[n]?.errMessage : r.props[n]?.errMessage), r.props[n] = e?.i18n?.[r?.id]?.[n] ?? r.props?.[n]);
13396
+ }), r.type) {
13384
13397
  case m.EMPLOYEE:
13385
13398
  case m.EMPLOYEE2:
13386
13399
  r.props.defaultValueType === "current" && (r.props.defaultValue = [e.store.state.userInfo.employee_id]);
@@ -13394,23 +13407,23 @@ function Jf(r, e) {
13394
13407
  break;
13395
13408
  case m.DATE_PICKER:
13396
13409
  if (r.props.setValueType === "now") {
13397
- const a = $f(r.props.dateType);
13398
- r.props.defaultValue = String(+new Date(a));
13410
+ const n = $f(r.props.dateType);
13411
+ r.props.defaultValue = String(+new Date(n));
13399
13412
  }
13400
13413
  break;
13401
13414
  case m.SUBTABLE:
13402
13415
  if (e.device === "mobile" || e.device === "desktop" && e.pageStatus === 5 && (r.props.serverPagination = !1), r.props.serverPagination === !0) {
13403
- const a = r.props?.datasourceBind?.dataCode, n = r.props.datasourceBind?.orders, s = r.props?.sortable ? r.props.headers.filter(
13404
- (i) => !zf.includes(
13405
- i?.children[0]?.fieldType
13406
- ) && i.children[0]?.props?.dataBind
13407
- ).map((i) => t(i)) : [];
13416
+ const n = r.props?.datasourceBind?.dataCode, s = r.props.datasourceBind?.orders, i = r.props?.sortable ? r.props.headers.filter(
13417
+ (o) => !zf.includes(
13418
+ o?.children[0]?.fieldType
13419
+ ) && o.children[0]?.props?.dataBind
13420
+ ).map((o) => a(o)) : [];
13408
13421
  e.subtableDefinition.push({
13409
- subCode: a,
13410
- orders: n
13422
+ subCode: n,
13423
+ orders: s
13411
13424
  }), e.subtableDefinition.push({
13412
- subCode: a,
13413
- orders: s,
13425
+ subCode: n,
13426
+ orders: i,
13414
13427
  type: "sort"
13415
13428
  });
13416
13429
  }
@@ -13422,8 +13435,8 @@ function Jf(r, e) {
13422
13435
  r.props.optionConfig !== "custom" && (r.props.options = []);
13423
13436
  break;
13424
13437
  }
13425
- function t(a) {
13426
- return a.children[0].fieldType === Y.MONEY ? a.children[0].props.dataBind.amount.fieldCode : a.children[0].fieldType === Y.CALC ? a.children[0].props.dataBind.result.fieldCode : a.children[0].fieldType === Y.TIMESCOPE ? a.children[0].props.dataBind.min.fieldCode : a.children[0].props.dataBind.fieldCode;
13438
+ function a(n) {
13439
+ return n.children[0].fieldType === Y.MONEY ? n.children[0].props.dataBind.amount.fieldCode : n.children[0].fieldType === Y.CALC ? n.children[0].props.dataBind.result.fieldCode : n.children[0].fieldType === Y.TIMESCOPE ? n.children[0].props.dataBind.min.fieldCode : n.children[0].props.dataBind.fieldCode;
13427
13440
  }
13428
13441
  }
13429
13442
  const _n = (r) => {
@@ -25043,7 +25056,8 @@ function YS(r, e, t = {}, a) {
25043
25056
  isMultiOrganization: Xt,
25044
25057
  device: u,
25045
25058
  pageStatus: i,
25046
- subtableDefinition: Be
25059
+ subtableDefinition: Be,
25060
+ i18n: s.data?.content?.i18n?.local
25047
25061
  });
25048
25062
  const _t = new Gf(
25049
25063
  v.state.userInfo,
@@ -9,6 +9,7 @@ interface PARAMS {
9
9
  orders: any;
10
10
  type?: '' | 'sort' | 'filter';
11
11
  }[];
12
+ i18n: Object;
12
13
  }
13
14
  export declare function dynamicDefaultValue(params: PARAMS): void;
14
15
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/runtime-engine",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime-engine.js",