@dartech/arsenal-ui 1.4.15 → 1.4.17

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -1530,6 +1530,7 @@ const formatPropertyValue = (propertyType, value, params) => {
1530
1530
  if (value === null || value === undefined) {
1531
1531
  return null;
1532
1532
  }
1533
+ if (isExpression(value)) return value;
1533
1534
  let parsedValue = value;
1534
1535
  // console.log(value);
1535
1536
  switch (propertyType) {
@@ -2421,7 +2422,8 @@ const ControlPeriodInput = ({
2421
2422
  name: _name = 'period',
2422
2423
  control,
2423
2424
  label: _label = 'Period',
2424
- required
2425
+ required,
2426
+ isSecondsVisible: _isSecondsVisible = false
2425
2427
  }) => {
2426
2428
  var _a;
2427
2429
  const [localValue, setLocalValue] = useState();
@@ -2569,6 +2571,20 @@ const ControlPeriodInput = ({
2569
2571
  onChange: handleChange,
2570
2572
  fullWidth: true
2571
2573
  })
2574
+ })), _isSecondsVisible && jsx(Grid, Object.assign({
2575
+ sm: 1
2576
+ }, {
2577
+ children: jsx(TextField, {
2578
+ variant: "outlined",
2579
+ size: "small",
2580
+ error: !!error,
2581
+ value: (localValue === null || localValue === void 0 ? void 0 : localValue.seconds) || '',
2582
+ name: "seconds",
2583
+ label: "Seconds",
2584
+ type: "number",
2585
+ onChange: handleChange,
2586
+ fullWidth: true
2587
+ })
2572
2588
  }))]
2573
2589
  }))]
2574
2590
  });
@@ -5978,15 +5994,6 @@ const PropertyFiller = ({
5978
5994
  }
5979
5995
  }
5980
5996
  }, [value, property, name, fillOption, isDirty, setValue, defaultProperyValue]);
5981
- // useEffect(() => {
5982
- // if (
5983
- // isPropertyValueEmpty(value) &&
5984
- // property.propertyType !== PropertyType.JSON
5985
- // ) {
5986
- // console.log('setValue', name, value);
5987
- // setValue(name, value);
5988
- // }
5989
- // }, [name, setValue, value, property]);
5990
5997
  return jsxs(Grid, Object.assign({
5991
5998
  xs: 12
5992
5999
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.15",
3
+ "version": "1.4.17",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -5,6 +5,7 @@ type Props = {
5
5
  control: Control<any>;
6
6
  label?: ReactNode;
7
7
  required?: boolean;
8
+ isSecondsVisible?: boolean;
8
9
  };
9
- export declare const ControlPeriodInput: ({ name, control, label, required }: Props) => JSX.Element;
10
+ export declare const ControlPeriodInput: ({ name, control, label, required, isSecondsVisible }: Props) => JSX.Element;
10
11
  export {};