@itilite/iui-user-management 0.4.902 → 0.4.904

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.
@@ -5189,6 +5189,9 @@ var UserAddEdit = function UserAddEdit(props) {
5189
5189
  var _useState25 = useState([]),
5190
5190
  uploadedFiles = _useState25[0],
5191
5191
  setUploadedFiles = _useState25[1];
5192
+ var _useState26 = useState(70),
5193
+ maxLengthForModal = _useState26[0],
5194
+ setMaxLengthForModal = _useState26[1];
5192
5195
  var defaultAddModalData = {
5193
5196
  isOpen: false,
5194
5197
  isError: false,
@@ -5201,12 +5204,12 @@ var UserAddEdit = function UserAddEdit(props) {
5201
5204
  regexOnBlur: null,
5202
5205
  maxLimit: '',
5203
5206
  minLimit: '',
5204
- maxLength: 150,
5207
+ maxLength: maxLengthForModal,
5205
5208
  minLength: 0
5206
5209
  };
5207
- var _useState26 = useState(defaultAddModalData),
5208
- addModalData = _useState26[0],
5209
- setAddModalData = _useState26[1];
5210
+ var _useState27 = useState(defaultAddModalData),
5211
+ addModalData = _useState27[0],
5212
+ setAddModalData = _useState27[1];
5210
5213
  var onAddModalClose = function onAddModalClose() {
5211
5214
  setAddModalData(_extends({}, defaultAddModalData));
5212
5215
  };
@@ -5226,12 +5229,16 @@ var UserAddEdit = function UserAddEdit(props) {
5226
5229
  var title = '';
5227
5230
  if (id === 'entity') {
5228
5231
  title = 'Entity';
5232
+ setMaxLengthForModal(70);
5229
5233
  } else if (id === 'department') {
5230
5234
  title = 'Department';
5235
+ setMaxLengthForModal(70);
5231
5236
  } else if (id === 'business_unit') {
5237
+ setMaxLengthForModal(150);
5232
5238
  title = 'Business unit';
5233
5239
  } else if (id === 'employee_level') {
5234
5240
  title = 'Employee level';
5241
+ setMaxLengthForModal(70);
5235
5242
  }
5236
5243
  setAddModalData(_extends({}, addModalData, {
5237
5244
  isOpen: true,
@@ -10432,12 +10439,20 @@ var UserPanel = function UserPanel(_ref) {
10432
10439
  var validatedValue = _value.replace(/\s+/g, ' ').trim();
10433
10440
  setDataList(validatedValue);
10434
10441
  };
10442
+ var _useState17 = useState(70),
10443
+ maxLengthForModal = _useState17[0],
10444
+ setMaxLengthForModal = _useState17[1];
10445
+ useEffect(function () {
10446
+ if (title === 'Business unit') {
10447
+ setMaxLengthForModal(150);
10448
+ }
10449
+ }, []);
10435
10450
  var validation = {
10436
10451
  regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
10437
10452
  regexOnBlur: null,
10438
10453
  maxLimit: '',
10439
10454
  minLimit: '',
10440
- maxLength: 150,
10455
+ maxLength: maxLengthForModal,
10441
10456
  minLength: 0
10442
10457
  };
10443
10458
  useEffect(function () {