wargerm 0.7.87 → 0.7.89

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.
package/dist/index.esm.js CHANGED
@@ -3580,7 +3580,7 @@ var WTree = function WTree(props, ref) {
3580
3580
  }
3581
3581
  allKeysRef.current = [].concat(_toConsumableArray(allKeysRef.current), [item.key]);
3582
3582
  handleCheck({
3583
- parentIds: (_ref3 = (item === null || item === void 0 ? void 0 : item.parentIds) || ((_item$origin2 = item.origin) === null || _item$origin2 === void 0 ? void 0 : _item$origin2.parentIds)) === null || _ref3 === void 0 ? void 0 : _ref3.split(',').slice(1),
3583
+ parentIds: (_ref3 = (item === null || item === void 0 ? void 0 : item.parentIds) || ((_item$origin2 = item.origin) === null || _item$origin2 === void 0 ? void 0 : _item$origin2.parentIds) || '0') === null || _ref3 === void 0 ? void 0 : _ref3.split(',').slice(1),
3584
3584
  id: (item === null || item === void 0 ? void 0 : item.key) || (item === null || item === void 0 ? void 0 : item.id) || ((_item$origin3 = item.origin) === null || _item$origin3 === void 0 ? void 0 : _item$origin3.id),
3585
3585
  values: values,
3586
3586
  treeData: treeData
@@ -3642,9 +3642,9 @@ var WTree = function WTree(props, ref) {
3642
3642
  return setExpandedKeys(values);
3643
3643
  },
3644
3644
  onCheck: function onCheck(values, info) {
3645
- var _info$node, _info$node$parentIds, _info$node2;
3645
+ var _ref5, _info$node, _info$node2;
3646
3646
  var checked = info === null || info === void 0 ? void 0 : info.checked;
3647
- var parentIds = info === null || info === void 0 ? void 0 : (_info$node = info.node) === null || _info$node === void 0 ? void 0 : (_info$node$parentIds = _info$node.parentIds) === null || _info$node$parentIds === void 0 ? void 0 : _info$node$parentIds.split(',').slice(1);
3647
+ var parentIds = (_ref5 = (info === null || info === void 0 ? void 0 : (_info$node = info.node) === null || _info$node === void 0 ? void 0 : _info$node.parentIds) || '0') === null || _ref5 === void 0 ? void 0 : _ref5.split(',').slice(1);
3648
3648
  var currentId = (info === null || info === void 0 ? void 0 : info.node.key) || (info === null || info === void 0 ? void 0 : info.node.id);
3649
3649
  handleCheck({
3650
3650
  parentIds: parentIds,
@@ -4223,7 +4223,7 @@ var WForm = function WForm(props, ref) {
4223
4223
  filterFormColumns.forEach(function (c) {
4224
4224
  if (c.type == 'group') {
4225
4225
  var _c$children3;
4226
- c.children = (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
4226
+ (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
4227
4227
  if (itm.search && itm.search.transform) {
4228
4228
  var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
4229
4229
  if (transformObj[itm.dataIndex] == undefined) {
@@ -4281,24 +4281,22 @@ var WForm = function WForm(props, ref) {
4281
4281
  filterFormColumns.forEach(function (c) {
4282
4282
  if (c.type == 'group') {
4283
4283
  var _c$children4;
4284
- c.children = (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
4284
+ (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
4285
4285
  if (itm.search && itm.search.transform) {
4286
4286
  var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
4287
4287
  searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
4288
- if (!transformObj[itm.dataIndex]) {
4288
+ if (transformObj[itm.dataIndex] == undefined) {
4289
4289
  delete searchForm[itm.dataIndex];
4290
4290
  }
4291
- return false;
4292
4291
  }
4293
4292
  });
4294
4293
  }
4295
4294
  if (c.search && c.search.transform) {
4296
4295
  var transformObj = c.search.transform(searchForm[c.dataIndex]);
4297
4296
  searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
4298
- if (!transformObj[c.dataIndex]) {
4297
+ if (transformObj[c.dataIndex] == undefined) {
4299
4298
  delete searchForm[c.dataIndex];
4300
4299
  }
4301
- return false;
4302
4300
  }
4303
4301
  if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear', 'dateRange', 'dateTimeRange'].includes(c.valueType)) {
4304
4302
  if (c.valueType === 'date' && searchForm[c.dataIndex]) {
@@ -4351,21 +4349,20 @@ var WForm = function WForm(props, ref) {
4351
4349
  filterFormColumns.forEach(function (c) {
4352
4350
  if (c.type == 'group') {
4353
4351
  var _c$children5;
4354
- c.children = (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
4352
+ (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
4355
4353
  if (itm.search && itm.search.transformSetForm) {
4356
4354
  var transformObj = itm.search.transformSetForm(setFieldsValues[itm.dataIndex], setFieldsValues);
4357
4355
  setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
4358
- if (!transformObj[itm.dataIndex]) {
4356
+ if (transformObj[itm.dataIndex] == undefined) {
4359
4357
  delete setFieldsValues[itm.dataIndex];
4360
4358
  }
4361
- return false;
4362
4359
  }
4363
4360
  });
4364
4361
  }
4365
4362
  if (c.search && c.search.transformSetForm) {
4366
4363
  var transformObj = c.search.transformSetForm(setFieldsValues[c.dataIndex], setFieldsValues);
4367
4364
  setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
4368
- if (!transformObj[c.dataIndex]) {
4365
+ if (transformObj[c.dataIndex] == undefined) {
4369
4366
  delete setFieldsValues[c.dataIndex];
4370
4367
  }
4371
4368
  return false;
package/dist/index.js CHANGED
@@ -3624,7 +3624,7 @@ var WTree = function WTree(props, ref) {
3624
3624
  }
3625
3625
  allKeysRef.current = [].concat(_toConsumableArray(allKeysRef.current), [item.key]);
3626
3626
  handleCheck({
3627
- parentIds: (_ref3 = (item === null || item === void 0 ? void 0 : item.parentIds) || ((_item$origin2 = item.origin) === null || _item$origin2 === void 0 ? void 0 : _item$origin2.parentIds)) === null || _ref3 === void 0 ? void 0 : _ref3.split(',').slice(1),
3627
+ parentIds: (_ref3 = (item === null || item === void 0 ? void 0 : item.parentIds) || ((_item$origin2 = item.origin) === null || _item$origin2 === void 0 ? void 0 : _item$origin2.parentIds) || '0') === null || _ref3 === void 0 ? void 0 : _ref3.split(',').slice(1),
3628
3628
  id: (item === null || item === void 0 ? void 0 : item.key) || (item === null || item === void 0 ? void 0 : item.id) || ((_item$origin3 = item.origin) === null || _item$origin3 === void 0 ? void 0 : _item$origin3.id),
3629
3629
  values: values,
3630
3630
  treeData: treeData
@@ -3686,9 +3686,9 @@ var WTree = function WTree(props, ref) {
3686
3686
  return setExpandedKeys(values);
3687
3687
  },
3688
3688
  onCheck: function onCheck(values, info) {
3689
- var _info$node, _info$node$parentIds, _info$node2;
3689
+ var _ref5, _info$node, _info$node2;
3690
3690
  var checked = info === null || info === void 0 ? void 0 : info.checked;
3691
- var parentIds = info === null || info === void 0 ? void 0 : (_info$node = info.node) === null || _info$node === void 0 ? void 0 : (_info$node$parentIds = _info$node.parentIds) === null || _info$node$parentIds === void 0 ? void 0 : _info$node$parentIds.split(',').slice(1);
3691
+ var parentIds = (_ref5 = (info === null || info === void 0 ? void 0 : (_info$node = info.node) === null || _info$node === void 0 ? void 0 : _info$node.parentIds) || '0') === null || _ref5 === void 0 ? void 0 : _ref5.split(',').slice(1);
3692
3692
  var currentId = (info === null || info === void 0 ? void 0 : info.node.key) || (info === null || info === void 0 ? void 0 : info.node.id);
3693
3693
  handleCheck({
3694
3694
  parentIds: parentIds,
@@ -4267,7 +4267,7 @@ var WForm = function WForm(props, ref) {
4267
4267
  filterFormColumns.forEach(function (c) {
4268
4268
  if (c.type == 'group') {
4269
4269
  var _c$children3;
4270
- c.children = (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
4270
+ (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
4271
4271
  if (itm.search && itm.search.transform) {
4272
4272
  var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
4273
4273
  if (transformObj[itm.dataIndex] == undefined) {
@@ -4325,24 +4325,22 @@ var WForm = function WForm(props, ref) {
4325
4325
  filterFormColumns.forEach(function (c) {
4326
4326
  if (c.type == 'group') {
4327
4327
  var _c$children4;
4328
- c.children = (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
4328
+ (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
4329
4329
  if (itm.search && itm.search.transform) {
4330
4330
  var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
4331
4331
  searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
4332
- if (!transformObj[itm.dataIndex]) {
4332
+ if (transformObj[itm.dataIndex] == undefined) {
4333
4333
  delete searchForm[itm.dataIndex];
4334
4334
  }
4335
- return false;
4336
4335
  }
4337
4336
  });
4338
4337
  }
4339
4338
  if (c.search && c.search.transform) {
4340
4339
  var transformObj = c.search.transform(searchForm[c.dataIndex]);
4341
4340
  searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
4342
- if (!transformObj[c.dataIndex]) {
4341
+ if (transformObj[c.dataIndex] == undefined) {
4343
4342
  delete searchForm[c.dataIndex];
4344
4343
  }
4345
- return false;
4346
4344
  }
4347
4345
  if (c.valueType && ['date', 'dateTime', 'dateMonth', 'dateYear', 'dateRange', 'dateTimeRange'].includes(c.valueType)) {
4348
4346
  if (c.valueType === 'date' && searchForm[c.dataIndex]) {
@@ -4395,21 +4393,20 @@ var WForm = function WForm(props, ref) {
4395
4393
  filterFormColumns.forEach(function (c) {
4396
4394
  if (c.type == 'group') {
4397
4395
  var _c$children5;
4398
- c.children = (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
4396
+ (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
4399
4397
  if (itm.search && itm.search.transformSetForm) {
4400
4398
  var transformObj = itm.search.transformSetForm(setFieldsValues[itm.dataIndex], setFieldsValues);
4401
4399
  setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
4402
- if (!transformObj[itm.dataIndex]) {
4400
+ if (transformObj[itm.dataIndex] == undefined) {
4403
4401
  delete setFieldsValues[itm.dataIndex];
4404
4402
  }
4405
- return false;
4406
4403
  }
4407
4404
  });
4408
4405
  }
4409
4406
  if (c.search && c.search.transformSetForm) {
4410
4407
  var transformObj = c.search.transformSetForm(setFieldsValues[c.dataIndex], setFieldsValues);
4411
4408
  setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
4412
- if (!transformObj[c.dataIndex]) {
4409
+ if (transformObj[c.dataIndex] == undefined) {
4413
4410
  delete setFieldsValues[c.dataIndex];
4414
4411
  }
4415
4412
  return false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.87",
4
+ "version": "0.7.89",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",