@dartech/arsenal-ui 1.4.45 → 1.4.47

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.
Files changed (2) hide show
  1. package/index.js +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -328,6 +328,9 @@ const ControlInput = _a => {
328
328
  minRows: textarea ? 3 : 1,
329
329
  value: value !== null && value !== void 0 ? value : '',
330
330
  onChange: customOnChange ? customOnChange : onChange,
331
+ InputLabelProps: {
332
+ shrink: !!textFieldProps.placeholder
333
+ },
331
334
  inputProps: Object.assign(Object.assign({}, (_b = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputProps) !== null && _b !== void 0 ? _b : {}), {
332
335
  value: value !== null && value !== void 0 ? value : ''
333
336
  })
@@ -2506,7 +2509,10 @@ const ControlNumberInput = _a => {
2506
2509
  rules: {
2507
2510
  required: required ? textError.required : false,
2508
2511
  validate: val => {
2509
- if (val === null || val === 0) return true;
2512
+ if (+val === 0) return true;
2513
+ if (val === null) {
2514
+ return required ? textError.required : true;
2515
+ }
2510
2516
  if (decimal && !floatsOnly.test(val) || /^-*0+$/.test(val)) {
2511
2517
  return textError.notValidNumber;
2512
2518
  } else if (!decimal && !digitsOnly.test(val)) {
@@ -6823,7 +6829,7 @@ const PropertyFiller = ({
6823
6829
  parseValue: true,
6824
6830
  hideErrorMessage: true,
6825
6831
  useCleanValue: true,
6826
- mode: propertyType === PropertyType.ANY ? 'text' : 'json'
6832
+ mode: propertyType === PropertyType.ANY || propertyType === PropertyType.JSON ? 'text' : 'json'
6827
6833
  }) : jsx(ControlInput, {
6828
6834
  control: control,
6829
6835
  name: name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.45",
3
+ "version": "1.4.47",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"