@dartech/arsenal-ui 1.3.98 → 1.3.99

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -111,7 +111,7 @@ var PropertyType;
111
111
  })(PropertyType || (PropertyType = {}));
112
112
  const DATE_DEFAULT_FORMAT = 'yyyy-MM-dd';
113
113
  const TIME_DEFAULT_FORMAT = 'HH:mm:ss';
114
- const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
114
+ const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
115
115
 
116
116
  var RoundingMode;
117
117
  (function (RoundingMode) {
@@ -1531,7 +1531,7 @@ const formatPropertyValue = (propertyType, value, params) => {
1531
1531
  case PropertyType.DATE_TIME:
1532
1532
  case PropertyType.TIME:
1533
1533
  {
1534
- if (value) parsedValue = format(new Date(value.toString()), params.formatText);
1534
+ if (value) parsedValue = format(new Date(value.toString()), params.formatText.replace(/[Z,z,x]+/g, 'XX'));
1535
1535
  break;
1536
1536
  }
1537
1537
  case PropertyType.JSON:
@@ -2090,8 +2090,10 @@ const ControlDate = _a => {
2090
2090
  children: [label, " ", jsx("span", {
2091
2091
  children: "*"
2092
2092
  })]
2093
- }) : label,
2094
- inputFormat: localFormat,
2093
+ }) : label
2094
+ }, localFormat ? {
2095
+ inputFormat: localFormat
2096
+ } : {}, {
2095
2097
  value: localFormat ? parse(field.value, localFormat, new Date()) : field.value,
2096
2098
  onChange: handleChange,
2097
2099
  components: {
@@ -2131,7 +2133,7 @@ const ControlDateTime = _a => {
2131
2133
  textFieldProps
2132
2134
  } = _a,
2133
2135
  dateTimePickerProps = __rest(_a, ["control", "name", "required", "label", "format", "hideErrorMessage", "textFieldProps"]);
2134
- const [localFormat, setLocalFormat] = useState(DATE_TIME_DEFAULT_FORMAT);
2136
+ const [localFormat, setLocalFormat] = useState();
2135
2137
  const {
2136
2138
  field,
2137
2139
  fieldState: {
@@ -2169,8 +2171,10 @@ const ControlDateTime = _a => {
2169
2171
  children: "*"
2170
2172
  })]
2171
2173
  }) : label,
2172
- value: localFormat ? parse(field.value, localFormat, new Date()) : field.value,
2173
- inputFormat: localFormat,
2174
+ value: localFormat ? parse(field.value, localFormat, new Date()) : field.value
2175
+ }, localFormat ? {
2176
+ inputFormat: localFormat
2177
+ } : {}, {
2174
2178
  onChange: handleChange,
2175
2179
  components: {
2176
2180
  OpenPickerIcon: DateIconComponent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.98",
3
+ "version": "1.3.99",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -116,4 +116,4 @@ export interface FileReferenceProperty extends Property {
116
116
  export type PropertyUnion<T = Record<string, never>> = BigDecimalProperty | BigIntegerProperty | BooleanProperty | DateProperty | DateTimeProperty | DoubleProperty | EntityTypeProperty<T> | EntityReferenceProperty | FloatProperty | StringProperty | IntegerProperty | JsonProperty | LongProperty | TimeProperty | AnyProperty | EntityReferenceProperty | FileProperty | FileReferenceProperty;
117
117
  export declare const DATE_DEFAULT_FORMAT = "yyyy-MM-dd";
118
118
  export declare const TIME_DEFAULT_FORMAT = "HH:mm:ss";
119
- export declare const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
119
+ export declare const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Control } from 'react-hook-form';
2
3
  type Props = {
3
4
  control: Control<any>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  format: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PropertyUnion } from '../../../interfaces';
2
3
  type PropertyItemProps = {
3
4
  property: PropertyUnion;