indicator-ui 0.0.139 → 0.0.140

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.js CHANGED
@@ -8816,8 +8816,10 @@ const inputFieldComponent = (schema, key, additionProps) => {
8816
8816
  const initFields = additionProps.getPrivateRefStoreValue(_ui__WEBPACK_IMPORTED_MODULE_3__.INIT_FIELDS_NAME) || [];
8817
8817
  if (!initFields.find(item => JSON.stringify(item) === JSON.stringify(keyWay))) {
8818
8818
  const curKeyWayStore = additionProps.getPrivateRefStoreValue(_ui__WEBPACK_IMPORTED_MODULE_3__.KEY_WAY_STORE_NAME) ?? [];
8819
- additionProps.addPrivateRefStoreValue([...curKeyWayStore, keyWay], _ui__WEBPACK_IMPORTED_MODULE_3__.KEY_WAY_STORE_NAME);
8820
- additionProps.addPrivateRefStoreValue([...initFields, keyWay], _ui__WEBPACK_IMPORTED_MODULE_3__.INIT_FIELDS_NAME);
8819
+ // Безопасно берем keyWay, так как он может быть массивом
8820
+ const saveKeyWay = typeof keyWay === 'string' ? [keyWay] : keyWay;
8821
+ additionProps.addPrivateRefStoreValue([...curKeyWayStore, ...saveKeyWay], _ui__WEBPACK_IMPORTED_MODULE_3__.KEY_WAY_STORE_NAME);
8822
+ additionProps.addPrivateRefStoreValue([...initFields, ...saveKeyWay], _ui__WEBPACK_IMPORTED_MODULE_3__.INIT_FIELDS_NAME);
8821
8823
  onChange(value !== undefined ? value : schema.props.defaultValue);
8822
8824
  }
8823
8825
  }
@@ -9327,21 +9329,24 @@ function DateTimeField({ value, fieldConfig = 'datetime', onChange, dateFormat =
9327
9329
  return null;
9328
9330
  };
9329
9331
  const getDateTimeValue = () => {
9330
- let resDate = new Date();
9332
+ let resDate = null;
9331
9333
  switch (fieldConfig) {
9332
9334
  case 'datetime':
9333
9335
  if (time && date) {
9336
+ resDate = new Date();
9334
9337
  setDateInDate(resDate, date);
9335
9338
  setTimeInDate(resDate, time);
9336
9339
  }
9337
9340
  break;
9338
9341
  case 'date':
9339
9342
  if (date) {
9343
+ resDate = new Date();
9340
9344
  setDateInDate(resDate, date);
9341
9345
  }
9342
9346
  break;
9343
9347
  case 'time':
9344
9348
  if (time) {
9349
+ resDate = new Date();
9345
9350
  setTimeInDate(resDate, time);
9346
9351
  }
9347
9352
  break;
@@ -9375,7 +9380,9 @@ function DateTimeField({ value, fieldConfig = 'datetime', onChange, dateFormat =
9375
9380
  }
9376
9381
  else if (time || date) {
9377
9382
  const resDate = getDateTimeValue();
9378
- changeValue(resDate);
9383
+ if (resDate != null) {
9384
+ changeValue(resDate);
9385
+ }
9379
9386
  }
9380
9387
  }, [time, date]);
9381
9388
  const getTimeContent = () => {