@baosight/er4j 0.0.26 → 0.0.28

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.
@@ -27109,7 +27109,7 @@ var y;
27109
27109
  * @returns 驼峰命名
27110
27110
  */
27111
27111
  static camelCase(r) {
27112
- return r.toLowerCase().replace(/_([a-z])/g, (i, n) => n.toUpperCase()).replace(/^([a-z])/, (i, n) => n.toLowerCase()) || "";
27112
+ return /^[a-z]+([A-Z][a-z]*)*$/.test(r) ? r : r.toLowerCase().replace(/_([a-z])/g, (i, n) => n.toUpperCase()).replace(/^([a-z])/, (i, n) => n.toLowerCase()) || "";
27113
27113
  }
27114
27114
  /**
27115
27115
  * 验证是否为有效的正则表达式
@@ -27910,13 +27910,14 @@ var y;
27910
27910
  /**
27911
27911
  * 获取Grid的选中行[无勾选框时为当前行]EiBlock
27912
27912
  * @param grid
27913
+ * @param blockName 块名
27913
27914
  * @param extendJsonData 扩展字段
27914
27915
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
27915
27916
  * @param customJsonFunction 自定义对象转Json方法
27916
27917
  * @returns EiBlock
27917
27918
  */
27918
- static getGridSelectRowsAsBlock(r, i, n = !1, s) {
27919
- return this.getGridRowsAsBlock(r, "select", i, n, s);
27919
+ static getGridSelectRowsAsBlock(r, i, n, s = !1, c) {
27920
+ return this.getGridRowsAsBlock(r, "select", i, n, s, c);
27920
27921
  }
27921
27922
  /**
27922
27923
  * 获取Grid的当前焦点行
@@ -27933,13 +27934,14 @@ var y;
27933
27934
  /**
27934
27935
  * 获取Grid的当前焦点行Json
27935
27936
  * @param grid
27937
+ * @param blockName 块名
27936
27938
  * @param extendJsonData 扩展字段
27937
27939
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
27938
27940
  * @param customJsonFunction 自定义对象转Json方法
27939
27941
  * @returns json
27940
27942
  */
27941
- static getGridCurrentRowAsBlock(r, i, n = !1, s) {
27942
- return this.getGridRowsAsBlock(r, "current", i, n, s);
27943
+ static getGridCurrentRowAsBlock(r, i, n, s = !1, c) {
27944
+ return this.getGridRowsAsBlock(r, "current", i, n, s, c);
27943
27945
  }
27944
27946
  /**
27945
27947
  * 获取Grid的选中行[必须在有勾选列的情况下]
@@ -27954,13 +27956,14 @@ var y;
27954
27956
  /**
27955
27957
  * 获取Grid的选中行的数据Json格式[必须在有勾选列的情况下]
27956
27958
  * @param grid
27959
+ * @param blockName 块名
27957
27960
  * @param extendJsonData 扩展字段
27958
27961
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
27959
27962
  * @param customJsonFunction 自定义对象转Json方法
27960
27963
  * @returns Json array
27961
27964
  */
27962
- static getGridCheckedRowsAsBlock(r, i, n = !1, s) {
27963
- return this.getGridRowsAsBlock(r, "checked", i, n, s);
27965
+ static getGridCheckedRowsAsBlock(r, i, n, s = !1, c) {
27966
+ return this.getGridRowsAsBlock(r, "checked", i, n, s, c);
27964
27967
  }
27965
27968
  /**
27966
27969
  * 获取Grid筛选后的选中行[必须在有勾选列的情况下]
@@ -27975,13 +27978,14 @@ var y;
27975
27978
  /**
27976
27979
  * 获取Grid筛选后选中行的数据Json格式[必须在有勾选列的情况下]
27977
27980
  * @param grid
27981
+ * @param blockName 块名
27978
27982
  * @param extendJsonData 扩展字段
27979
27983
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
27980
27984
  * @param customJsonFunction 自定义对象转Json方法
27981
27985
  * @returns Json array
27982
27986
  */
27983
- static getGridCheckedAfterFilterRowsAsBlock(r, i, n = !1, s) {
27984
- return this.getGridRowsAsBlock(r, "checkedAfterFilter", i, n, s);
27987
+ static getGridCheckedAfterFilterRowsAsBlock(r, i, n, s = !1, c) {
27988
+ return this.getGridRowsAsBlock(r, "checkedAfterFilter", i, n, s, c);
27985
27989
  }
27986
27990
  /**
27987
27991
  * 获取Grid已删除的行
@@ -27996,13 +28000,13 @@ var y;
27996
28000
  /**
27997
28001
  * 获取Grid已删除的行Block
27998
28002
  * @param grid
28003
+ * @param blockName 块名
27999
28004
  * @param extendJsonData 扩展字段
28000
28005
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
28001
28006
  * @param customJsonFunction 自定义对象转Json方法
28002
- * @param blockName 块名
28003
28007
  * @returns Block
28004
28008
  */
28005
- static getGridDeletedRowsAsBlock(r, i, n = !1, s, c) {
28009
+ static getGridDeletedRowsAsBlock(r, i, n, s = !1, c) {
28006
28010
  return this.getGridRowsAsBlock(r, "delete", i, n, s, c);
28007
28011
  }
28008
28012
  /**
@@ -28018,13 +28022,13 @@ var y;
28018
28022
  /**
28019
28023
  * 获取Grid已修改的行Block
28020
28024
  * @param grid
28025
+ * @param blockName 块名
28021
28026
  * @param extendJsonData 扩展字段
28022
28027
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
28023
28028
  * @param customJsonFunction 自定义对象转Json方法
28024
- * @param blockName 块名
28025
28029
  * @returns Block
28026
28030
  */
28027
- static getGridModifyRowsAsBlock(r, i, n = !1, s, c) {
28031
+ static getGridModifyRowsAsBlock(r, i, n, s = !1, c) {
28028
28032
  return this.getGridRowsAsBlock(r, "modify", i, n, s, c);
28029
28033
  }
28030
28034
  /**
@@ -28040,13 +28044,13 @@ var y;
28040
28044
  /**
28041
28045
  * 获取Grid已新增的行Block
28042
28046
  * @param grid
28047
+ * @param blockName 块名
28043
28048
  * @param extendJsonData 扩展字段
28044
28049
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
28045
28050
  * @param customJsonFunction 自定义对象转Json方法
28046
- * @param blockName 块名
28047
28051
  * @returns Block
28048
28052
  */
28049
- static getGridCreatedRowsAsBlock(r, i, n = !1, s, c) {
28053
+ static getGridCreatedRowsAsBlock(r, i, n, s = !1, c) {
28050
28054
  return this.getGridRowsAsBlock(r, "add", i, n, s, c);
28051
28055
  }
28052
28056
  /**
@@ -28062,13 +28066,13 @@ var y;
28062
28066
  /**
28063
28067
  * 获取Grid已新增的行Block
28064
28068
  * @param grid
28069
+ * @param blockName 块名
28065
28070
  * @param extendJsonData 扩展字段
28066
28071
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
28067
28072
  * @param customJsonFunction 自定义对象转Json方法
28068
- * @param blockName 块名
28069
28073
  * @returns Block
28070
28074
  */
28071
- static getGridAllRowsAsBlock(r, i, n = !1, s, c) {
28075
+ static getGridAllRowsAsBlock(r, i, n, s = !1, c) {
28072
28076
  return this.getGridRowsAsBlock(r, "all", i, n, s, c);
28073
28077
  }
28074
28078
  /**
@@ -28083,11 +28087,11 @@ var y;
28083
28087
  static getGridChangedRowsAsEiInfo(r, i, n, s = !1, c) {
28084
28088
  var m, S, D;
28085
28089
  n = n || new kt(), i = i || ((D = (S = (m = r == null ? void 0 : r.gridOptions) == null ? void 0 : m.context) == null ? void 0 : S.bindingSource) == null ? void 0 : D.tableName) || "Table0";
28086
- const h = this.getGridDeletedRowsAsBlock(r, void 0, s, c, i + "_DELETE");
28090
+ const h = this.getGridDeletedRowsAsBlock(r, i + "_DELETE", void 0, s, c);
28087
28091
  h.getRows().length > 0 && n.addBlock(h);
28088
- const p = this.getGridModifyRowsAsBlock(r, void 0, s, c, i + "_MODIFY");
28092
+ const p = this.getGridModifyRowsAsBlock(r, i + "_MODIFY", void 0, s, c);
28089
28093
  p.getRows().length > 0 && n.addBlock(p);
28090
- const C = this.getGridCreatedRowsAsBlock(r, void 0, s, c, i + "_ADD");
28094
+ const C = this.getGridCreatedRowsAsBlock(r, i + "_ADD", void 0, s, c);
28091
28095
  return C.getRows().length > 0 && n.addBlock(C), n;
28092
28096
  }
28093
28097
  /**
@@ -28171,14 +28175,14 @@ var y;
28171
28175
  * 获取Grid的的行
28172
28176
  * @param grid grid对象
28173
28177
  * @param type 行类型
28178
+ * @param blockName 块名
28174
28179
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
28175
28180
  * @param customJsonFunction 自定义对象转Json方法
28176
- * @param blockName 块名
28177
28181
  * @returns EiBlock
28178
28182
  */
28179
- static getGridRowsAsBlock(r, i, n, s = !1, c, h) {
28183
+ static getGridRowsAsBlock(r, i, n, s, c = !1, h) {
28180
28184
  var m, S, D, L, X, R;
28181
- const p = new da(h || "Table0"), C = this.getGridRows(r, i, c || !0, s);
28185
+ const p = new da(n || "Table0"), C = this.getGridRows(r, i, h || !0, c);
28182
28186
  if (C && C.length > 0) {
28183
28187
  const W = (S = (m = r == null ? void 0 : r.gridOptions) == null ? void 0 : m.context) == null ? void 0 : S.bindingSource;
28184
28188
  if ((D = W == null ? void 0 : W.options) != null && D.schema) {
@@ -28186,7 +28190,7 @@ var y;
28186
28190
  const de = new kn(xe.name);
28187
28191
  return de.type = xe.type === "number" ? "N" : "C", de.name = xe.name, de.descName = xe.caption, de;
28188
28192
  }, te = [];
28189
- s ? (X = (L = r == null ? void 0 : r.gridOptions) == null ? void 0 : L.columnApi.getAllGridColumns()) == null || X.forEach((xe) => {
28193
+ c ? (X = (L = r == null ? void 0 : r.gridOptions) == null ? void 0 : L.columnApi.getAllGridColumns()) == null || X.forEach((xe) => {
28190
28194
  var de, pe, J, ve, se, Ye;
28191
28195
  if ((pe = W == null ? void 0 : W.options) != null && pe.schema[(de = xe.colDef) == null ? void 0 : de.field]) {
28192
28196
  const be = K((ve = W == null ? void 0 : W.options) == null ? void 0 : ve.schema[(J = xe.colDef) == null ? void 0 : J.field]);
@@ -28204,8 +28208,8 @@ var y;
28204
28208
  });
28205
28209
  }
28206
28210
  }
28207
- return n && Object.keys(n).length > 0 && Object.keys(n).forEach((W) => {
28208
- W.trim().length > 0 && !p.getColumn(W.trim()) && (n[W] && typeof n[W] == "number" ? p.addColumn(W.trim(), "N") : p.addColumn(W.trim(), "C"));
28211
+ return s && Object.keys(s).length > 0 && Object.keys(s).forEach((W) => {
28212
+ W.trim().length > 0 && !p.getColumn(W.trim()) && (s[W] && typeof s[W] == "number" ? p.addColumn(W.trim(), "N") : p.addColumn(W.trim(), "C"));
28209
28213
  }), p;
28210
28214
  }
28211
28215
  /**
@@ -31291,9 +31295,9 @@ var y;
31291
31295
  */
31292
31296
  setDropDownBindOptions(r, i, n) {
31293
31297
  var de, pe;
31294
- const s = t.toString(i.DISPLAY_COLS).toUpperCase();
31298
+ const s = t.toString(i.DISPLAY_COLS);
31295
31299
  let c = t.toString(i.DISPLAY_CAPTIONS).trim(), h = !1;
31296
- const p = t.toString(i.VALUE_MEMBER).toUpperCase(), C = t.toString(i.DISPLAY_MEMBER).toUpperCase(), m = t.toNumber(i.VALUE_POSITION), S = t.toNumber(i.DISPLAY_POSITION), D = [], L = e.Core.$t("ERX.CodeColumn") || "代码", X = e.Core.$t("ERX.DescriptionColumn") || "描述";
31300
+ const p = t.toString(i.VALUE_MEMBER), C = t.toString(i.DISPLAY_MEMBER), m = t.toNumber(i.VALUE_POSITION), S = t.toNumber(i.DISPLAY_POSITION), D = [], L = e.Core.$t("ERX.CodeColumn") || "代码", X = e.Core.$t("ERX.DescriptionColumn") || "描述";
31297
31301
  c.startsWith("$t(") && c.endsWith(")") && (c = c.substring(3, c.length - 1), h = !0);
31298
31302
  let R = "CODE";
31299
31303
  p.trim().length > 0 && (R = p.trim());
@@ -31350,7 +31354,7 @@ var y;
31350
31354
  if (n instanceof Array && n.length > 0 ? s.push(...n) : e.Core.toString(n).length > 0 && s.push(e.Core.toString(n)), r && r.length > 0 && i.length > 0 && s.length > 0) {
31351
31355
  const c = i.indexOf(" like ") >= 0 ? "like" : i.indexOf(" <> ") >= 0 ? "<>" : "=", h = i.split(c);
31352
31356
  if (h.length === 2) {
31353
- const p = h[0].trim().toUpperCase(), C = h[1].trim().toUpperCase(), m = [];
31357
+ const p = h[0].trim(), C = h[1].trim(), m = [];
31354
31358
  return r.forEach((S) => {
31355
31359
  const D = e.Core.toString(S[p]).trim();
31356
31360
  if (D.length > 0) {
@@ -36935,13 +36939,13 @@ var y;
36935
36939
  /**
36936
36940
  * 获取Grid的选中行[无勾选框时为当前行]EiBlock
36937
36941
  * @param grid
36942
+ * @param blockName 块名
36938
36943
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
36939
36944
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
36940
36945
  * @param customJsonFunction 自定义对象转Json方法
36941
- * @param blockName 块名
36942
36946
  * @returns EiBlock
36943
36947
  */
36944
- getGridSelectRowsAsBlock(r, i, n = !1, s, c) {
36948
+ getGridSelectRowsAsBlock(r, i, n, s = !1, c) {
36945
36949
  return this.getGridRowsAsBlock(r, "select", i, n, s, c);
36946
36950
  }
36947
36951
  /**
@@ -36959,13 +36963,13 @@ var y;
36959
36963
  /**
36960
36964
  * 获取Grid的当前焦点行
36961
36965
  * @param grid
36966
+ * @param blockName 块名
36962
36967
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
36963
36968
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
36964
36969
  * @param customJsonFunction 自定义对象转Json方法
36965
- * @param blockName 块名
36966
36970
  * @returns EiBlock
36967
36971
  */
36968
- getGridCurrentRowAsBlock(r, i, n = !1, s, c) {
36972
+ getGridCurrentRowAsBlock(r, i, n, s = !1, c) {
36969
36973
  return this.getGridRowsAsBlock(r, "current", i, n, s, c);
36970
36974
  }
36971
36975
  /**
@@ -36981,13 +36985,13 @@ var y;
36981
36985
  /**
36982
36986
  * 获取Grid的选中行[必须在有勾选列的情况下]
36983
36987
  * @param grid
36988
+ * @param blockName 块名
36984
36989
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
36985
36990
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
36986
36991
  * @param customJsonFunction 自定义对象转Json方法
36987
- * @param blockName 块名
36988
36992
  * @returns EiBlock
36989
36993
  */
36990
- getGridCheckedRowsAsBlock(r, i, n = !1, s, c) {
36994
+ getGridCheckedRowsAsBlock(r, i, n, s = !1, c) {
36991
36995
  return this.getGridRowsAsBlock(r, "checked", i, n, s, c);
36992
36996
  }
36993
36997
  /**
@@ -37003,13 +37007,13 @@ var y;
37003
37007
  /**
37004
37008
  * 获取Grid筛选后的选中行[必须在有勾选列的情况下]
37005
37009
  * @param grid
37010
+ * @param blockName 块名
37006
37011
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
37007
37012
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
37008
37013
  * @param customJsonFunction 自定义对象转Json方法
37009
- * @param blockName 块名
37010
37014
  * @returns EiBlock
37011
37015
  */
37012
- getGridCheckedAfterFilterRowsAsBlock(r, i, n = !1, s, c) {
37016
+ getGridCheckedAfterFilterRowsAsBlock(r, i, n, s = !1, c) {
37013
37017
  return this.getGridRowsAsBlock(r, "checkedAfterFilter", i, n, s, c);
37014
37018
  }
37015
37019
  /**
@@ -37025,13 +37029,13 @@ var y;
37025
37029
  /**
37026
37030
  * 获取Grid已删除的行Block
37027
37031
  * @param grid
37032
+ * @param blockName 块名
37028
37033
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
37029
37034
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
37030
37035
  * @param customJsonFunction 自定义对象转Json方法
37031
- * @param blockName 块名
37032
37036
  * @returns Block
37033
37037
  */
37034
- getGridDeletedRowsAsBlock(r, i, n = !1, s, c) {
37038
+ getGridDeletedRowsAsBlock(r, i, n, s = !1, c) {
37035
37039
  return this.getGridRowsAsBlock(r, "delete", i, n, s, c);
37036
37040
  }
37037
37041
  /**
@@ -37047,13 +37051,13 @@ var y;
37047
37051
  /**
37048
37052
  * 获取Grid已修改的行Block
37049
37053
  * @param grid
37054
+ * @param blockName 块名
37050
37055
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
37051
37056
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
37052
37057
  * @param customJsonFunction 自定义对象转Json方法
37053
- * @param blockName 块名
37054
37058
  * @returns EiBlock
37055
37059
  */
37056
- getGridModifyRowsAsBlock(r, i, n = !1, s, c) {
37060
+ getGridModifyRowsAsBlock(r, i, n, s = !1, c) {
37057
37061
  return this.getGridRowsAsBlock(r, "modify", i, n, s, c);
37058
37062
  }
37059
37063
  /**
@@ -37069,13 +37073,13 @@ var y;
37069
37073
  /**
37070
37074
  * 获取Grid已新增的行Block
37071
37075
  * @param grid
37076
+ * @param blockName 块名
37072
37077
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
37073
37078
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
37074
37079
  * @param customJsonFunction 自定义对象转Json方法
37075
- * @param blockName 块名
37076
37080
  * @returns EiBlock
37077
37081
  */
37078
- getGridCreatedRowsAsBlock(r, i, n = !1, s, c) {
37082
+ getGridCreatedRowsAsBlock(r, i, n, s = !1, c) {
37079
37083
  return this.getGridRowsAsBlock(r, "add", i, n, s, c);
37080
37084
  }
37081
37085
  /**
@@ -37091,13 +37095,13 @@ var y;
37091
37095
  /**
37092
37096
  * 获取Grid已新增的行Block
37093
37097
  * @param grid
37098
+ * @param blockName 块名
37094
37099
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
37095
37100
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
37096
37101
  * @param customJsonFunction 自定义对象转Json方法
37097
- * @param blockName 块名
37098
37102
  * @returns EiBlock
37099
37103
  */
37100
- getGridAllRowsAsBlock(r, i, n = !1, s, c) {
37104
+ getGridAllRowsAsBlock(r, i, n, s = !1, c) {
37101
37105
  return this.getGridRowsAsBlock(r, "all", i, n, s, c);
37102
37106
  }
37103
37107
  /**
@@ -37133,11 +37137,12 @@ var y;
37133
37137
  * 获取Grid的的行
37134
37138
  * @param grid grid对象
37135
37139
  * @param type 行类型
37140
+ * @param blockName: 块名
37136
37141
  * @param extendJsonData 附加Json数据,只赋值到EiBlock的第一行数据
37137
37142
  * @param onlyGridColumns 是否仅获取Grid中存在的字段
37138
37143
  * @returns EiBlock
37139
37144
  */
37140
- getGridRowsAsBlock(r, i, n, s = !1, c, h) {
37145
+ getGridRowsAsBlock(r, i, n, s, c = !1, h) {
37141
37146
  const p = this.getGrid(r);
37142
37147
  return t.getGridRowsAsBlock(p, i, n, s, c, h);
37143
37148
  }