@bchr/bchr-front-lib 0.5.5 → 0.5.7

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.
@@ -459,8 +459,8 @@ var buildActionButton = function buildActionButton(props, subActionButton, inner
459
459
  throw new Error("Please enter the check field and table data before transmitting the check field and table data");
460
460
  }
461
461
 
462
- checkField = buttonProps.checkField;
463
- checkData = buttonProps.checkData;
462
+ checkField = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.checkField;
463
+ checkData = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.checkData;
464
464
  var onClickHandler = buttonProps.onClick;
465
465
  var onCancelHandler = buttonProps.onCancel;
466
466
  var modalOptions = {
@@ -479,13 +479,13 @@ var buildActionButton = function buildActionButton(props, subActionButton, inner
479
479
  };
480
480
 
481
481
  buttonProps.onClick = function () {
482
- if (_utils.Values.isEmpty(checkField) || _utils.Values.isNull(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.checkData)) {
482
+ if (_utils.Values.isBlankString(checkField) || _utils.Values.isEmptyArray(checkData)) {
483
483
  throw new Error("Please enter the check field and table data before transmitting the check field and table data");
484
484
  }
485
485
 
486
486
  var checkedNames = [];
487
487
 
488
- if (_utils.Values.isNotEmpty(checkField) && _utils.Values.isNotEmpty(checkData)) {
488
+ if (_utils.Values.isNotEmpty(checkField) && _utils.Values.isNotNull(checkData)) {
489
489
  if (Array.isArray(checkData)) {
490
490
  var selectedData = checkData.filter(function (item) {
491
491
  return item.selected;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bchr/bchr-front-lib",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "bchr front lib",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -385,8 +385,8 @@ const buildActionButton = function(props, subActionButton, innerLine) {
385
385
  throw new Error("Please enter the check field and table data before transmitting the check field and table data");
386
386
  }
387
387
 
388
- checkField = buttonProps.checkField;
389
- checkData = buttonProps.checkData;
388
+ checkField = buttonProps?.checkField;
389
+ checkData = buttonProps?.checkData;
390
390
 
391
391
  let onClickHandler = buttonProps.onClick;
392
392
  let onCancelHandler = buttonProps.onCancel;
@@ -400,12 +400,12 @@ const buildActionButton = function(props, subActionButton, innerLine) {
400
400
  okButtonProps : {type: buttonProps.type, theme : "solid", icon: <CheckOutlined />}
401
401
  };
402
402
  buttonProps.onClick = function() {
403
- if (Values.isEmpty(checkField) || Values.isNull(buttonProps?.checkData)) {
403
+ if (Values.isBlankString(checkField) || Values.isEmptyArray(checkData)) {
404
404
  throw new Error("Please enter the check field and table data before transmitting the check field and table data");
405
405
  }
406
406
 
407
407
  let checkedNames = [];
408
- if (Values.isNotEmpty(checkField) && Values.isNotEmpty(checkData)) {
408
+ if (Values.isNotEmpty(checkField) && Values.isNotNull(checkData)) {
409
409
  if (Array.isArray(checkData)) {
410
410
  let selectedData = checkData.filter(item => item.selected);
411
411
  if (Values.isNotEmptyArray(selectedData)) {
@@ -422,7 +422,6 @@ const buildActionButton = function(props, subActionButton, innerLine) {
422
422
  checkedNames.push(checkData[checkField]);
423
423
  }
424
424
  }
425
-
426
425
  modalOptions.content = modalOptions.content.replace('[options]', checkedNames.join(','));
427
426
 
428
427
  if (confirmType) {