@dartech/arsenal-ui 1.3.25 → 1.3.27

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
@@ -38,8 +38,6 @@ import { format, isMatch, isValid, parse } from 'date-fns';
38
38
  import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
39
39
  import { TimePicker } from '@mui/x-date-pickers/TimePicker';
40
40
  import Chip from '@mui/material/Chip';
41
- import InputLabel from '@mui/material/InputLabel';
42
- import AddIcon from '@mui/icons-material/Add';
43
41
  import Grid from '@mui/material/Unstable_Grid2/Grid2';
44
42
  import { toString, parse as parse$1 } from 'duration-fns';
45
43
  import Pagination from '@mui/material/Pagination';
@@ -73,6 +71,7 @@ import StepContent from '@mui/material/StepContent';
73
71
  import StepConnector from '@mui/material/StepConnector';
74
72
  import Select from '@mui/material/Select';
75
73
  import CloseIcon from '@mui/icons-material/Close';
74
+ import InputLabel from '@mui/material/InputLabel';
76
75
  import classnames from 'classnames';
77
76
  import { toast } from 'react-toastify';
78
77
  import CssBaseline from '@mui/material/CssBaseline';
@@ -257,7 +256,16 @@ const ControlInput = _a => {
257
256
  type: "text",
258
257
  inputRef: ref,
259
258
  name: name,
260
- label: label,
259
+ label: required ? jsxs(Fragment, {
260
+ children: [label, " ", jsx("span", {
261
+ children: "*"
262
+ })]
263
+ }) : label,
264
+ sx: {
265
+ '.MuiInputLabel-root span': {
266
+ color: '#D6331F'
267
+ }
268
+ },
261
269
  error: !!error,
262
270
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
263
271
  disabled: disabled,
@@ -363,7 +371,16 @@ const ControlDebouncedInput = _a => {
363
371
  type: "text",
364
372
  inputRef: ref,
365
373
  name: name,
366
- label: label,
374
+ label: required ? jsxs(Fragment, {
375
+ children: [label, " ", jsx("span", {
376
+ children: "*"
377
+ })]
378
+ }) : label,
379
+ sx: {
380
+ '.MuiInputLabel-root span': {
381
+ color: '#D6331F'
382
+ }
383
+ },
367
384
  error: !!error,
368
385
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
369
386
  disabled: disabled,
@@ -441,7 +458,16 @@ const ControlSelect = _a => {
441
458
  type: "text",
442
459
  inputRef: ref,
443
460
  name: name,
444
- label: label,
461
+ label: required ? jsxs(Fragment, {
462
+ children: [label, " ", jsx("span", {
463
+ children: "*"
464
+ })]
465
+ }) : label,
466
+ sx: {
467
+ '.MuiInputLabel-root span': {
468
+ color: '#D6331F'
469
+ }
470
+ },
445
471
  error: !!error,
446
472
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
447
473
  disabled: disabled,
@@ -735,7 +761,16 @@ const ControlAutocomplete = _a => {
735
761
  return jsx(TextField, Object.assign({}, params, {
736
762
  variant: "outlined",
737
763
  name: name,
738
- label: label,
764
+ label: required ? jsxs(Fragment, {
765
+ children: [label, " ", jsx("span", {
766
+ children: "*"
767
+ })]
768
+ }) : label,
769
+ sx: {
770
+ '.MuiInputLabel-root span': {
771
+ color: '#D6331F'
772
+ }
773
+ },
739
774
  error: !!error,
740
775
  inputRef: ref,
741
776
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message)
@@ -888,7 +923,16 @@ function ControlQueryAutocomplete(_a) {
888
923
  },
889
924
  renderOption: renderOption,
890
925
  renderInput: params => jsx(TextField, Object.assign({}, params, {
891
- label: label,
926
+ label: required ? jsxs(Fragment, {
927
+ children: [label, " ", jsx("span", {
928
+ children: "*"
929
+ })]
930
+ }) : label,
931
+ sx: {
932
+ '.MuiInputLabel-root span': {
933
+ color: '#D6331F'
934
+ }
935
+ },
892
936
  variant: "outlined",
893
937
  error: !!error,
894
938
  inputRef: ref,
@@ -1058,7 +1102,14 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
1058
1102
  marginRight: 10
1059
1103
  }
1060
1104
  }, {
1061
- children: label
1105
+ children: required ? jsxs(Fragment, {
1106
+ children: [label, " ", jsx(Box, Object.assign({
1107
+ component: "span",
1108
+ color: "#D6331F"
1109
+ }, {
1110
+ children: "*"
1111
+ }))]
1112
+ }) : label
1062
1113
  }))
1063
1114
  }), jsxs(Fragment, {
1064
1115
  children: [jsx(CodeMirror, Object.assign({
@@ -1513,6 +1564,9 @@ const propertiesArrayToObject = (properties, isGlobalParameter) => {
1513
1564
  name,
1514
1565
  isRequired,
1515
1566
  isMultiple,
1567
+ isVisible,
1568
+ isFillable,
1569
+ isEditable,
1516
1570
  sortOrder,
1517
1571
  isEnabled,
1518
1572
  uiSettings,
@@ -1531,6 +1585,9 @@ const propertiesArrayToObject = (properties, isGlobalParameter) => {
1531
1585
  }, getPropertyValue(Object.assign(Object.assign({}, property), {
1532
1586
  propertyType
1533
1587
  }), isGlobalParameter));
1588
+ if (isVisible !== undefined) resultProperty.isVisible = isVisible;
1589
+ if (isFillable !== undefined) resultProperty.isFillable = isFillable;
1590
+ if (isEditable !== undefined) resultProperty.isEditable = isEditable;
1534
1591
  if ('isViewableInList' in property) {
1535
1592
  resultProperty['isViewableInList'] = property.isViewableInList;
1536
1593
  }
@@ -1828,7 +1885,16 @@ const ControlNumberInput = _a => {
1828
1885
  type: "text",
1829
1886
  inputRef: ref,
1830
1887
  name: name,
1831
- label: label,
1888
+ label: required ? jsxs(Fragment, {
1889
+ children: [label, " ", jsx("span", {
1890
+ children: "*"
1891
+ })]
1892
+ }) : label,
1893
+ sx: {
1894
+ '.MuiInputLabel-root span': {
1895
+ color: '#D6331F'
1896
+ }
1897
+ },
1832
1898
  error: !!error,
1833
1899
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
1834
1900
  disabled: disabled,
@@ -1936,7 +2002,11 @@ const ControlDate = ({
1936
2002
  onChange(isValid(date) ? format(date, _format) : date);
1937
2003
  };
1938
2004
  return jsx(DatePicker, {
1939
- label: label,
2005
+ label: required ? jsxs(Fragment, {
2006
+ children: [label, " ", jsx("span", {
2007
+ children: "*"
2008
+ })]
2009
+ }) : label,
1940
2010
  inputRef: ref,
1941
2011
  inputFormat: _format,
1942
2012
  value: value || null,
@@ -1944,6 +2014,11 @@ const ControlDate = ({
1944
2014
  renderInput: props => jsx(TextField, Object.assign({}, props, {
1945
2015
  fullWidth: true,
1946
2016
  size: "small",
2017
+ sx: {
2018
+ '.MuiInputLabel-root span': {
2019
+ color: '#D6331F'
2020
+ }
2021
+ },
1947
2022
  variant: "outlined",
1948
2023
  name: name,
1949
2024
  error: !!error,
@@ -1992,13 +2067,22 @@ const ControlDateTime = ({
1992
2067
  mask: "",
1993
2068
  ampm: false,
1994
2069
  inputRef: ref,
1995
- label: label,
2070
+ label: required ? jsxs(Fragment, {
2071
+ children: [label, " ", jsx("span", {
2072
+ children: "*"
2073
+ })]
2074
+ }) : label,
1996
2075
  value: value || null,
1997
2076
  inputFormat: _format,
1998
2077
  onChange: handleChange,
1999
2078
  renderInput: props => jsx(TextField, Object.assign({}, props, {
2000
2079
  fullWidth: true,
2001
2080
  size: "small",
2081
+ sx: {
2082
+ '.MuiInputLabel-root span': {
2083
+ color: '#D6331F'
2084
+ }
2085
+ },
2002
2086
  variant: "outlined",
2003
2087
  name: name,
2004
2088
  error: !!error,
@@ -2057,7 +2141,11 @@ const ControlTime = ({
2057
2141
  return jsx(TimePicker, {
2058
2142
  mask: "",
2059
2143
  inputRef: ref,
2060
- label: label,
2144
+ label: required ? jsxs(Fragment, {
2145
+ children: [label, " ", jsx("span", {
2146
+ children: "*"
2147
+ })]
2148
+ }) : label,
2061
2149
  ampm: false,
2062
2150
  value: fieldValue,
2063
2151
  inputFormat: _format,
@@ -2065,6 +2153,11 @@ const ControlTime = ({
2065
2153
  renderInput: props => jsx(TextField, Object.assign({}, props, {
2066
2154
  fullWidth: true,
2067
2155
  size: "small",
2156
+ sx: {
2157
+ '.MuiInputLabel-root span': {
2158
+ color: '#D6331F'
2159
+ }
2160
+ },
2068
2161
  variant: "outlined",
2069
2162
  name: name,
2070
2163
  error: !!error,
@@ -2126,9 +2219,18 @@ const ControlArrayInput = ({
2126
2219
  }
2127
2220
  }, [handleAdd]);
2128
2221
  return jsxs(Fragment, {
2129
- children: [jsx(InputLabel, {
2130
- children: label
2131
- }), jsx(Box, Object.assign({
2222
+ children: [jsx(Typography, Object.assign({
2223
+ variant: "subtitle1"
2224
+ }, {
2225
+ children: required ? jsxs(Fragment, {
2226
+ children: [label, " ", jsx(Box, Object.assign({
2227
+ component: "span",
2228
+ color: "#D6331F"
2229
+ }, {
2230
+ children: "*"
2231
+ }))]
2232
+ }) : label
2233
+ })), jsx(Box, Object.assign({
2132
2234
  display: "flex",
2133
2235
  flexWrap: "wrap"
2134
2236
  }, {
@@ -2162,7 +2264,11 @@ const ControlArrayInput = ({
2162
2264
  onClick: handleAdd,
2163
2265
  disabled: !!((_c = errors[name]) === null || _c === void 0 ? void 0 : _c.message)
2164
2266
  }, {
2165
- children: jsx(AddIcon, {})
2267
+ children: jsx(SvgIcon, {
2268
+ children: jsx("path", {
2269
+ d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
2270
+ })
2271
+ })
2166
2272
  }))
2167
2273
  }
2168
2274
  })]
@@ -2219,7 +2325,14 @@ const ControlPeriodInput = ({
2219
2325
  }))), jsx(Typography, Object.assign({
2220
2326
  variant: "subtitle1"
2221
2327
  }, {
2222
- children: _label
2328
+ children: required ? jsxs(Fragment, {
2329
+ children: [_label, " ", jsx(Box, Object.assign({
2330
+ component: "span",
2331
+ color: "#D6331F"
2332
+ }, {
2333
+ children: "*"
2334
+ }))]
2335
+ }) : _label
2223
2336
  })), error && jsx(FormHelperText, Object.assign({
2224
2337
  error: true
2225
2338
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.25",
3
+ "version": "1.3.27",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,9 +27,7 @@
27
27
  "classnames": "^2.3.1",
28
28
  "@tanstack/react-query": "^4.24.10",
29
29
  "@rollup/plugin-node-resolve": "13.3.0",
30
- "@uiw/codemirror-theme-material": "4.21.3",
31
- "qs": "6.11.0",
32
- "react-ace": "10.1.0"
30
+ "qs": "6.11.0"
33
31
  },
34
32
  "module": "./index.js",
35
33
  "main": "./index.js",
@@ -41,6 +41,9 @@ export interface Property {
41
41
  isMultiple: boolean;
42
42
  sortOrder: number;
43
43
  isEnabled: boolean;
44
+ isVisible?: boolean;
45
+ isFillable?: boolean;
46
+ isEditable?: boolean;
44
47
  uiSettings: unknown;
45
48
  validationNode: unknown;
46
49
  key?: string;