@dartech/arsenal-ui 1.3.97 → 1.3.99

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/index.js CHANGED
@@ -69,10 +69,10 @@ import Step from '@mui/material/Step';
69
69
  import StepLabel from '@mui/material/StepLabel';
70
70
  import StepContent from '@mui/material/StepContent';
71
71
  import StepConnector from '@mui/material/StepConnector';
72
- import Select from '@mui/material/Select';
73
- import InputLabel from '@mui/material/InputLabel';
74
72
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
75
73
  import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
74
+ import Select from '@mui/material/Select';
75
+ import InputLabel from '@mui/material/InputLabel';
76
76
  import classnames from 'classnames';
77
77
  import { toast } from 'react-toastify';
78
78
  import CssBaseline from '@mui/material/CssBaseline';
@@ -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
@@ -4564,25 +4568,29 @@ const PropertyValueField = ({
4564
4568
  }, [propertyType, format, restrictedValues, isMultiple, _label,
4565
4569
  // key,
4566
4570
  isRequired, properties, required]);
4567
- return isMultiple ? jsx(ControlMultiplePropertyFiller, {
4568
- control: control,
4569
- name: name,
4570
- property: fillerProperty,
4571
- title: _label,
4572
- required: required,
4573
- entityReferenceDefinitionSources: entityReferenceDefinitionSources,
4574
- entityReferenceValueComponent: entityReferenceValueComponent,
4575
- fileReferenceValueComponent: fileReferenceValueComponent
4576
- }) : jsx(ControlPropertyFiller, {
4577
- control: control,
4578
- name: name,
4579
- property: fillerProperty,
4580
- title: _label,
4581
- required: required,
4582
- entityReferenceDefinitionSources: entityReferenceDefinitionSources,
4583
- entityReferenceValueComponent: entityReferenceValueComponent,
4584
- fileReferenceValueComponent: fileReferenceValueComponent
4585
- });
4571
+ return jsx(LocalizationProvider, Object.assign({
4572
+ dateAdapter: AdapterDateFns
4573
+ }, {
4574
+ children: isMultiple ? jsx(ControlMultiplePropertyFiller, {
4575
+ control: control,
4576
+ name: name,
4577
+ property: fillerProperty,
4578
+ title: _label,
4579
+ required: required,
4580
+ entityReferenceDefinitionSources: entityReferenceDefinitionSources,
4581
+ entityReferenceValueComponent: entityReferenceValueComponent,
4582
+ fileReferenceValueComponent: fileReferenceValueComponent
4583
+ }) : jsx(ControlPropertyFiller, {
4584
+ control: control,
4585
+ name: name,
4586
+ property: fillerProperty,
4587
+ title: _label,
4588
+ required: required,
4589
+ entityReferenceDefinitionSources: entityReferenceDefinitionSources,
4590
+ entityReferenceValueComponent: entityReferenceValueComponent,
4591
+ fileReferenceValueComponent: fileReferenceValueComponent
4592
+ })
4593
+ }));
4586
4594
  };
4587
4595
 
4588
4596
  const NodesList = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.97",
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;